using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.DAL.DbModels;
using WCS.Model.ApiModel.InOutRecord;

namespace WCS.BLL.DbModels
{
    /// <summary>
    /// 用于记录单据生成到哪个序号了
    /// </summary>
    [SugarTable("wcs_document_serial_number")]
    public class DocumentSerialNumber
    {
        /// <summary>
        /// 主键 自增Id
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>           
        [SugarColumn(ColumnName = "document_type", IsNullable = false, ColumnDescription = "单据类型 出库单据 = 1,\r\n盘点单据 = 2,")]
        public DocumentTypeEnum DocumentType { get; set; }


        /// <summary>
        /// 当前单据序号
        /// </summary>           
        [SugarColumn(ColumnName = "current_serial_number", IsNullable = false, ColumnDescription = "当前单据序号")]
        public int CurrentSerialNumber { get; set; }

        /// <summary>
        /// 日期
        /// </summary>           
        [SugarColumn(ColumnName = "update_date", IsNullable = false, ColumnDescription = "更新日期")]
        public DateTime UpdateDate { get; set; }
    }

    public enum DocumentTypeEnum
    {
        出库单据 = 1,
        盘点单据 = 2,
    }

}
