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
{
    /// <summary>
    /// 物品入库表
    /// </summary>
    [SugarTable(tableName: "Pm_GoodsStorage", tableDescription: "物品入库表")]
    public class Pm_GoodsStorage : EntityBase
    {
        /// <summary>
        /// 商品Id
        /// Pm_GoodsInfo Id
        /// </summary>
        [SugarColumn(ColumnDescription = "商品Id", IsNullable = true, ColumnDataType = "int")]
        public int GoodsId { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [SugarColumn(ColumnDescription = "批次号", IsNullable = true, ColumnDataType = "varchar(50)")]
        public string? BatchNo { get; set; }

        /// <summary>
        /// 此批次领用数量
        /// </summary>
        [SugarColumn(ColumnDescription = "此批次领用数量", IsNullable = true, ColumnDataType = "decimal(10,2)")]
        public decimal ReceiveQuantity { get; set; }

        /// <summary>
        /// 此次入库数量
        /// </summary>
        [SugarColumn(ColumnDescription = "此次入库数量", IsNullable = true, ColumnDataType = "decimal(10,2)")]
        public decimal Quantity { get; set; }

        /// <summary>
        /// 此次物品单价
        /// </summary>
        [SugarColumn(ColumnDescription = "此次数量单价", IsNullable = true, ColumnDataType = "decimal(10,2)")]
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// 此次物品总价
        /// </summary>
        [SugarColumn(ColumnDescription = "此次物品总价", IsNullable = true, ColumnDataType = "decimal(10,2)")]
        public decimal TotalPrice { get; set; }

        /// <summary>
        /// 此次供应商名称
        /// </summary>
        [SugarColumn(ColumnDescription = "此次供应商名称", IsNullable = true, ColumnDataType = "varchar(100)")]
        public string? SupplierName { get; set; }

        /// <summary>
        /// 此次供应商电话
        /// </summary>
        [SugarColumn(ColumnDescription = "此次供应商电话", IsNullable = true, ColumnDataType = "varchar(30)")]
        public string? SupplierTel { get; set; }

        /// <summary>
        /// 此次供应商地址
        /// </summary>
        [SugarColumn(ColumnDescription = "此次供应商地址", IsNullable = true, ColumnDataType = "varchar(200)")]
        public string? SupplierAddress { get; set; }

        /// <summary>
        /// 此次供应商来源
        /// </summary>
        [SugarColumn(ColumnDescription = "此次供应商来源", IsNullable = true, ColumnDataType = "varchar(200)")]
        public string? SupplierSource { get; set; }

        /// <summary>
        /// 入库人
        /// </summary>
        [SugarColumn(ColumnDescription = "入库人", IsNullable = true, ColumnDataType = "int")]
        public int StorageUserId { get; set; }

        /// <summary>
        /// 入库时间
        /// </summary>
        [SugarColumn(ColumnDescription = "入库时间", IsNullable = true, ColumnDataType = "varchar(30)")]
        public string? StorageTime { get; set; }

        /// <summary>
        /// 入库确认状态
        /// </summary>
        [SugarColumn(ColumnDescription = "入库确认", IsNullable = true, ColumnDataType = "int")]
        public GoodsConfirmEnum ConfirmStatus { get; set; } = GoodsConfirmEnum.WaitConfirm;

        /// <summary>
        /// 入库确认描述
        /// </summary>
        [SugarColumn(ColumnDescription = "入库确认描述", IsNullable = true, ColumnDataType = "varchar(100)")]
        public string StatusDesc { get; set; } = string.Format("人事部:状态:待确认  审核人:-  审核时间:-;");
            //string.Format("人事部:状态:待确认  审核人:-  审核时间:-;<br/>财务部:状态:待确认  审核人:-  审核时间:-;");

    }
}