info.go 907 B

1234567891011121314151617181920
  1. package model
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/global"
  4. "gorm.io/datatypes"
  5. )
  6. // Info 公告 结构体
  7. type Info struct {
  8. global.GVA_MODEL
  9. Title string `json:"title" form:"title" gorm:"column:title;comment:公告标题;"` //标题
  10. Content string `json:"content" form:"content" gorm:"column:content;comment:公告内容;type:text;"` //内容
  11. UserID *int `json:"userID" form:"userID" gorm:"column:user_id;comment:发布者;"` //作者
  12. Attachments datatypes.JSON `json:"attachments" form:"attachments" gorm:"column:attachments;comment:相关附件;" swaggertype:"array,object"` //附件
  13. }
  14. // TableName 公告 Info自定义表名 gva_announcements_info
  15. func (Info) TableName() string {
  16. return "gva_announcements_info"
  17. }