feat: delete news, tag, and category

This commit is contained in:
ericprd
2025-03-05 23:55:41 +08:00
parent 299fcf949b
commit d217ec8a62
21 changed files with 131 additions and 16 deletions
+2
View File
@@ -11,4 +11,6 @@ type Category struct {
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
DeletedAt time.Time `gorm:"default:null" json:"deleted_at"`
News []News `gorm:"many2many:news_categories" json:"news"`
}
@@ -11,4 +11,6 @@ type Tag struct {
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
DeletedAt time.Time `gorm:"default:null" json:"deleted_at"`
News []News `gorm:"many2many:news_tags" json:"news"`
}