MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / APIKey

Struct APIKey

stores/system/model.go:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import "time"
4
5type APIKey struct {
6 Id int64 `gorm:"column:id;type:BIGINT(20);AUTO_INCREMENT;NOT NULL;comment:id;primary_key;comment:主键ID;"`
7 UUID string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID;"`
8 Name string `gorm:"type:varchar(100);not null;column:name;comment:name"`
9 Value string `gorm:"type:text;not null;column:value;comment:value;"`
10 Expired int64 `gorm:"type:int(11);not null;column:expired;comment:过期时间"` // 过期时间
11 Creator string `gorm:"size:36;not null;column:creator;comment:创建人id" aovalue:"creator"` // 创建人id
12 Updater string `gorm:"size:36;not null;column:updater;comment:修改人id" aovalue:"updater"` // 修改人id
13 CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"`
14 UpdateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;column:update_at;comment:修改时间"`
15}
16
17func (a *APIKey) IdValue() int64 {
18 return a.Id

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected