
namespace Siger.Middlelayer.TpmRepository.Entities
{
    /// <summary>
    /// siger_project_sparepart_record Entity Model
    /// </summary>   
    public class siger_project_sparepart_record : TpmEntityBase
    {
        /// <summary>
        /// _project.id
        /// </summary>
        public int projectid { get; set; }
   
        /// <summary>
        /// _project_sparepart.id
        /// </summary>
        public int sparepartid { get; set; } = 0;

        /// <summary>
        /// 出入库时间
        /// </summary>
        public int create_time { get; set; } = 0;

        /// <summary>
        /// 经办人，即操作人
        /// </summary>
        public int create_mid { get; set; } = 0;

        /// <summary>
        /// _project_machine.id（和哪些设备关联）
        /// </summary>
        public int machineid { get; set; } = 0;

        /// <summary>
        /// 1->计出库；2->入库
        /// </summary>
        public int type { get; set; } = 0;

        /// <summary>
        /// 出入库数量
        /// </summary>
        public int number { get; set; } = 0;

        /// <summary>
        /// 备件供应商
        /// </summary>
        public string supplier { get; set; } = string.Empty;

        /// <summary>
        /// 领用人/入库人
        /// </summary>
        public string operate_mid { get; set; } = string.Empty;

        /// <summary>
        /// 单价
        /// </summary>
        public double price { get; set; } = 0;

        /// <summary>
        /// 总价=单价*数量
        /// </summary>
        public double sum_price { get; set; } = 0;

        /// <summary>
        /// 出库：1->采购提货出库；2->销售提货出库；3->应急维修领用出库；4->借贷出库；5->借入还出；6->对账出库；7->计划维护领用出库
        ///入库：1->采购入库；2->生产入库；3->领用退回入库；4->借贷入库；5->借出还入；6->对账入库;7->返修入库
        /// </summary>
        public int IO_type { get; set; } = 0;

        /// <summary>
        /// 是否提供置换件（出库） 1->是；0->否
        /// </summary>
        public int is_exchange { get; set; } = 0;

        /// <summary>
        /// 订单号（入库/出库-_project_repair.id）
        /// </summary>
        public string order_code { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; } = string.Empty;

        /// <summary>
        /// 期末库存
        /// </summary>
        public float last_sku { get; set; } = 0;

        /// <summary>
        /// 出入库单号
        /// </summary>
        public string record_code { get; set; } = string.Empty;

        /// <summary>
        /// 是否关联工单 0=>未关联 1=>已关联
        /// </summary>
        public int relation_repair { get; set; } = 0;
    }
}
