diff options
Diffstat (limited to 'src/DevHive.Data/Models')
| -rw-r--r-- | src/DevHive.Data/Models/Role.cs | 3 | ||||
| -rw-r--r-- | src/DevHive.Data/Models/User.cs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/DevHive.Data/Models/Role.cs b/src/DevHive.Data/Models/Role.cs index b4c7009..0bf2ab9 100644 --- a/src/DevHive.Data/Models/Role.cs +++ b/src/DevHive.Data/Models/Role.cs @@ -1,6 +1,7 @@ using System; using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations.Schema; +using System.Collections.Generic; namespace DevHive.Data.Models { @@ -8,5 +9,7 @@ namespace DevHive.Data.Models public class Role : IdentityRole<Guid> { public const string DefaultRole = "User"; + + public virtual List<User> Users { get; set; } } } diff --git a/src/DevHive.Data/Models/User.cs b/src/DevHive.Data/Models/User.cs index a3731cb..ecd7af8 100644 --- a/src/DevHive.Data/Models/User.cs +++ b/src/DevHive.Data/Models/User.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.AspNetCore.Identity; @@ -19,7 +20,7 @@ namespace DevHive.Data.Models public string ProfilePicture { get; set; } - public string Role { get; set; } + public virtual List<Role> Roles { get; set; } //public List<User> Friends { get; set; } } |
