MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / Api

Struct Api

internal/repository/dao/api.go:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10)
11
12type Api struct {
13 ID int `json:"id" gorm:"primaryKey;column:id;comment:主键ID"`
14 Name string `json:"name" gorm:"column:name;type:varchar(50);not null;comment:API名称"`
15 Path string `json:"path" gorm:"column:path;type:varchar(255);not null;comment:API路径"`
16 Method int `json:"method" gorm:"column:method;type:tinyint(1);not null;comment:HTTP请求方法(1:GET,2:POST,3:PUT,4:DELETE)"`
17 Description string `json:"description" gorm:"column:description;type:varchar(500);comment:API描述"`
18 Version string `json:"version" gorm:"column:version;type:varchar(20);default:v1;comment:API版本"`
19 Category int `json:"category" gorm:"column:category;type:tinyint(1);not null;comment:API分类(1:系统,2:业务)"`
20 IsPublic int `json:"is_public" gorm:"column:is_public;type:tinyint(1);default:0;comment:是否公开(0:否,1:是)"`
21 CreateTime int64 `json:"create_time" gorm:"column:create_time;autoCreateTime;comment:创建时间"`
22 UpdateTime int64 `json:"update_time" gorm:"column:update_time;autoUpdateTime;comment:更新时间"`
23 IsDeleted int `json:"is_deleted" gorm:"column:is_deleted;type:tinyint(1);default:0;comment:是否删除(0:否,1:是)"`
24}
25
26type ApiDAO interface {
27 CreateApi(ctx context.Context, api *Api) error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected