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.
go-fly/models/abouts.go

21 lines
532 B

package models
type About struct {
ID uint `gorm:"primary_key" json:"id"`
TitleCn string `json:"title_cn"`
TitleEn string `json:"title_en"`
KeywordsCn string `json:"keywords_cn"`
KeywordsEn string `json:"keywords_en"`
DescCn string `json:"desc_cn"`
DescEn string `json:"desc_en"`
CssJs string `json:"css_js"`
HtmlCn string `json:"html_cn"`
HtmlEn string `json:"html_en"`
}
func FindAboutByPage(page interface{}) About {
var a About
DB.Where("page = ?", page).First(&a)
return a
}