diff options
Diffstat (limited to 'LocalPrincipal.cs')
| -rw-r--r-- | LocalPrincipal.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/LocalPrincipal.cs b/LocalPrincipal.cs index 36428ef..35ff310 100644 --- a/LocalPrincipal.cs +++ b/LocalPrincipal.cs @@ -1,13 +1,16 @@ using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations.Schema; namespace HyperBooru; [Index(nameof(Name))] [Index(nameof(Sid))] public class LocalPrincipal : IPrincipal { - public string Name { get; set; } - public SecurityIdentifier Sid { get; set; } - public List<LocalGroup> MemberOf { get; set; } + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int LocalPrincipalId { get; set; } + public string Name { get; set; } + public SecurityIdentifier Sid { get; set; } + public List<LocalGroup> MemberOf { get; set; } } public class LocalUser : LocalPrincipal, IUser { |
