// 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 TableNameChangedStatistic = "changed_statistics"

// ChangedStatistic mapped from table <changed_statistics>
type ChangedStatistic struct {
	ID        int64  `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
	ChannelID string `gorm:"column:channel_id;type:varchar(128);not null;uniqueIndex:channel_id,priority:1;default:0" json:"channel_id"` // 渠道ID
	ServerID  int32  `gorm:"column:server_id;type:int(11);not null;index:server_id,priority:1;default:1" json:"server_id"`               // 服务器ID
	Type      int32  `gorm:"column:type;type:int(11);not null;uniqueIndex:channel_id,priority:2;index:type_2,priority:1" json:"type"`    // 消费类型
	Source    int32  `gorm:"column:source;type:int(11);not null;uniqueIndex:channel_id,priority:3" json:"source"`                        // 消费来源
	Amount    int64  `gorm:"column:amount;type:bigint(20);not null" json:"amount"`                                                       // 消费金额
	Players   string `gorm:"column:players;type:longtext;not null" json:"players"`                                                       // 消费玩家ID集合
	Counts    int64  `gorm:"column:counts;type:bigint(20);not null" json:"counts"`                                                       // 消费次数
	Date      string `gorm:"column:date;type:date;not null;uniqueIndex:channel_id,priority:4" json:"date"`                               // 日期
}

// TableName ChangedStatistic's table name
func (*ChangedStatistic) TableName() string {
	return TableNameChangedStatistic
}
