feat: create ads

This commit is contained in:
ericprd
2025-03-09 00:47:24 +08:00
parent 13c976dcbf
commit 213d370332
14 changed files with 289 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
package database
import "time"
type Ads struct {
ID string `gorm:"primaryKey;not null" json:"id"`
ImageUrl string `gorm:"not null" json:"image_url"`
Url string `gorm:"not null" json:"url"`
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
}
+1
View File
@@ -54,5 +54,6 @@ func (db *DB) Migrate() error {
&News{},
&Tag{},
&Category{},
&Ads{},
)
}