// 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 TableNameLivestreamPrizes = "livestream_prizes"

// LivestreamPrizes 直播间奖品表
type LivestreamPrizes struct {
	ID         int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"`                         // 主键ID
	ActivityID int64     `gorm:"column:activity_id;not null;comment:关联livestream_activities.id" json:"activity_id"`      // 关联livestream_activities.id
	Name       string    `gorm:"column:name;not null;comment:奖品名称" json:"name"`                                          // 奖品名称
	Image      string    `gorm:"column:image;comment:奖品图片" json:"image"`                                                 // 奖品图片
	Weight     int32     `gorm:"column:weight;not null;default:1;comment:抽奖权重" json:"weight"`                            // 抽奖权重
	Quantity   int32     `gorm:"column:quantity;not null;default:-1;comment:库存数量(-1=无限)" json:"quantity"`                // 库存数量(-1=无限)
	Remaining  int32     `gorm:"column:remaining;not null;default:-1;comment:剩余数量" json:"remaining"`                     // 剩余数量
	Level      int32     `gorm:"column:level;not null;default:1;comment:奖品等级" json:"level"`                              // 奖品等级
	ProductID  int64     `gorm:"column:product_id;comment:关联系统商品ID" json:"product_id"`                                   // 关联系统商品ID
	Sort       int32     `gorm:"column:sort;not null;comment:排序" json:"sort"`                                            // 排序
	CreatedAt  time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"created_at"` // 创建时间
	UpdatedAt  time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP(3);comment:更新时间" json:"updated_at"` // 更新时间
	CostPrice  int64     `gorm:"column:cost_price;comment:成本价(分)" json:"cost_price"`                                     // 成本价(分)
}

// TableName LivestreamPrizes's table name
func (*LivestreamPrizes) TableName() string {
	return TableNameLivestreamPrizes
}
