using Business.Core.Attributes; using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Business.Domain { /// /// 采购申请单 /// [CollectionName("dopbase", "srm_pr_main")] [Comment("采购申请单")] [Index(nameof(pr_billno), nameof(tenant_id), nameof(company_id), nameof(factory_id), IsUnique = true)] public class srm_pr_main : BaseEntity { /// /// pr单号 /// [StringLength(80)] [Comment("pr单号")] public string pr_billno { get; set; } /// /// 关联工单号 /// [StringLength(80)] [Comment("关联工单号")] public string pr_mono { get; set; } /// /// 关联的pr单号 /// [StringLength(80)] [Comment("关联pr单号")] public string refer_pr_billno { get; set; } /// /// 工单行号 /// [Comment("工单行号")] public int? entity_id { get; set; } /// /// 供应商id /// [Required] [Comment("供应商id")] public long? pr_purchaseid { get; set; } /// /// 供应商编码 /// [StringLength(80)] [Comment("供应商编码")] public string pr_purchasenumber { get; set; } /// /// 供应商名称 /// [StringLength(80)] [Comment("供应商名称")] public string pr_purchasename { get; set; } /// /// 采购员 /// [StringLength(80)] [Comment("采购员")] public string pr_purchaser { get; set; } /// /// 采购员工号(采购信息表) /// [StringLength(80)] [Comment("采购员工号")] public string pr_purchaser_num { get; set; } /// /// 需求数量 /// [Precision(23, 10)] [Comment("需求数量")] public decimal? pr_rqty { get; set; } /// /// 申请数量 /// [Precision(23, 10)] [Comment("申请数量")] public decimal? pr_aqty { get; set; } /// /// 建议数量 /// [Precision(23, 10)] [Comment("建议数量")] public decimal? pr_sqty { get; set; } /// /// 物料id /// [Required] [Comment("物料id")] public long? icitem_id { get; set; } /// /// 物料名称 /// [StringLength(80)] [Comment("物料名称")] public string icitem_name { get; set; } /// /// 单据类型 /// [Comment("单据类型")] public int? pr_order_type { get; set; } /// /// 系统建议下单日期 /// [Comment("系统建议下单日期")] public DateTime? pr_ssend_date { get; set; } /// /// 系统建议到达日期(建议到货日期) /// [Comment("系统建议到达日期")] public DateTime? pr_sarrive_date { get; set; } /// /// 采购员建议到货日期 /// [Comment("采购员建议到货日期")] public DateTime? pr_bsarrive_date { get; set; } /// /// 订单到货日期 /// [Comment("订单到货日期")] public DateTime? pr_oarrive_date { get; set; } /// /// 计划下单日期 /// [Comment("计划下单日期")] public DateTime? pr_psend_date { get; set; } /// /// 计划到达日期 /// [Comment("计划到达日期")] public DateTime? pr_parrive_date { get; set; } /// /// 需求到货日期 /// [Comment("需求到货日期")] public DateTime? pr_rarrive_date { get; set; } /// /// 再计划到货日期 /// [Comment("再计划到货日期")] public DateTime? pr_rparrive_date { get; set; } /// /// 采购确认到货日期 /// [Comment("采购确认到货日期")] public DateTime? pr_pur_affirm_date { get; set; } /// /// 系统价格(含税) /// [Precision(23, 10)] [Comment("系统价格(含税)")] public decimal? pr_sysprice { get; set; } /// /// 订单价格(含税) /// [Precision(23, 10)] [Comment("订单价格(含税)")] public decimal? pr_orderprice { get; set; } /// /// 采购净价(不含税) /// [Precision(23, 10)] [Comment("采购净价(不含税)")] public decimal? pr_price { get; set; } /// /// 税率 /// [Precision(23, 10)] [Comment("税率")] public decimal? pr_rate { get; set; } /// /// 单位 /// [StringLength(20)] [Comment("单位")] public string pr_unit { get; set; } /// /// 状态 0,关闭;1,新增; 暂时不考虑这种状态,影响PR重新生成,如增加需调整PR代码。2,提交;3,未通过;4,评审通过 /// [Comment("状态")] public int? state { get; set; } /// /// 已申请数量 /// [Precision(23, 10)] [Comment("已申请数量")] public decimal? old_apply_aqty { get; set; } /// /// 申请类型 /// [Comment("申请类型")] public int? pr_type { get; set; } /// /// 币种 /// [Required] [Comment("币种")] public long? currencytype { get; set; } /// /// 安全库存触发采购比例 /// [Precision(23, 10)] [Comment("安全库存触发采购比例")] public decimal? secInv_ratio { get; set; } /// /// 备注 /// [StringLength(1000)] [Comment("备注")] public string remark { get; set; } /// /// 拒绝原因 /// [StringLength(1000)] [Comment("拒绝原因")] public string pr_rreason { get; set; } /// /// 计算ID /// [Comment("计算id")] [NotMapped] public long? bang_id { get; set; } /// /// 订单行id /// [Comment("订单行id")] public long? sentry_id { get; set; } /// /// 项次号 /// [StringLength(50)] [Comment("项次号")] public string? num { get; set; } /// /// 采购类型 0,采购申请 1,要货令 /// [Comment("采购类型")] public int IsRequireGoods { get; set; } /// /// 供应类别 /// [Comment("供应类别")] public string supplier_type { get; set; } } }