advertisement_logs.gen.go 2.2 KB

123456789101112131415161718192021222324252627
  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 TableNameAdvertisementLog = "advertisement_logs"
  6. // AdvertisementLog mapped from table <advertisement_logs>
  7. type AdvertisementLog 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_p_e_at_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. PositionID int32 `gorm:"column:position_id;type:int(11) unsigned;not null;index:postion_id_event_id_at,priority:1;uniqueIndex:user_p_e_at_idx,priority:2" json:"position_id"` // 广告位id
  12. ChapterID int32 `gorm:"column:chapter_id;type:int(11);not null" json:"chapter_id"`
  13. EventID int32 `gorm:"column:event_id;type:int(11) unsigned;not null;index:postion_id_event_id_at,priority:2;uniqueIndex:user_p_e_at_idx,priority:3" json:"event_id"` // 触发事件 1 展示 2 点击 3 领取奖励
  14. EventAt int32 `gorm:"column:event_at;type:int(11) unsigned;not null;index:postion_id_event_id_at,priority:3;index:event_at,priority:1;uniqueIndex:user_p_e_at_idx,priority:4" json:"event_at"` // 事件触发的时间
  15. UserCreatedAt int32 `gorm:"column:user_created_at;type:int(11) unsigned;not null" json:"user_created_at"` // 用户注册时间
  16. Extra string `gorm:"column:extra;type:varchar(512)" json:"extra"` // 奖励
  17. Flag int32 `gorm:"column:flag;type:int(11)" json:"flag"`
  18. ChannelID string `gorm:"column:channel_id;type:varchar(128);index:channel_id,priority:1;default:0" json:"channel_id"`
  19. }
  20. // TableName AdvertisementLog's table name
  21. func (*AdvertisementLog) TableName() string {
  22. return TableNameAdvertisementLog
  23. }