// 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 TableNameOnlineDurationLog = "online_duration_logs"

// OnlineDurationLog mapped from table <online_duration_logs>
type OnlineDurationLog struct {
	ID            int64  `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
	ChannelID     string `gorm:"column:channel_id;type:varchar(128);index:channel_id,priority:1;default:0" json:"channel_id"` // 渠道ID
	Flag          int32  `gorm:"column:flag;type:int(11)" json:"flag"`
	UserID        int64  `gorm:"column:user_id;type:bigint(20) unsigned;not null;index:user_id,priority:1" json:"user_id"`     // 用户id
	ServerID      int32  `gorm:"column:server_id;type:int(11);not null;index:server_id,priority:1;default:1" json:"server_id"` // 服务器ID
	LoginAt       int32  `gorm:"column:login_at;type:int(11) unsigned;not null" json:"login_at"`
	LogoutAt      int32  `gorm:"column:logout_at;type:int(11) unsigned;not null;index:logout_created_at_idx,priority:1" json:"logout_at"`
	Duration      int32  `gorm:"column:duration;type:int(11) unsigned;not null" json:"duration"`                                                      // 在线时长
	UserCreatedAt int32  `gorm:"column:user_created_at;type:int(11) unsigned;not null;index:logout_created_at_idx,priority:2" json:"user_created_at"` // 用户创建时间
}

// TableName OnlineDurationLog's table name
func (*OnlineDurationLog) TableName() string {
	return TableNameOnlineDurationLog
}
