This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
namespace AyaNova.Models
|
namespace AyaNova.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
//relations
|
//relations
|
||||||
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
|
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
|
||||||
|
[JsonIgnore]
|
||||||
public UserOptions UserOptions { get; set; }
|
public UserOptions UserOptions { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
namespace AyaNova.Models
|
namespace AyaNova.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
//relations
|
//relations
|
||||||
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
|
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
|
||||||
|
[JsonIgnore]
|
||||||
public User User { get; set; }
|
public User User { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public long UserId { get; set; }//will be auto-set by EF due to relationship defined
|
public long UserId { get; set; }//will be auto-set by EF due to relationship defined
|
||||||
@@ -26,7 +28,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
public UserOptions(long ownerId)
|
public UserOptions(long ownerId)
|
||||||
{
|
{
|
||||||
|
|
||||||
TimeZoneOffset = 0;
|
TimeZoneOffset = 0;
|
||||||
UiColor = 0;
|
UiColor = 0;
|
||||||
OwnerId = ownerId;
|
OwnerId = ownerId;
|
||||||
|
|||||||
Reference in New Issue
Block a user