Exemple #1
0
 internal Order(long id, long customerId, OrderReceiver orderReceiver, string remark = null)
 {
     this.Id         = Checker.GTZero(id, nameof(id));
     this.CustomerId = Checker.GTZero(customerId, nameof(customerId));
     this.Items      = new List <OrderItem>();
     this.Receiver   = Checker.NotNull(orderReceiver, nameof(orderReceiver));
     this.Status     = new OrderStatus(OrderStatusEnum.Creating);
     this.Remark     = remark;
     this.Amount     = 0;
 }
Exemple #2
0
 /// <summary>
 /// 调整收货信息
 /// </summary>
 /// <param name="orderReceiver"></param>
 public void ChangeReceiver(OrderReceiver orderReceiver)
 {
     Checker.NotNull(orderReceiver, nameof(orderReceiver));
     this.Receiver = orderReceiver;
 }