From f9d34b1d61c3877c64828e23a0090f49c7418928 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 29 Sep 2023 19:00:16 +1000 Subject: Updated DB schema --- LocalPrincipal.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'LocalPrincipal.cs') 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 MemberOf { get; set; } + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int LocalPrincipalId { get; set; } + public string Name { get; set; } + public SecurityIdentifier Sid { get; set; } + public List MemberOf { get; set; } } public class LocalUser : LocalPrincipal, IUser { -- cgit v1.3