news.go 411 B

1234567891011121314151617
  1. package models
  2. import (
  3. "gorm.io/gorm"
  4. "html/template"
  5. )
  6. type News struct {
  7. gorm.Model
  8. Title string `json:"title"`
  9. Synopsis template.HTML `json:"synopsis"`
  10. Detail template.HTML `json:"detail"`
  11. Types string `json:"types"`
  12. IsActive bool `json:"is_active"` // 是否激活
  13. IsIndex bool `json:"is_index"` // 是否首页
  14. Image string `json:"image"`
  15. }