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

namespace HyperBooru;

[Index(nameof(Guid))]
public class HBObject {
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public         int                ObjectId { get; set; }
    public         Guid               Guid     { get; set; } = Guid.NewGuid();
    public virtual List<Tag>          Tags     { get; set; } = new();
    [ForeignKey("AclId")]
    public         Acl?               Acl      { get; set; }
    public         SecurityIdentifier Owner    { get; set; } =
        new SecurityIdentifier(WellKnownSidType.WorldSid);
}