using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XYY.Model.Standard.Dto;
using XYY.Model.Standard.Order;

namespace XYY.Model.Standard.Dto.order
{
    public class CustomerOrder : Order_Order
    {
        public CustomerOrder() { Tags = new List<string>(); attrs = new List<string>(); }
        public DateTime? TargetTime
        {
            get; set;
        }

        public bool IsShowFirstTracking
        {
            get; set;
        }

        public int? SignDay
        {
            get; set;
        }
        public bool Active
        {
            get; set;
        }
        public string StrDraftStatus
        {
            get; set;
        }

        public int DraftStatus
        {
            get; set;
        }

        public string ErrorMessage
        {
            get; set;
        }

        public string UnusualReason
        {
            get; set;
        }

        public string StrOrderStatus
        {
            get; set;
        }

        public List<Logistics_TrackingLog> FristTrackingLogs
        {
            get; set;
        }

        public List<Logistics_TrackingLog> TrackingLogs
        {
            get; set;
        }

        public List<Order_OrderGoods> Goods
        {
            get; set;
        }

        public decimal CFright
        {
            get; set;
        }

        public bool HasIOSS
        {
            get; set;
        }

        public string ChannelName
        {
            get; set;
        }
        public string CreateOrderChannelName
        {
            get; set;
        }

        public string LatestLogisticsStatus
        {
            get; set;
        }

        public DateTime? LatestLogisticsTime
        {
            get; set;
        }

        public DateTime? LastGetTime
        {
            get; set;
        }

        public string ShippingServiceName
        {
            get; set;
        }

        public string ShippingServiceUrl
        {
            get; set;
        }

        public bool CustomerSettlement
        {
            get; set;
        }

        public bool BranchOfficeSettlement
        {
            get; set;
        }

        public string LastMessage
        {
            get; set;
        }
        public string CustomerNumber { get; set; }
        public List<string> Tags { get; set; }
        public string CustomerName { get; set; }

        public List<string> attrs { get; set; }
        public string DeclarationMethod { get; set; }
        public int Quantity { get; set; }
        public string UploadFileUrl { get; set; }
        public string OrderStatusDec
        {
            get
            {
                if (OrderStatus == 1)
                {
                    return "待揽收";
                }
                else if (OrderStatus == 2)
                {
                    return "处理中";
                }
                else if (OrderStatus == 3)
                {
                    return "已出库";
                }
                else if (OrderStatus == 4)
                {
                    return "已退件";
                }
                else if (OrderStatus == 0)
                {
                    return "已取消";
                }
                else if (OrderStatus <= -1)
                {
                    return "彻底删除";
                }
                else return "未知";
            }
        }
    }
    public class OrderGoodsCount
    {
        public int OrderId { get; set; }
        public int GoodsCount { get; set; }
    }
}
