You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
452 B
19 lines
452 B
3 months ago
|
package models
|
||
|
|
||
|
type Content struct {
|
||
|
// body
|
||
|
Title string `gorm:"type:varchar(255)" json:"title"`
|
||
|
Summary string `gorm:"type:varchar(1023)" json:"summary"`
|
||
|
Body string `gorm:"type:text" json:"body"`
|
||
|
State bool `gorm:"" json:"state"`
|
||
|
Order int `gorm:"" json:"order"`
|
||
|
UserID uint `gorm:"" json:"userID"`
|
||
|
|
||
|
// basic models
|
||
|
Model
|
||
|
|
||
|
// association
|
||
|
Tags []Tag `json:"tags" gorm:"many2many:contentATag"`
|
||
|
User User `json:"user"`
|
||
|
}
|