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

namespace HyperBooru;

[AclType(typeof(ObjectPermissions))]
[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; } =
        WellKnownSid.WorldSid;
}