chapter.gen.go 2.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. )
  8. const TableNameChapter = "chapter"
  9. // Chapter mapped from table <chapter>
  10. type Chapter struct {
  11. ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
  12. PlayerID int64 `gorm:"column:player_id;type:bigint(20);not null;index:player_id,priority:1" json:"player_id"` // 玩家ID
  13. ServerID int32 `gorm:"column:server_id;type:int(11);not null;index:server_id,priority:1;default:1" json:"server_id"` // 服务器ID
  14. ChapterID int32 `gorm:"column:chapter_id;type:int(11);not null" json:"chapter_id"` // 章节ID
  15. Degree string `gorm:"column:degree;type:varchar(125)" json:"degree"` // 难度系数
  16. ChallengeCount int32 `gorm:"column:challenge_count;type:int(11)" json:"challenge_count"` // 总挑战次数
  17. ClearanceCount int32 `gorm:"column:clearance_count;type:int(11)" json:"clearance_count"` // 通关次数
  18. FailCount int32 `gorm:"column:fail_count;type:int(11)" json:"fail_count"` // 失败次数
  19. Difficulty int32 `gorm:"column:difficulty;type:int(11)" json:"difficulty"` // 难度
  20. IsPass int32 `gorm:"column:is_pass;type:int(11)" json:"is_pass"` // 是否通关
  21. PassCount int32 `gorm:"column:pass_count;type:int(11)" json:"pass_count"` // 通关房间数
  22. CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间
  23. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"` // 更新时间
  24. }
  25. // TableName Chapter's table name
  26. func (*Chapter) TableName() string {
  27. return TableNameChapter
  28. }