package model

import (
	"time"

	"github.com/shopspring/decimal"
)

type GameLog struct {
	ID        int32 `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time

	UID           int32  //用户ID
	Pid           int32  //父ID
	ParentTree    string //树节点
	ParentTreeStr string //树节点字符串
	ExtraID       int32  //扩展ID
	Issue         string //期号
	BetType       string //下注类型
	GameID        int32  //游戏ID
	Username      string //用户名

	Balance         decimal.Decimal //投注后余额
	SumBetAmount    decimal.Decimal //总投注
	SumFrozenAmount decimal.Decimal //总冻结金额
	BetCount        string          //投注次数
	Amount          decimal.Decimal //洗码量
	GameTime        time.Time       //同步的游戏时间
	Settlement      int32           //是否结算0未结算1结算
	RoomID          string          //游戏房间号(局)
	OpenNumber      string          //开奖号码
	WinDesc         string          //描述

	LoseWin decimal.Decimal //输赢(赢减总投注)
	Win     decimal.Decimal //赢(包含本金)

	Kind  string //游戏类别(游戏名称)
	BetIP string //投注的IP

}

func (GameLog) TableName() string {
	return "game_log"
}
