// 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

import (
	"time"
)

const TableNameUserGameTickets = "user_game_tickets"

// UserGameTickets 用户游戏资格
type UserGameTickets struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CreatedAt   time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP(3)" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP(3)" json:"updated_at"`
	UserID      int64     `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"`                         // 用户ID
	GameCode    string    `gorm:"column:game_code;not null;default:minesweeper;comment:游戏代码" json:"game_code"` // 游戏代码
	Available   int32     `gorm:"column:available;not null;comment:可用次数" json:"available"`                     // 可用次数
	TotalEarned int32     `gorm:"column:total_earned;not null;comment:累计获得" json:"total_earned"`               // 累计获得
	TotalUsed   int32     `gorm:"column:total_used;not null;comment:累计使用" json:"total_used"`                   // 累计使用
}

// TableName UserGameTickets's table name
func (*UserGameTickets) TableName() string {
	return TableNameUserGameTickets
}
