Rest-API
在里面
Asp.net core
面对一个乏味的问题。
每次我都要验证我的数据
put/patch
数据会随时更新
SupplyOrderState
会改变的。
-
所有关系ID都有效
-
-
一旦订单被批准,您就不能编辑
-
检查订购的产品是否有效
,
public class SupplyOrder : BaseEntity
{
public long SupplierId { get; set; }
public Supplier Supplier { get; set; }
public DateTime CreationDate { get; set; }
public DateTime? DeliveredDate { get; set; }
public DateTime? CancellationDate { get; set; }
public long CostCenterId { get; set; }
public CostCenter CostCenter { get; set; }
public SupplyOrderStates SupplyOrderStates { get; set; }
public string ApproverUserId { get; set; }
public ApplicationUser ApproverUser { get; set; }
public string CancellerUserId { get; set; }
public ApplicationUser CancellerUser { get; set; }
public string ReceiverUserId { get; set; }
public ApplicationUser ReceiverUser { get; set; }
public ICollection<SupplyOrderDetail> SupplyOrderDetails { get; set; }
public ICollection<SupplyTransportationDocument> SupplyTransportationDocuments { get; set; }
}
public enum SupplyOrderStates
{
preApproved = 0,
approved = 1,
notApproved = 2,
delivered = 3,
partialDelivered = 4,
cancled = 5
}