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

namespace AutoTurnOver.Models
{
    public class dc_base_warehouse
    {
        public int id { get; set; }

        public DateTime gmt_create { get; set; }

        public DateTime gmt_modified { get; set; }

        public string warehouse_code { get; set; }

        private string _warehouse_name;
        public string warehouse_name
        {
            get
            {
                if ("fba仓".Equals(hq_type, StringComparison.OrdinalIgnoreCase))
                {
                    if (string.IsNullOrWhiteSpace(bailun_account))
                    {
                        return warehouse_extend_name;
                    }
                    else {
                        return bailun_account + " - " + _warehouse_name;
                    }
                }
                else
                {
                    return _warehouse_name;
                }
            }
            set { _warehouse_name = value; }
        }

        public string warehouse_extend_name { get; set; }

        public string functions { get; set; }

        public string warehouse_old_code { get; set; }

        public string system_flag { get; set; }

        public int bailun_account_id { get; set; }

        public string bailun_account { get; set; }

        public string hq_type { get; set; }

        public int type_id { get; set; }

        public string type_name { get; set; }

        public int area_id { get; set; }

        public string area_name { get; set; }

        public int warehouse_id { get; set; }
    }
    public class dc_base_warehouse_old
    {
        public int id { get; set; }

        public DateTime gmt_create { get; set; }

        public DateTime gmt_modified { get; set; }

        public string warehouse_code { get; set; }

        public string warehouse_name { get; set; }

        public DateTime create_time { get; set; }

        public DateTime update_time { get; set; }

        public string extend_warehouse_name { get; set; }

        public int warehouse_type { get; set; }

        public string warehouse_type_name { get; set; }

        public int is_enabled { get; set; }

        public string functions { get; set; }

        public string function_id { get; set; }

    }

    /// <summary>
    /// 仓库类型
    /// </summary>
    public class mwarehousetype
    {
        public string id { get { return name; } }
        public string name { get; set; }
    }

    /// <summary>
    /// 仓库区域
    /// </summary>
    public class mwarehouseArea
    {
        public int id { get; set; }

        public string name { get; set; }
    }
}
