summaryrefslogtreecommitdiff
path: root/LocalPrincipal.cs
blob: 35ff3106c025efe517ed45b437755aee4ec101ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace HyperBooru;

[Index(nameof(Name))]
[Index(nameof(Sid))]
public class LocalPrincipal : IPrincipal {
    [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 {
    public string PasswordHash { get; set; }
}

public class LocalGroup : LocalPrincipal, IGroup {}