Documentation ¶
Index ¶
- func AwardsInfo(c *gin.Context)
- func DrawTimes(c *gin.Context)
- func LoadRouter(_ *gin.RouterGroup, infoGroup *gin.RouterGroup)
- func LotteryInfo(c *gin.Context)
- func WinInfo(c *gin.Context)
- type AwardInfoRes
- type AwardInfos
- type AwardItem
- type Awards
- type Lotteries
- type LotteryInfoRes
- type Users
- type WinItem
- type WinningInfoRes
- type WinningInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AwardInfoRes ¶
type AwardInfoRes struct { LotteryId uint64 `json:"lottery_id"` LotteryTitle string `json:"lottery_title"` LotteryDescription string `json:"lottery_description"` Awards []AwardItem `json:"awards"` Page uint64 `json:"page"` Rows uint64 `json:"rows"` Total int64 `json:"total"` }
AwardInfoRes: struct for AwardsInfo()
type AwardInfos ¶
type AwardInfos struct { ID uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null" json:"-"` Lottery uint64 `gorm:"column:lottery;type:bigint unsigned;not null" json:"lottery"` Fkey Lotteries `gorm:"foreignkey:Lottery;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Name string `gorm:"column:name;type:varchar(32)" json:"name"` Type int64 `gorm:"column:type;type:bigint" json:"type"` Description string `gorm:"column:description;type:text" json:"description"` Pic string `gorm:"column:pic;type:text" json:"pic"` Total uint64 `gorm:"column:total;type:bigint" json:"total"` DisplayRate uint64 `gorm:"column:display_rate;type:bigint" json:"display_rate"` Rate uint64 `gorm:"column:rate;type:bigint" json:"rate"` Value uint64 `gorm:"column:value;type:bigint" json:"value"` }
AwardInfos: struct for award_infos
func (*AwardInfos) TableName ¶
func (m *AwardInfos) TableName() string
type Awards ¶
type Awards struct { Award uint64 `gorm:"primaryKey;column:award;type:bigint unsigned;not null" json:"-"` Fkey2 AwardInfos `gorm:"foreignkey:Award;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Lottery uint64 `gorm:"index:idx_awards_lottery;column:lottery;type:bigint unsigned;not null" json:"lottery"` Fkey1 Lotteries `gorm:"foreignkey:Lottery;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Remain int64 `gorm:"column:remain;type:bigint" json:"remain"` }
Awards [...]
type Lotteries ¶
type Lotteries struct { ID uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null" json:"lottery_id"` Title string `gorm:"column:title;type:varchar(32);not null" json:"lottery_title"` Description string `gorm:"column:description;type:text" json:"lottery_description"` Permanent uint64 `gorm:"column:permanent;type:bigint" json:"permanent"` Temporary uint64 `gorm:"column:temporary;type:bigint" json:"temporary"` StartTime time.Time `gorm:"column:start_time;type:datetime(3)" json:"start_time"` EndTime time.Time `gorm:"column:end_time;type:datetime(3)" json:"end_time"` }
Lotteries: struct for lotteries
func QueryLotteryById ¶
type LotteryInfoRes ¶
type LotteryInfoRes struct { LotteryItems []Lotteries `json:"lottery_items"` Page uint64 `json:"page"` Rows uint64 `json:"rows"` Total int64 `json:"total"` }
LotteryInfoRes: struct for LotteryInfo()
type Users ¶
type Users struct { ID uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null" json:"-"` AccessToken string `gorm:"column:access_token;type:varchar(128)" json:"-"` TokenType uint64 `gorm:"column:token_type;type:bigint" json:"-"` Role uint64 `gorm:"column:role;type:bigint" json:"role"` CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` }
Users [...]
type WinningInfoRes ¶
type WinningInfos ¶
type WinningInfos struct { ID uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null" json:"-"` User uint64 `gorm:"index:idx_winning_infos_user;column:user;type:bigint unsigned;not null" json:"user"` Fkey1 Users `gorm:"foreignkey:User;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Award uint64 `gorm:"index:idx_winning_infos_award;column:award;type:bigint unsigned;not null" json:"award"` Fkey2 AwardInfos `gorm:"foreignkey:Award;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Lottery uint64 `gorm:"index:idx_winning_infos_lottery;column:lottery;type:bigint unsigned;not null" json:"lottery"` Fkey3 Lotteries `gorm:"foreignkey:Lottery;association_foreignkey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Address string `gorm:"column:address;type:tinytext" json:"address"` Handout bool `gorm:"column:handout;type:tinyint(1);default:0" json:"handout"` }
WinningInfo: struct for winning_infos
func (*WinningInfos) TableName ¶
func (m *WinningInfos) TableName() string
TableName get sql table name.
Click to show internal directories.
Click to hide internal directories.