user_chapter_logs.gen.go 2.1 KB

12345678910111213141516171819202122232425
  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. const TableNameUserChapterLog = "user_chapter_logs"
  6. // UserChapterLog mapped from table <user_chapter_logs>
  7. type UserChapterLog struct {
  8. ID int64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
  9. UserID int64 `gorm:"column:user_id;type:bigint(20) unsigned;not null;uniqueIndex:user_chapter_dif,priority:1;index:user_chapter_idx,priority:1" json:"user_id"`
  10. ServerID int32 `gorm:"column:server_id;type:int(11);not null;index:server_id,priority:1;default:1" json:"server_id"` // 服务器ID
  11. UserCreatedAt int32 `gorm:"column:user_created_at;type:int(11) unsigned;not null;index:user_create_idx,priority:1" json:"user_created_at"`
  12. ChapterID int32 `gorm:"column:chapter_id;type:int(11) unsigned;not null;uniqueIndex:user_chapter_dif,priority:2;index:user_chapter_idx,priority:2;index:user_create_idx,priority:2" json:"chapter_id"` // 当前关卡id,如果有新的关卡,则更新
  13. RoomID int32 `gorm:"column:room_id;type:int(11) unsigned;not null" json:"room_id"` // 进入房间id
  14. Difficulty int32 `gorm:"column:difficulty;type:int(11);not null;uniqueIndex:user_chapter_dif,priority:3" json:"difficulty"` // 困难度
  15. UpdatedAt int32 `gorm:"column:updated_at;type:int(11) unsigned;not null" json:"updated_at"` // 更新时间
  16. SettleRoomID int32 `gorm:"column:settle_room_id;type:int(11) unsigned;not null" json:"settle_room_id"` // 结算房间id
  17. }
  18. // TableName UserChapterLog's table name
  19. func (*UserChapterLog) TableName() string {
  20. return TableNameUserChapterLog
  21. }