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

Struct API

stores/api/model.go:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import "time"
4
5type API 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 Driver string `gorm:"size:36;not null;column:driver;comment:驱动;index:driver"` // 驱动
10 Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"` // 服务
11 Team string `gorm:"size:36;not null;column:team;comment:团队;index:team"` // 团队id
12 Upstream string `gorm:"size:36;not null;column:upstream;comment:上游;index:upstream"` // 上游ID
13 Creator string `gorm:"size:36;not null;column:creator;comment:创建人;index:creator" aovalue:"creator"` // 创建人
14 CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"`
15 Method []string `gorm:"size:255;not null;column:method;comment:请求方法;serializer:json"`
16 Protocol []string `gorm:"type:text;not null;column:protocol;comment:协议;serializer:json"`
17 Path string `gorm:"size:255;not null;column:path;comment:请求路径"`
18 IsDelete bool `gorm:"type:tinyint(1);not null;column:is_delete;comment:是否删除 0:未删除 1:已删除"`
19}
20type Info struct {
21 Id int64 `gorm:"column:id;type:BIGINT(20);NOT NULL;comment:id;primary_key;comment:主键ID;"`
22 UUID string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID;"`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected