22 lines
702 B
Go
22 lines
702 B
Go
package model
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
type Api struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Path string `json:"path" gorm:"comment:api路径"` // api路径
|
|
Description string `json:"description" gorm:"comment:api描述"` // api描述
|
|
ApiGroup string `json:"group" gorm:"comment:api分组"` // api分组
|
|
Method string `json:"method" gorm:"default:POST;comment:方法"` // 方法:POST|GET|PUT|DELETE
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"-"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
}
|
|
|
|
func (Api) TableName() string {
|
|
return "api"
|
|
}
|