summaryrefslogtreecommitdiff
path: root/Tag.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-08-28 15:45:21 +1000
committerJake Mannens <jake@asger.xyz>2023-08-28 15:45:21 +1000
commit3be6ef65f4ecdfc564231b9e613b8a307dfdbe64 (patch)
treee7608e3d477073be45d76677ad5f0b2509e423c1 /Tag.cs
parentb8abec12a28f07e898b9ad38575fc1765188c286 (diff)
Gallery media is now filtered by tag using Object IDs rather than Guids, signficantly reducing DB overhead
Diffstat (limited to 'Tag.cs')
-rw-r--r--Tag.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tag.cs b/Tag.cs
index 81c5f67..0150b39 100644
--- a/Tag.cs
+++ b/Tag.cs
@@ -18,9 +18,11 @@ public class TagDefinition : HBObject {
}
public class Tag : HBObject {
- public virtual TagDefinition TagDefinition { get; set; }
- public DateTime CreateTime { get; set; } = DateTime.UtcNow;
- public virtual HBObject Target { get; set; }
+ [ForeignKey("ObjectId")]
+ public int TagDefinitionId { get; set; }
+ public virtual TagDefinition TagDefinition { get; set; }
+ public DateTime CreateTime { get; set; } = DateTime.UtcNow;
+ public virtual HBObject Target { get; set; }
public Tag() {}