// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

const TableNameTreasureLog = "treasure_log"

// TreasureLog mapped from table <treasure_log>
type TreasureLog struct {
	ID        int64  `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
	UserID    int64  `gorm:"column:user_id;type:bigint(20);not null;uniqueIndex:user_id,priority:1" json:"user_id"` // 用户ID
	ServerID  int32  `gorm:"column:server_id;type:int(11);not null;default:1" json:"server_id"`                     // 服务器ID
	EventID   int32  `gorm:"column:event_id;type:int(11);index:event_id,priority:1" json:"event_id"`                // 事件ID
	Type      int32  `gorm:"column:type;type:int(11)" json:"type"`                                                  // 宝物类型
	ItemID    int32  `gorm:"column:item_id;type:int(11)" json:"item_id"`                                            // 宝物碎片ID
	ItemCount int64  `gorm:"column:item_count;type:bigint(20)" json:"item_count"`                                   // 宝物碎片数量
	Level     int32  `gorm:"column:level;type:int(11)" json:"level"`                                                // 升级后等级
	Star      int32  `gorm:"column:star;type:int(11);not null" json:"star"`                                         // 升级后星级
	Date      string `gorm:"column:date;type:date;not null;index:date,priority:1" json:"date"`                      // 触发日期 2005-01-02
	EventAt   int32  `gorm:"column:event_at;type:int(11)" json:"event_at"`                                          // 触发时间戳
	EventAtNs int64  `gorm:"column:event_at_ns;type:bigint(20);uniqueIndex:user_id,priority:2" json:"event_at_ns"`  // 发生时间ns
}

// TableName TreasureLog's table name
func (*TreasureLog) TableName() string {
	return TableNameTreasureLog
}
