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 InsuerItem
    {
        [JsonProperty("venderId")]
        public string Id { get; set; }
        [JsonProperty("name")]
        public string Name { get; set; }
        [JsonProperty("website")]
        public string Website { get; set; }

        /// <summary>
        /// 关联项目数量
        /// </summary>
        public int ProjectCount { get; set; }
    }

    /// <summary>
    /// 保险商关联项目信息
    /// </summary>
    public class InsuerProjectItem:ProjectItem
    {
        /// <summary>
        /// 涉及的保单个数
        /// </summary>
        [JsonProperty("contractCount")]
        public string ContractCount { get; set; }
        /// <summary>
        /// 在保资产个数
        /// </summary>
        [JsonProperty("totalCount")]
        public string TotalCount { get; set; }
    }
    /// <summary>
    /// 关联具体资产信息
    /// </summary>
    public class InsuerAssetItem
    {
        /// <summary>
        /// 资产Id
        /// </summary>
        [JsonProperty("id")]
        public string Id { get; set; }
        /// <summary>
        /// 设备编码
        /// </summary>
        [JsonProperty("family")]
        public string Family { get; set; }
        /// <summary>
        /// 关联资产信息
        /// </summary>
        [JsonProperty("infos")]
        public InsuerAssetInfo Asset { get; set; }
    }
    /// <summary>
    /// 资产信息
    /// </summary>
    public class InsuerAssetInfo
    {


        [JsonProperty("EquipName")]
        public string EquipName { get; set; }
        private string m_EquipLocalName;
        /// <summary>
        /// 本地名称
        /// </summary>
        [JsonProperty("EquipLocalName")]
        public string EquipLocalName
        {
            get { return string.IsNullOrEmpty(m_EquipLocalName)?EquipName:m_EquipLocalName; }
            set {
                this.m_EquipLocalName = value;             
            }
        }
    
        /// <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("InsuranceNum")]
        public string InsuranceNo { get; set; }
        /// <summary>
        ///  截止日期
        /// </summary>
        [JsonProperty("ExpireDate")]
        public string ExpireDate { get; set; }
        /// <summary>
        /// 保险文件key
        /// </summary>
        [JsonProperty("InsuranceFile")]
        public string InsuranceFile { get; set; }

        /// <summary>
        ///  型号Id
        /// </summary>
        [JsonProperty("DPSpecificationID")]
        public string SpecificationId { get; set; }

    }

    /// <summary>
    /// 保单数据信息
    /// </summary>
    public class InsuerContractItem 
    {
        /// <summary>
        /// 厂商库Id
        /// </summary>
        public string VenderId { get; set; } = "";
        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; } = "";

        /// <summary>
        /// 新的保单号     //String,选填,新保单Id,   当修改保单id时必填, 不改时不填，修改时可用到
        /// </summary>
        public string NewInsuranceNo { get; set; } = "";
        /// <summary>
        /// 保单编号
        /// </summary>
        [JsonProperty("insuranceNo")]
        public string InsuranceNo { get; set; } = "";
        /// <summary>
        ///  截止日期
        /// </summary>
        [JsonProperty("expireDate")]
        public string ExpireDate { get; set; } = "";
        /// <summary>
        /// 保险文件key
        /// </summary>
        [JsonProperty("contractFile")]
        public string InsuranceFile { get; set; } = "";
    }

    public class InsuerContractStatisticsItem
    {
        /// <summary>
        /// 厂商库Id
        /// </summary>
        public string VenderId { get; set; } = "";
        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; } = "";
        /// <summary>
        /// 保单编号
        /// </summary>
        [JsonProperty("insuranceNo")]
        public string InsuranceNo { get; set; } = "";
        /// <summary>
        ///  截止日期
        /// </summary>
        [JsonProperty("expireDate")]
        public string ExpireDate { get; set; } = "";
        /// <summary>
        /// 保单内资产数量
        /// </summary>
        [JsonProperty("propertyCount")]
        public string PropertyCount { get; set; } = "";
        /// <summary>
        /// 保险文件key
        /// </summary>
        [JsonProperty("contractFile")]
        public string InsuranceFile { get; set; } = "";
    }
}
