using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.DAL.DbModels;
namespace WCS.BLL.DbModels
{
///
/// 盘点单据物料明细
///
[SugarTable("wcs_stock_taking_order_matdetail")]
public class StockTakingOrderMatDetail
{
///
/// 主键 自增Id
///
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
public int Id { get; set; }
///
/// 盘点单据的主键ID
///
[SugarColumn(ColumnName = "stocktaking_order_id", IsNullable = false)]
public int StocktakingOrderId { get; set; }
///
/// 盘点单据号
///
[SugarColumn(ColumnName = "stocktaking_order_number", Length = 50, IsNullable = false, ColumnDescription = "盘点单据号")]
public string StocktakingOrderNumber { get; set; }
#region 库位属性
///
/// 入库的库位表ID
///
[SugarColumn(ColumnName = "store_id", IsNullable = false, ColumnDescription = "库位ID")]
public int StoreId { get; set; }
///
/// 入库的库位编码
///
[SugarColumn(ColumnName = "store_code", Length = 50, IsNullable = false, ColumnDescription = "库位编码")]
public string StoreCode { get; set; }
[Navigate(NavigateType.OneToOne, nameof(StoreId))]
public StoreInfo StoreInfo { get; set; }
#endregion
#region 库存属性
///
/// 库存数据的ID
///
[SugarColumn(ColumnName = "inventory_detail_id", IsNullable = true)]
public int InventoryDetailId { get; set; }
///
/// 物料编码(SN)
///
[SugarColumn(ColumnName = "mat_sn", Length = 200, IsNullable = false, ColumnDescription = "物料SN")]
public string MatSN { get; set; }
///
/// 物料编码
///
[SugarColumn(ColumnName = "mat_code", Length = 100, IsNullable = true, ColumnDescription = "物料编号")]
public string MatCode { get; set; }
///
/// 物料名称
///
[SugarColumn(ColumnName = "mat_name", Length = 150, IsNullable = true, ColumnDescription = "物料名称")]
public string MatName { get; set; }
///
/// 物料规格
///
[SugarColumn(ColumnName = "mat_spec", Length = 150, IsNullable = true, ColumnDescription = "物料规格")]
public string MatSpec { get; set; }
///
/// 物料批次
///
[SugarColumn(ColumnName = "mat_batch", Length = 150, IsNullable = true, ColumnDescription = "物料批次")]
public string MatBatch { get; set; }
///
/// 物料数量
///
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
public int MatQty { get; set; }
///
/// 物料供应商
///
[SugarColumn(ColumnName = "mat_supplier", Length = 150, IsNullable = true, ColumnDescription = "物料供应商")]
public string? MatSupplier { get; set; }
///
/// 物料客户
///
[SugarColumn(ColumnName = "mat_customer", Length = 150, IsNullable = true, ColumnDescription = "物料客户")]
public string? MatCustomer { get; set; }
#endregion
///
/// 该物料是否已盘点
///
[SugarColumn(ColumnName = "is_stocktaking", IsNullable = false, ColumnDescription = "该物料是否已盘点")]
public bool IsStocktaking { get; set; } = false;
///
/// 盘点数量
///
[SugarColumn(ColumnName = "stocktaking_qty", IsNullable = false, ColumnDescription = "盘点数量")]
public int StocktakingQty { get; set; }
///
/// 创建时间
///
[SugarColumn(ColumnName = "create_time", IsNullable = false, ColumnDescription = "最后更新时间")]
public DateTime UpdateTime { get; set; } = DateTime.Now;
///
/// 创建人
///
[SugarColumn(ColumnName = "create_user", Length = 100, IsNullable = true, ColumnDescription = "最后更新人")]
public string UpdateUser { get; set; }
///
/// 用于绑定中显示序号
///
[SugarColumn(IsIgnore = true)]
public int RowNumber { get; set; }
}
}