liujiandao
2024-03-26 e079b27d686b045639c7e0d470c2cbc812c401b1
1
2
3
4
5
6
7
8
9
10
11
12
package model
 
type Api struct {
    Id          uint   `json:"id" gorm:"column:id;autoIncrement;not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID
    Path        string `json:"path" gorm:"comment:api路径"`                                                          // api路径
    Description string `json:"description" gorm:"comment:api中文描述"`                                                 // api中文描述
    Method      string `json:"method" gorm:"default:POST;comment:方法"`                                              // 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE
}
 
func (Api) TableName() string {
    return "apis"
}