diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-08 13:20:21 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-08 13:20:21 +1000 |
| commit | 701d474949e5cb72b8ed7b29fec45ad74580f570 (patch) | |
| tree | 0eea7adfdd9d7dde4dd44535cd172d7e6a4f8737 /DbObject.cs | |
Initial commit
Diffstat (limited to 'DbObject.cs')
| -rw-r--r-- | DbObject.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/DbObject.cs b/DbObject.cs new file mode 100644 index 0000000..f07b866 --- /dev/null +++ b/DbObject.cs @@ -0,0 +1,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; } +}
\ No newline at end of file |
