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

namespace Sugar.Enties
{
    public class DesignChangesDTO
    {
        /// <summary>
        /// 设计变更代码
        /// </summary>
        public string DesignChangesCode { get; set; }
        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjectCode { get; set; }
        /// <summary>
        /// 合同编码
        /// </summary>
        public string ContractCode { get; set; }
        /// <summary>
        /// 关联合同名
        /// </summary>
        public string ContractName { get; set; }
        /// <summary>
        /// 设计变更名称
        /// </summary>
        public string DesignChangesName { get; set; }
        /// <summary>
        /// 设计变更编号
        /// </summary>
        public string DesignChangesNumber { get; set; }
        public string Person { get; set; }
        /// <summary>
        /// 经办单位编码
        /// </summary>
        public string UnitCode { get; set; }
        /// <summary>
        /// 经办单位名称
        /// </summary>
        public string UnitName { get; set; }
        /// <summary>
        /// 经办单位全名
        /// </summary>
        public string UnitFullName { get; set; }
        /// <summary>
        /// 是否合约规划
        /// </summary>
        public int IsCp
        {
            get
            {
                return ItemType == "ContractPlan" ? 1 : 0;
            }
        }
        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string DesignChangesReason { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string Remark { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }
        /// <summary>
        /// 经办人名称
        /// </summary>
        public string PersonName { get; set; }
        /// <summary>
        /// 申请单名称
        /// </summary>
        public string RequisitionName { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string CheckMan { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public DateTime? CheckDate { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string CheckOpinion { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public decimal? TotalCash { get; set; }

        /// <summary>
        /// Desc:币种
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string MoneyType { get; set; }

        /// <summary>
        /// Desc:汇率
        /// Default:1
        /// Nullable:True
        /// </summary>           
        public decimal? ExchangeRate { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public decimal? TotalMoney { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public decimal? EstimateCash { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string RequisitionCode { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public decimal RateTotalCash { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public decimal NoRateTotalCash { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public decimal RateTotalMoney { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public decimal NoRateTotalMoney { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public decimal? Rate { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string ChangeType { get; set; }
        /// <summary>
        /// 设计变更日期
        /// </summary>
        public DateTime DesignChangesDate { get; set; }
        /// <summary>
        /// 款项类型
        /// </summary>
        public string ItemType { get; set; }
        /// <summary>
        /// 设计变更日期
        /// </summary>
        public string DesignChangesDateStr
        {
            get
            {
                return DesignChangesDate.ToString("yyyy-MM-dd");
            }
        }
        /// <summary>
        /// 状态码
        /// </summary>
        public string State
        {
            get; set;
        }
        /// <summary>
        /// 获取状态名
        /// </summary>
        public string StateName
        {
            get
            {
                var obj = Convert.ToInt32(State);
                return Enum.GetName(typeof(CheckState), obj);
            }
        }
    }
}
