using BPA.SAAS.Manage.Comm.Enum;
using BPA.SAAS.Manage.Core.Base;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace BPA.SAAS.Manage.Core.DataBase
{
    [SugarTable("bpa_batching")]
    public class BPA_Batching: IBaseEntity, IGroupId
    {
        /// <summary>
        /// 原料编码
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(50)", IsNullable = false)]
        public string Code { get; set; }
        /// <summary>
        /// 商品属性  (0成品,1半成品,2,易耗品)
        /// </summary>           
        [SugarColumn(IsNullable = false)]
        public int Aittribute { get; set; } = 0;
        /// <summary>
        /// 原料名称
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(200)", IsNullable = false)]
        public string Batching_Name { get; set; }
        /// <summary>
        /// 配料类型
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(200)", IsNullable = false)]
        public string Batching_Type { get; set; }
        /// <summary>
        /// 原料类型
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(64)", IsNullable = false)]
        public string TypeID { get; set; }

        /// <summary>
        /// 库存单位
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(64)", IsNullable = false)]
        public string StockUint { get; set; }

        /// <summary>
        /// 规格属性
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(500)", IsNullable = false)]
        public string Specs { get; set; }


        /// <summary>
        /// 成本价
        /// </summary>           
        [SugarColumn(ColumnDataType = "decimal(10,2)", IsNullable = false)]
        public decimal Price { get; set; }

        /// <summary>
        /// 状态 【正常 停用】默认 正常
        /// </summary>
        [SugarColumn(ColumnDataType = "int", ColumnDescription = "状态", IsNullable = false)]
        public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
        /// <summary>
        /// 净料率
        /// </summary>           
        [SugarColumn(ColumnDataType = "decimal(10,2)", IsNullable = false)]
        public decimal netrecovery { get; set; }

        /// <summary>
        /// 出库单位
        /// </summary>           
        [SugarColumn(ColumnDataType = "Nvarchar(64)", IsNullable = false)]
        public string outstockUint { get; set; }


        /// <summary>
        /// 换算比例
        /// </summary>           
        [SugarColumn(ColumnDataType = "decimal(10,2)", IsNullable = false)]
        public decimal proportion { get; set; }


        [SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true, IsIdentity = true)]
        public int AutoKey { get; set; }
        [SugarColumn(ColumnDataType = "Nvarchar(255)", IsNullable = true)]
        public string ForeignKeyRe { get; set; }
        /// <summary>
        /// 加盟商id
        /// </summary>
        public string GroupId { get; set; }
    }
}
