using OASystem.Domain.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OASystem.Domain.Entities.PersonnelModule
{
    /// 
    /// 物品确认审核表
    /// 
    [SugarTable(tableName: "Pm_GoodsAudit", tableDescription: "物品确认审核表")]
    public class Pm_GoodsAudit : EntityBase
    {
        /// 
        /// 审核类型
        /// 1.入库 2.出库 
        /// 
        [SugarColumn(ColumnDescription = "审核类型", IsNullable = true, ColumnDataType = "int")]
        public int Type { get; set; } = 1;
        /// 
        /// 审核部门
        /// 
        [SugarColumn(ColumnDescription = "审核部门", IsNullable = true, ColumnDataType = "bit")]
        public GoodsAuditDepEnum Dep { get; set; }
        /// 
        /// DataId 
        /// 
        [SugarColumn(ColumnDescription = "DataId", IsNullable = true, ColumnDataType = "int")]
        public int DataId { get; set; } = 0;
        /// 
        /// 确认状态
        /// 
        [SugarColumn(ColumnDescription = "审核状态", IsNullable = true, ColumnDataType = "bit")]
        public GoodsConfirmEnum AuditStatus { get; set; } = GoodsConfirmEnum.WaitConfirm;
        /// 
        /// 审核人 Id
        /// Sys_User Id
        /// 
        [SugarColumn(ColumnDescription = "审核人Id", IsNullable = true, ColumnDataType = "int")]
        public int AuditUserId { get; set; }
        /// 
        /// 审核时间
        /// 
        [SugarColumn(ColumnDescription = "审核时间", IsNullable = true, ColumnDataType = "datetime")]
        public DateTime AuditTime { get; set; }
        public Pm_GoodsAudit(){}
        /// 
        /// 基础数据初始化
        /// 
        /// 
        /// 审核类型
        /// 1.入库 2.出库 
        /// 
        /// 审核部门
        /// DataId
        /// 确认状态
        /// 创建人
        public Pm_GoodsAudit(int type, GoodsAuditDepEnum dep, int dataId, GoodsConfirmEnum auditStatus,int currUserId)
        {
            this.Type = type;
            this.Dep = dep;
            this.DataId = dataId;
            this.AuditStatus = auditStatus;
            this.AuditTime = DateTime.Now;
            this.CreateUserId = currUserId;
        }
        /// 
        /// 基础数据初始化
        /// 
        /// 
        /// 审核类型
        /// 1.入库 2.出库 
        ///     
        /// 审核部门
        /// DataId
        /// 确认状态
        /// 审核人
        /// 创建人
        public Pm_GoodsAudit(int type, GoodsAuditDepEnum dep, int dataId, GoodsConfirmEnum auditStatus, int auditorId, int currUserId)
        {
            this.Type = type;
            this.Dep = dep;
            this.DataId = dataId;
            this.AuditStatus = auditStatus;
            this.AuditUserId = currUserId;
            this.AuditTime = DateTime.Now;
            this.CreateUserId = currUserId;
        }
    }
}