This commit is contained in:
2024-11-27 06:46:59 +08:00
parent 18cec4651e
commit b1b030acf3
2 changed files with 88 additions and 6 deletions

View File

@@ -109,6 +109,26 @@ func (User) TableName() string {
return "web_member"
}
type Game struct {
ID int `json:"id" gorm:"primaryKey"`
Title string `json:"title"`
Orientation string `json:"orientation"`
Device string `json:"device"`
Era string `json:"era"`
Tags string `json:"tags"`
UserId int `json:"user_id"`
Content string `json:"content"`
Image string `json:"image"`
Images string `json:"images"`
User User `json:"user" gorm:"foreignKey:UserId"`
CreateTime time.Time `json:"create_time"`
UpdateTime time.Time `json:"update_time"`
}
func (Game) TableName() string {
return "web_article"
}
type Article struct {
ID int `json:"id" db:"id" gorm:"primaryKey"`
Title string `json:"title" db:"title"`