using Business.Core.Attributes;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Business.Domain
{
///
/// 物料采购报价单
///
[CollectionName("dopbase", "srm_purchase")]
[Comment("物料采购报价单")]
[Index(nameof(number), nameof(supplier_number), nameof(tenant_id), nameof(company_id), nameof(factory_id), IsUnique = true)]
public class srm_purchase : BaseEntity
{
public srm_purchase(long Id) : base(Id)
{
}
///
/// 物料id
///
[Required]
[Comment("物料id")]
public long icitem_id { get; set; }
///
/// 公司引用id
///
[Comment("公司引用id")]
public long company_ref_id { get; set; }
///
/// 工厂引用id
///
[Comment("工厂引用id")]
public long factory_ref_id { get; set; }
///
/// 域编码
///
[StringLength(50)]
[Comment("域编码")]
public string domain_code { get; set; }
///
/// 物料编码
/// ]
[StringLength(20)]
[Comment("物料编码")]
public string number { get; set; }
///
/// 物料名称
///
[StringLength(80)]
[Comment("物料名称")]
public string icitem_name { get; set; }
///
/// 货源清单编号
///
[Comment("货源清单编号")]
[StringLength(80)]
public string sourcelist_number { get; set; }
///
/// 供应商id
///
[Comment("供应商id")]
public long? supplier_id { get; set; }
///
/// 供应商编码
///
[StringLength(80)]
[Comment("供应商编码")]
public string supplier_number { get; set; }
///
/// 供应商名称
///
[StringLength(80)]
[Comment("供应商名称")]
public string supplier_name { get; set; }
///
/// 采购组
///
[StringLength(80)]
[Comment("采购组")]
public string purchgroup { get; set; }
///
/// 采购员
///
[StringLength(80)]
[Comment("采购员")]
public string purcher { get; set; }
///
/// 采购计量单位
///
[StringLength(80)]
[Comment("采购计量单位")]
public string purchase_unit { get; set; }
///
/// 采购净价(不含税)
///
[Precision(23, 10)]
[Comment("采购净价(不含税)")]
public decimal? netpurchase_price { get; set; }
///
/// 税率
///
[Precision(23, 10)]
[Comment("税率")]
public decimal? taxrate { get; set; }
///
/// 币种
///
[Comment("币种")]
public long? currency_type { get; set; }
///
/// 采购负责人
///
[StringLength(80)]
[Comment("采购负责人")]
public string order_rector_name { get; set; }
///
/// 采购负责人_工号
///
[StringLength(80)]
[Comment("采购负责人_工号")]
public string order_rector_num { get; set; }
///
/// 工厂编码
///
[StringLength(80)]
[Comment("工厂编码")]
public string factory_code { get; set; }
///
/// 采购部门
///
[StringLength(80)]
[Comment("采购部门")]
public string order_dept { get; set; }
///
/// 采购单价
///
[Precision(23, 10)]
[Comment("采购单价")]
public decimal? order_price { get; set; }
///
/// 销售单价
///
[Precision(23, 10)]
[Comment("销售单价")]
public decimal? sale_price { get; set; }
///
/// 最小订货量
///
[Precision(23, 10)]
[Comment("最小订货量")]
public decimal? qty_min { get; set; }
///
/// 批量增量
///
[Precision(23, 10)]
[Comment("批量增量")]
public decimal? batch_append_qty { get; set; }
/*///
/// 是否周期送货
///
[Comment("是否周期送货")]
public bool is_week { get; set; }
///
/// 每周几送货
///
[StringLength(80)]
[Comment("每周几送货")]
public string is_days { get; set; }*/
///
/// 计算ID
///
[Comment("计算id")]
[NotMapped]
public long? bang_id { get; set; }
///
/// 供应类别
///
[StringLength(80)]
[Comment("供应类别")]
public string supplier_type { get; set; }
///
/// 关税
///
[Precision(18, 5)]
[Comment("关税")]
public decimal? tariff { get; set; }
///
/// 运费
///
[Precision(18, 5)]
[Comment("运费")]
public decimal? freight { get; set; }
///
/// 生效日期
///
[Comment("生效日期")]
public DateTime? effective_date { get; set; }
///
/// 失效日期
///
[Comment("失效日期")]
public DateTime? expiring_date { get; set; }
///
/// 配额比例
///
[Precision(18, 5)]
[Comment("配额比例")]
public decimal? quota_rate { get; set; }
///
/// 采购提前期
///
[Precision(18, 5)]
[Comment("采购提前期")]
public decimal? lead_time { get; set; }
///
/// 价格条款
///
[StringLength(64)]
[Comment("价格条款")]
public string? price_terms { get; set; }
///
/// 每箱包装数量
///
[Precision(18, 5)]
[Comment("每箱包装数量")]
public decimal? packaging_qty { get; set; }
///
/// 采购类型 0,采购申请 1,要货令
///
[Comment("采购类型")]
public int IsRequireGoods { get; set; }
///
/// 配额优先级
///
[Comment("配额优先级")]
public int quota_priority { get; set; }
///
/// 失效
///
[StringLength(64)]
[Comment("失效")]
public string? is_active { get; set; }
///
/// 创建用户
///
[StringLength(100)]
[Comment("创建用户")]
public string? create_user { get; set; }
///
/// 更新用户
///
[StringLength(100)]
[Comment("更新用户")]
public string? update_user { get; set; }
///
/// 是否按周送货
///
[Comment("是否按周送货")]
public bool? is_week { get; set; }
///
/// 周期送货日
///
[StringLength(255)]
[Comment("周期送货日")]
public string? is_days { get; set; }
}
}