2017-01-17 18:32:40 -08:00
|
|
|
|
namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate
|
2016-11-21 12:41:36 +01:00
|
|
|
|
{
|
|
|
|
|
using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork;
|
2016-11-24 14:59:25 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
|
|
|
|
public class Buyer
|
|
|
|
|
:Entity,IAggregateRoot
|
|
|
|
|
{
|
|
|
|
|
public string FullName { get; private set; }
|
|
|
|
|
|
2016-11-24 14:59:25 +01:00
|
|
|
|
public HashSet<Payment> Payments { get; private set; }
|
|
|
|
|
|
2016-11-21 12:41:36 +01:00
|
|
|
|
protected Buyer() { }
|
2016-11-24 14:59:25 +01:00
|
|
|
|
|
2017-01-18 16:51:44 -08:00
|
|
|
|
public Buyer(string IdentityGuid)
|
2016-11-24 14:59:25 +01:00
|
|
|
|
{
|
2017-01-18 16:51:44 -08:00
|
|
|
|
if (String.IsNullOrWhiteSpace(IdentityGuid))
|
2016-11-24 14:59:25 +01:00
|
|
|
|
{
|
2017-01-18 16:51:44 -08:00
|
|
|
|
throw new ArgumentNullException(nameof(IdentityGuid));
|
2016-11-24 14:59:25 +01:00
|
|
|
|
}
|
|
|
|
|
|
2017-01-18 16:51:44 -08:00
|
|
|
|
this.FullName = IdentityGuid;
|
2016-11-24 14:59:25 +01:00
|
|
|
|
this.Payments = new HashSet<Payment>();
|
|
|
|
|
}
|
2016-11-21 12:41:36 +01:00
|
|
|
|
}
|
|
|
|
|
}
|