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

namespace HyperBooru;

[Index(nameof(Guid))]
public class DbObject {
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public         int         ObjectId   { get; set; }
    public         Guid        Guid       { get; set; } = Guid.NewGuid();
    public         ObjectType  ObjectType { get; set; }
    public virtual List<DbTag> Tags       { get; set; }
}