35 lines
843 B
Go
35 lines
843 B
Go
package model
|
||
|
||
import "blazing/cool"
|
||
|
||
const TableNameSignIn = "config_sign_in"
|
||
|
||
const (
|
||
SignTypeTotal uint32 = 1
|
||
SignTypeContinuous uint32 = 2
|
||
)
|
||
|
||
// SignIn 签到阶段配置表。
|
||
type SignIn struct {
|
||
*BaseConfig
|
||
SignType uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage;comment:'签到类别(1-累计 2-连续)'" json:"sign_type"`
|
||
StageDays uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage;comment:'签到阶段天数(0/1/3/7/14/30)'" json:"stage_days"`
|
||
CdkID uint32 `gorm:"not null;uniqueIndex;comment:'绑定的CDK配置ID'" json:"cdk_id"`
|
||
}
|
||
|
||
func (*SignIn) TableName() string {
|
||
return TableNameSignIn
|
||
}
|
||
|
||
func (*SignIn) GroupName() string {
|
||
return "default"
|
||
}
|
||
|
||
func NewSignIn() *SignIn {
|
||
return &SignIn{BaseConfig: NewBaseConfig()}
|
||
}
|
||
|
||
func init() {
|
||
cool.CreateTable(&SignIn{})
|
||
}
|