Add registration Settings

This commit is contained in:
2025-10-24 08:25:16 +08:00
parent 1aff8ff459
commit 3d4f3e3f82
7 changed files with 511 additions and 25 deletions

View File

@@ -56,6 +56,8 @@ type App struct {
// 机器码验证相关字段
// MachineCodeVerify机器码验证0=关闭1=开启)
MachineCodeVerify int `gorm:"default:0;not null;comment:机器码验证0=关闭1=开启" json:"machine_code_verify"`
// MachineCodeRebindEnabled机器码重绑开关0=关闭1=开启)
MachineCodeRebindEnabled int `gorm:"default:0;not null;comment:机器码重绑开关0=关闭1=开启" json:"machine_code_rebind_enabled"`
// MachineCodeOption机器码选项0=每天1=永久)
MachineCodeOption int `gorm:"default:0;not null;comment:机器码选项0=每天1=永久" json:"machine_code_option"`
// MachineCodeFreeCount机器码免费次数默认0
@@ -68,6 +70,8 @@ type App struct {
// IP地址验证相关字段
// IPVerifyIP地址验证0=关闭1=开启2=开启(市)3=开启(省)
IPVerify int `gorm:"default:0;not null;comment:IP地址验证0=关闭1=开启2=开启(市)3=开启(省)" json:"ip_verify"`
// IPRebindEnabledIP地址重绑开关0=关闭1=开启)
IPRebindEnabled int `gorm:"default:0;not null;comment:IP地址重绑开关0=关闭1=开启" json:"ip_rebind_enabled"`
// IPOptionIP地址选项0=每天1=永久)
IPOption int `gorm:"default:0;not null;comment:IP地址选项0=每天1=永久" json:"ip_option"`
// IPFreeCountIP地址免费次数默认0
@@ -77,6 +81,24 @@ type App struct {
// IPRebindDeductIP地址重绑扣除默认0单位分钟
IPRebindDeduct int `gorm:"default:0;not null;comment:IP地址重绑扣除单位分钟" json:"ip_rebind_deduct"`
// 账号注册相关字段
// RegisterEnabled账号注册开关0=关闭1=开启)
RegisterEnabled int `gorm:"default:1;not null;comment:账号注册开关0=关闭1=开启" json:"register_enabled"`
// RegisterLimitEnabled注册限制开关0=关闭1=开启)
RegisterLimitEnabled int `gorm:"default:0;not null;comment:注册限制开关0=关闭1=开启" json:"register_limit_enabled"`
// RegisterLimitTime限制时间0=每天1=永久)
RegisterLimitTime int `gorm:"default:1;not null;comment:注册限制时间0=每天1=永久" json:"register_limit_time"`
// RegisterCount注册次数
RegisterCount int `gorm:"default:1;not null;comment:注册次数" json:"register_count"`
// 领取试用相关字段
// TrialEnabled领取试用开关0=关闭1=开启)
TrialEnabled int `gorm:"default:0;not null;comment:领取试用开关0=关闭1=开启" json:"trial_enabled"`
// TrialLimitTime试用限制时间0=每天1=永久)
TrialLimitTime int `gorm:"default:1;not null;comment:试用限制时间0=每天1=永久" json:"trial_limit_time"`
// TrialDuration试用时间单位分钟
TrialDuration int `gorm:"default:0;not null;comment:试用时间,单位分钟" json:"trial_duration"`
// CreatedAt/UpdatedAt时间字段返回为 created_at/updated_at便于前端展示
CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`