🎨同步配置文件改为队列

This commit is contained in:
coward
2024-03-11 11:30:36 +08:00
parent c274c59044
commit 16799ee5d8
13 changed files with 1467 additions and 3 deletions

View File

@@ -55,3 +55,11 @@ func (jt *JsonTime) Scan(v interface{}) error {
}
return fmt.Errorf("can not convert %v to timestamp", v)
}
func (jt JsonTime) String() string {
if jt.IsZero() {
return ""
}
output := fmt.Sprintf("%s", jt.Format("2006-01-02 15:04:05"))
return output
}

View File

@@ -34,6 +34,7 @@ type Client struct {
EnableAfterCreation int `json:"enableAfterCreation" gorm:"type:int(1);default 1;comment:'是否创建后启用'"`
Keys string `json:"keys" gorm:"type:text;default null;comment:'公钥和密钥的json串'"`
UserId string `json:"userId" gorm:"type:char(36);not null;comment:'创建人id'"`
User *User `json:"user" gorm:"foreignKey:UserId"`
}
func (*Client) TableName() string {