using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace Com.FirmLib.Entity
{
    /// <summary>
    /// 生产厂家类别
    /// </summary>
    public class ManufacturerItem
    {
        public ManufacturerItem()
        {
            Brands=new List<InBrand>();
            Familys=new List<InFamily>();
        }

        /// <summary>
        /// 生产厂商名称
        /// </summary>
        [JsonProperty("venderId")]
        public string Id { get; set; }
        /// <summary>
        /// 生产厂商名称
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }
        [JsonProperty("brands")]
        public List<InBrand> Brands { get; set; }
        [JsonProperty("eqFamily")]
        public List<InFamily> Familys { get; set; }
    }

    public class InBrand
    {
        [JsonProperty("brandId")]
        public string Id { get; set; }
        [JsonProperty("name")]
        public string Name { get; set; }
    }
    public class InFamily
    {
        [JsonProperty("code")]
        public string Code { get; set; }
        [JsonProperty("name")]
        public string Name { get; set; }
    }
    /// <summary>
    /// 生产厂商资产信息
    /// </summary>
    public class ManufacturerAssetItem
    {
        /// <summary>
        /// 资产Id
        /// </summary>
        [JsonProperty("Id")]
        public string Id { get; set; }
        [JsonProperty("family")]
        public string Family { get; set; }
        /// <summary>
        /// 关联资产信息
        /// </summary>
        [JsonProperty("infos")]
        public SellerAssetInfo Asset { get; set; }
           
    }
    /// <summary>
    /// 生产厂商资产信息
    /// </summary>
    public class ManufacturerAssetInfo
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        [JsonProperty("EquipName")]
        public string EquipName { get; set; }
        #region 本地名称处理

        private string m_EquipLocalName;

        /// <summary>
        /// 本地名称
        /// </summary>
        [JsonProperty("EquipLocalName")]
        public string EquipLocalName
        {
            get
            {
                if (string.IsNullOrEmpty(m_EquipLocalName))
                {
                    return EquipName;
                }

                return m_EquipLocalName;

            }
            set
            {
                this.m_EquipLocalName = value;
            }
        } 
        #endregion
        /// <summary>
        /// 本地编码
        /// </summary>
        [JsonProperty("EquipLocalId")]
        public string EquipLocalId { get; set; }
        /// <summary>
        /// 品牌
        /// </summary>
        [JsonProperty("Brand")]
        public string Brand { get; set; }
        /// <summary>
        /// 产品名
        /// </summary>
        [JsonProperty("Product")]
        public string Product { get; set; }
        /// <summary>
        /// 型号
        /// </summary>
        [JsonProperty("Specification")]
        public string Specification { get; set; }

        /// <summary>
        /// 正面照
        /// </summary>
        [JsonProperty("Pic")]
        public string Pic { get; set; }
        /// <summary>
        /// 名牌照
        /// </summary>
        [JsonProperty("Nameplate")]
        public string Nameplate { get; set; }


        /// <summary>
        /// 生产日期
        /// </summary>
        [JsonProperty("ProductDate")]
        public string ProductDate { get; set; }
        /// <summary>
        /// 出厂编号
        /// </summary>
        [JsonProperty("SerialNum")]
        public string SerialNum { get; set; }

    }


    /// <summary>
    /// 关联厂家信息
    /// </summary>
    public class RefVenderItem
    {
        public RefVenderItem()
        {
            RefProductTypeIds = new List<string>();
        }
        /// <summary>
        /// 厂商id
        /// </summary>
        [JsonProperty("venderId")]
        public string Id { get; set; }
        /// <summary>
        /// 厂商名称
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// 厂商网址
        /// </summary>
        [JsonProperty("website")]
        public string WebSite { get; set; }
        /// <summary>
        /// 关联品牌数量
        /// </summary>
        [JsonProperty("involvedBrandCount")]
        public int RefBrandCount { get; set; }
        /// <summary>
        /// 关联资产数量
        /// </summary>
        [JsonProperty("involvedProductCount")]
        public int RefProductCount { get; set; }
        /// <summary>
        /// 关联类型ids
        /// </summary>
        [JsonProperty("specIds")]
        public List<string> RefProductTypeIds { get; set; }
    }
}
