using DomainObjects.Abstractions;
using DomainObjects.Enumerations;

namespace DomainObjects.Documents;

public class UserDocument : DomainObjectDocumentBase<UserDocument> {

  public List<Guid> Sites { get; set; }

  public DateTime Created { get; set; }

  public string Username { get; set; }

  public Passwords Passwords { get; set; }

  public string Name { get; set; }

  public string LastName { get; set; }

  public List<Contact> Contacts { get; set; }
    
  public Address BillingAddress { get; set; }
    
  public Address ShippingAddress { get; set; }

  public List<Token> Tokens { get; set; }

  public Roles Role { get; set; }

  public void SetPassword (string password) {
    if (Passwords.Password != null)
      Passwords.Expired.Add(Passwords.Password.Prototype());

    Passwords.Password = new Password(password);
  }

  public override int GetHashCode() {
    throw new NotImplementedException();
  }
}
