aboutsummaryrefslogtreecommitdiff
path: root/entities/meta.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-06 18:26:15 +0530
committerBobby <[email protected]>2026-02-06 18:26:15 +0530
commit185d84e2dbe18dca60592bb33f491c5cd3d09403 (patch)
tree49ef4e02b9e83bce48610c0a44a457927bdc78c5 /entities/meta.go
parent31b5543be4faa4f01946d532d4b5e34828b285b5 (diff)
downloadmetachan-185d84e2dbe18dca60592bb33f491c5cd3d09403.tar.xz
metachan-185d84e2dbe18dca60592bb33f491c5cd3d09403.zip
Refactor database interactions: replace direct database calls with DB variable and implement batch creation for images and producers
Diffstat (limited to 'entities/meta.go')
-rw-r--r--entities/meta.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/entities/meta.go b/entities/meta.go
index deb1e08..57ebae7 100644
--- a/entities/meta.go
+++ b/entities/meta.go
@@ -69,11 +69,11 @@ type ExternalURL struct {
type SimpleTitle struct {
gorm.Model
- Type string `json:"type,omitempty"`
- Title string `json:"title,omitempty"`
+ Type string `gorm:"uniqueIndex:idx_simple_title" json:"type,omitempty"`
+ Title string `gorm:"uniqueIndex:idx_simple_title" json:"title,omitempty"`
}
type SimpleImage struct {
gorm.Model
- ImageURL string `json:"image_url,omitempty"`
+ ImageURL string `gorm:"uniqueIndex" json:"image_url,omitempty"`
}