luckyWheelHistory.go 564 Bytes
Newer Older
hujiebin's avatar
hujiebin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
package luckyWheel_m

import (
	"git.hilo.cn/hilo-common/resource/mysql"
	"gorm.io/gorm"
)

type LuckyWheelHistory struct {
	mysql.Entity
	WheelId         uint64
	GroupId         string
	Creator         uint64
	EntranceFee     uint32
	PlayerNum       uint
	Winner          uint64
	WinnerAward     uint32
	GroupOwner      uint64
	GroupOwnerAward uint32
	EndStatus       uint8
}

func (lwh *LuckyWheelHistory) Create(db *gorm.DB) error {
	return db.Create(lwh).Error
}

func (lwh *LuckyWheelHistory) Get(db *gorm.DB) error {
	return db.Where(lwh).First(lwh).Error
}