using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace eShopOnContainers.Core.Models.Orders
{
    public class Order
    {
        public Order()
        {
            SequenceNumber = 1;
            OrderItems = new List<OrderItem>();
        }

        public string BuyerId { get; set; }

        public int SequenceNumber { get; set; }

        [JsonProperty("date")]
        public DateTime OrderDate { get; set; }

        [JsonProperty("status")]
        public OrderState State { get; set; }

        [JsonProperty("city")]
        public string ShippingCity { get; set; }

        [JsonProperty("street")]
        public string ShippingStreet { get; set; }

        [JsonProperty("state")]
        public string ShippingState { get; set; }

        [JsonProperty("country")]
        public string ShippingCountry { get; set; }

        public int CardTypeId { get; set; }

        public string CardNumber { get; set; }

        public string CardHolderName { get; set; }

        public DateTime CardExpiration { get; set; }

        public string CardSecurityNumber { get; set; }

        [JsonProperty("orderitems")]
        public List<OrderItem> OrderItems { get; set; }

        [JsonProperty("total")]
        public decimal Total { get; set; }

        [JsonProperty("ordernumber")]
        public string OrderNumber { get; set; }
    }
}