read_count.go 764 B

123456789101112131415161718192021
  1. // 自动生成模板ReadCount
  2. package autocode
  3. import (
  4. "github.com/flipped-aurora/gin-vue-admin/server/global"
  5. )
  6. // ReadCount 结构体
  7. // 如果含有time.Time 请自行import time包
  8. type ReadCount struct {
  9. global.GVA_MODEL
  10. ProblemId uint `json:"problemId" form:"problemId" gorm:"column:problem_id;comment:问题id;type:bigint"`
  11. UserId uint `json:"userId" form:"userId" gorm:"column:user_id;comment:阅读人id;type:bigint"`
  12. UserName string `json:"userName" form:"userName" gorm:"column:user_name;comment:阅读人用户名;type:varchar(255);"`
  13. Count *int `json:"count" form:"count" gorm:"default:1;column:count;comment:阅读次数;type:int"`
  14. }
  15. // TableName ReadCount 表名
  16. func (ReadCount) TableName() string {
  17. return "read_count"
  18. }