using System;
using System.Collections.Generic;
using System.Text;

namespace AutoTurnOver.Models
{
    public class dc_base_trans_temp_schedule
    {
        public int id { get; set; }
        public string code { get; set; }

        /// <summary>
        /// 运输方式
        /// </summary>
        public string transport_type_str { get; set; }
        public string purchase_code { get; set; }
        /// <summary>
        /// sku+仓库
        /// </summary>
        public string sku_ware_no { get; set; }
        public string source_ware_name { get; set; }
        public string source_ware_no { get; set; }
        public string target_ware_name { get; set; }
        public string target_ware_no { get; set; }
        public int is_exception { get; set; }
        public string creater_name { get; set; }
        public DateTime create_time { get; set; }
        public int is_aims { get; set; }
        public int is_temp_data { get; set; }
        public int is_delete { get; set; }
        public DateTime time_stamp { get; set; }
        public string sku { get; set; }
        public string product_name { get; set; }
        public int product_num { get; set; }
        public string data_id { get; set; }
        public int status { get; set; }
        public DateTime gmt_create_date { get; set; }
        public DateTime gmt_update_date { get; set; }
        public int create_state { get; set; }
        public int temp_delivery_count { get; set; }
    }

    public enum dc_base_trans_temp_schedule_create_state_enum
    {
        未创建 = 0,
        已暂存 = 1,
        已创建 = 2,
        已作废 = 3,
    }

    public  class dc_base_trans_temp_schedule_dto: dc_base_trans_temp_schedule
    {
        public int quantity { get
            {
                if(create_state== (int)dc_base_trans_temp_schedule_create_state_enum.未创建)
                {
                    return product_num;
                }
                else if(create_state == (int)dc_base_trans_temp_schedule_create_state_enum.已暂存)
                {
                    return temp_delivery_count;
                }
                else
                {
                    return 0;
                }
            } }
    }
}
