mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-07 18:10:24 +08:00
优化商业版验证
This commit is contained in:
6
internal/db/models/authority/authority_key_dao_test.go
Normal file
6
internal/db/models/authority/authority_key_dao_test.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package authority_test
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
)
|
||||
@@ -2,6 +2,18 @@ package authority
|
||||
|
||||
import "github.com/iwind/TeaGo/dbs"
|
||||
|
||||
const (
|
||||
AuthorityKeyField_Id dbs.FieldName = "id" // ID
|
||||
AuthorityKeyField_Value dbs.FieldName = "value" // Key值
|
||||
AuthorityKeyField_DayFrom dbs.FieldName = "dayFrom" // 开始日期
|
||||
AuthorityKeyField_DayTo dbs.FieldName = "dayTo" // 结束日期
|
||||
AuthorityKeyField_Hostname dbs.FieldName = "hostname" // Hostname
|
||||
AuthorityKeyField_MacAddresses dbs.FieldName = "macAddresses" // MAC地址
|
||||
AuthorityKeyField_UpdatedAt dbs.FieldName = "updatedAt" // 创建/修改时间
|
||||
AuthorityKeyField_Company dbs.FieldName = "company" // 公司组织
|
||||
AuthorityKeyField_RequestCode dbs.FieldName = "requestCode" // 申请码
|
||||
)
|
||||
|
||||
// AuthorityKey 企业版认证信息
|
||||
type AuthorityKey struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
@@ -12,17 +24,19 @@ type AuthorityKey struct {
|
||||
MacAddresses dbs.JSON `field:"macAddresses"` // MAC地址
|
||||
UpdatedAt uint64 `field:"updatedAt"` // 创建/修改时间
|
||||
Company string `field:"company"` // 公司组织
|
||||
RequestCode string `field:"requestCode"` // 申请码
|
||||
}
|
||||
|
||||
type AuthorityKeyOperator struct {
|
||||
Id interface{} // ID
|
||||
Value interface{} // Key值
|
||||
DayFrom interface{} // 开始日期
|
||||
DayTo interface{} // 结束日期
|
||||
Hostname interface{} // Hostname
|
||||
MacAddresses interface{} // MAC地址
|
||||
UpdatedAt interface{} // 创建/修改时间
|
||||
Company interface{} // 公司组织
|
||||
Id any // ID
|
||||
Value any // Key值
|
||||
DayFrom any // 开始日期
|
||||
DayTo any // 结束日期
|
||||
Hostname any // Hostname
|
||||
MacAddresses any // MAC地址
|
||||
UpdatedAt any // 创建/修改时间
|
||||
Company any // 公司组织
|
||||
RequestCode any // 申请码
|
||||
}
|
||||
|
||||
func NewAuthorityKeyOperator() *AuthorityKeyOperator {
|
||||
|
||||
Reference in New Issue
Block a user