This commit is contained in:
2018-09-05 23:05:43 +00:00
parent cd52c3e83f
commit 0a3c927429
6 changed files with 37 additions and 24 deletions

View File

@@ -11,19 +11,25 @@ namespace AyaNova.Models
public uint ConcurrencyToken { get; set; }
[Required]
public long OwnerId { get; set; }
[Required]
public long UserId { get; set; }
//-------------
public string EmailAddress { get; set; }
public decimal TimeZoneOffset { get; set; }
public int UiColor { get; set; }
public UserOptions(long userId, long ownerId)
//relations
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
public User User { get; set; }
[Required]
public long UserId { get; set; }//will be auto-set by EF due to relationship defined
public UserOptions(long ownerId)
{
UserId=userId;
TimeZoneOffset=0;
UiColor=0;
OwnerId=ownerId;
TimeZoneOffset = 0;
UiColor = 0;
OwnerId = ownerId;
}
}