Compare commits

..

No commits in common. "main" and "v0.0.55" have entirely different histories.

2 changed files with 23 additions and 23 deletions

View File

@ -58,8 +58,8 @@ var (
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
const (
signKey = "1F36659EC27CFFF849E068EA80B1A4CA"
LICENCE_KEY = "BLOCKS_KEY"
signKey = "8E853B589944FF7A56BEF02AAA51D6F4"
LICENCE_KEY = "TRAIN_LICENCE_KEY"
)
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -69,13 +69,13 @@ func init() {
}
func WatchCheckLicence(licPath, licName string) {
utils.SetInterval(func() {
for {
if CheckLicence(licPath, licName) == false {
log.Println("授权文件失效,请重新部署授权文件:", licPath)
os.Exit(99)
}
}, time.Hour*1)
time.Sleep(time.Hour * 1)
}
}
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -10,42 +10,42 @@ type (
// sql options
SqlOptions struct {
MaxIdleConns int `gorm:"column:max_idle_conns;" json:"max_idle_conns"`
MaxOpenConns int `gorm:"column:max_open_conns;" json:"max_open_conns"`
MaxIdleConns int
MaxOpenConns int
ConnMaxLifetime time.Duration
LogStdout bool `gorm:"column:log_stdout;" json:"log_stdout"`
Debug bool `gorm:"column:debug;" json:"debug"`
LogStdout bool
Debug bool
}
// standard ID,Identity definition.
Std_IDIdentity struct {
ID uint `gorm:"column:id;primarykey;" json:"id"`
ID uint `gorm:"primarykey;" json:"id"`
Identity string `gorm:"column:identity;type:varchar(36);uniqueIndex;" json:"identity"` // 唯一标识24位NanoID,36位为ULID
}
// standard ID,Created,Updated,Deleted definition.
Std_IICUDS struct {
ID uint `gorm:"column:id;primarykey;" json:"id"`
ID uint `gorm:"primarykey;" json:"id"`
Identity string `gorm:"column:identity;type:varchar(36);uniqueIndex;" json:"identity"` // 唯一标识24位NanoID,36位为ULID
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;" json:"deleted_at"`
Status int8 `gorm:"column:status;default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常
CreatedAt time.Time `gorm:"" json:"created_at"`
UpdatedAt time.Time `gorm:"" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"`
Status int8 `gorm:"default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常
}
// standard ID,Identity,Created,Updated,Deleted,Status definition.
Std_ICUD struct {
ID uint `gorm:"column:id;primarykey;" json:"id"`
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;" json:"deleted_at"`
ID uint `gorm:"primarykey;" json:"id"`
CreatedAt time.Time `gorm:"" json:"created_at"`
UpdatedAt time.Time `gorm:"" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"`
}
// standard ID,Created definition.
Std_IdCreated struct {
ID uint `gorm:"column:id;primarykey;" json:"id"`
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
ID uint `gorm:"primarykey;" json:"id"`
CreatedAt time.Time `gorm:"" json:"created_at"`
}
// standard PassportID,PassportIdentity definition.
@ -62,7 +62,7 @@ type (
// standard ID definition.
Std_ID struct {
ID uint `gorm:"column:id;primarykey;" json:"id"`
ID uint `gorm:"primarykey;" json:"id"`
}
// standard Identity definition.
@ -72,6 +72,6 @@ type (
// standard Status definition.
Std_Status struct {
Status int64 `gorm:"column:status;default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常
Status int64 `gorm:"default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常
}
)