mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-24 22:16:36 +08:00
版本认证中增加公司/组织名
This commit is contained in:
@@ -30,7 +30,7 @@ func init() {
|
||||
}
|
||||
|
||||
// UpdateKey 设置Key
|
||||
func (this *AuthorityKeyDAO) UpdateKey(tx *dbs.Tx, value string, dayFrom string, dayTo string, hostname string, macAddresses []string) error {
|
||||
func (this *AuthorityKeyDAO) UpdateKey(tx *dbs.Tx, value string, dayFrom string, dayTo string, hostname string, macAddresses []string, company string) error {
|
||||
one, err := this.Query(tx).
|
||||
AscPk().
|
||||
Find()
|
||||
@@ -55,6 +55,7 @@ func (this *AuthorityKeyDAO) UpdateKey(tx *dbs.Tx, value string, dayFrom string,
|
||||
}
|
||||
|
||||
op.MacAddresses = macAddressesJSON
|
||||
op.Company = company
|
||||
op.UpdatedAt = time.Now().Unix()
|
||||
|
||||
return this.Save(tx, op)
|
||||
|
||||
@@ -9,6 +9,7 @@ type AuthorityKey struct {
|
||||
Hostname string `field:"hostname"` // Hostname
|
||||
MacAddresses string `field:"macAddresses"` // MAC地址
|
||||
UpdatedAt uint64 `field:"updatedAt"` // 创建/修改时间
|
||||
Company string `field:"company"` // 公司组织
|
||||
}
|
||||
|
||||
type AuthorityKeyOperator struct {
|
||||
@@ -19,6 +20,7 @@ type AuthorityKeyOperator struct {
|
||||
Hostname interface{} // Hostname
|
||||
MacAddresses interface{} // MAC地址
|
||||
UpdatedAt interface{} // 创建/修改时间
|
||||
Company interface{} // 公司组织
|
||||
}
|
||||
|
||||
func NewAuthorityKeyOperator() *AuthorityKeyOperator {
|
||||
|
||||
Reference in New Issue
Block a user