mirror of
https://github.com/skyle1995/NetworkAuth.git
synced 2026-05-25 02:24:05 +08:00
Add binding Settings
This commit is contained in:
@@ -38,8 +38,10 @@ type App struct {
|
||||
DownloadType int `gorm:"default:0;not null;comment:更新方式,0=不启用更新,1=自动更新,2=手动下载" json:"download_type"`
|
||||
// DownloadURL:下载地址
|
||||
DownloadURL string `gorm:"size:500;comment:下载地址" json:"download_url"`
|
||||
|
||||
// Announcement:程序公告内容(base64编码存储)
|
||||
Announcement string `gorm:"type:text;comment:程序公告内容,base64编码存储" json:"announcement"`
|
||||
|
||||
// LoginType:登陆方式(0=顶号登录(默认),1=非顶号登录)
|
||||
LoginType int `gorm:"default:0;not null;comment:登陆方式,0=顶号登录,1=非顶号登录" json:"login_type"`
|
||||
// MultiOpenScope:多开范围(0=单电脑,1=单IP,2=全部电脑(默认))
|
||||
@@ -50,6 +52,31 @@ type App struct {
|
||||
CheckInterval int `gorm:"default:10;not null;comment:校验间隔,单位分钟" json:"check_interval"`
|
||||
// MultiOpenCount:多开数量(默认1)
|
||||
MultiOpenCount int `gorm:"default:1;not null;comment:多开数量" json:"multi_open_count"`
|
||||
|
||||
// 机器码验证相关字段
|
||||
// MachineCodeVerify:机器码验证(0=关闭,1=开启)
|
||||
MachineCodeVerify int `gorm:"default:0;not null;comment:机器码验证,0=关闭,1=开启" json:"machine_code_verify"`
|
||||
// MachineCodeOption:机器码选项(0=每天,1=永久)
|
||||
MachineCodeOption int `gorm:"default:0;not null;comment:机器码选项,0=每天,1=永久" json:"machine_code_option"`
|
||||
// MachineCodeFreeCount:机器码免费次数(默认0)
|
||||
MachineCodeFreeCount int `gorm:"default:0;not null;comment:机器码免费次数" json:"machine_code_free_count"`
|
||||
// MachineCodeRebindCount:机器码重绑次数(默认0)
|
||||
MachineCodeRebindCount int `gorm:"default:0;not null;comment:机器码重绑次数" json:"machine_code_rebind_count"`
|
||||
// MachineCodeRebindDeduct:机器码重绑扣除(默认0,单位:分钟)
|
||||
MachineCodeRebindDeduct int `gorm:"default:0;not null;comment:机器码重绑扣除,单位分钟" json:"machine_code_rebind_deduct"`
|
||||
|
||||
// IP地址验证相关字段
|
||||
// IPVerify:IP地址验证(0=关闭,1=开启,2=开启(市),3=开启(省))
|
||||
IPVerify int `gorm:"default:0;not null;comment:IP地址验证,0=关闭,1=开启,2=开启(市),3=开启(省)" json:"ip_verify"`
|
||||
// IPOption:IP地址选项(0=每天,1=永久)
|
||||
IPOption int `gorm:"default:0;not null;comment:IP地址选项,0=每天,1=永久" json:"ip_option"`
|
||||
// IPFreeCount:IP地址免费次数(默认0)
|
||||
IPFreeCount int `gorm:"default:0;not null;comment:IP地址免费次数" json:"ip_free_count"`
|
||||
// IPRebindCount:IP地址重绑次数(默认0)
|
||||
IPRebindCount int `gorm:"default:0;not null;comment:IP地址重绑次数" json:"ip_rebind_count"`
|
||||
// IPRebindDeduct:IP地址重绑扣除(默认0,单位:分钟)
|
||||
IPRebindDeduct int `gorm:"default:0;not null;comment:IP地址重绑扣除,单位分钟" json:"ip_rebind_deduct"`
|
||||
|
||||
// CreatedAt/UpdatedAt:时间字段,返回为 created_at/updated_at,便于前端展示
|
||||
CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`
|
||||
|
||||
Reference in New Issue
Block a user