feat: 统一sql命名、函数命名
This commit is contained in:
26
internal/model/request/api.go
Normal file
26
internal/model/request/api.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package request
|
||||
|
||||
import "server/internal/model/common"
|
||||
|
||||
type CreateApiRequest struct {
|
||||
Name string `json:"name" validate:"required,min=1,max=100"`
|
||||
GroupName string `json:"group_name" validate:"required,min=1,max=100"`
|
||||
Path string `json:"path" validate:"required,min=1,max=100"`
|
||||
Method string `json:"method" validate:"required,oneof=GET POST PUT PATCH DELETE"`
|
||||
Sort *int32 `json:"sort" validate:"required,min=0"`
|
||||
}
|
||||
|
||||
type UpdateApiRequest struct {
|
||||
Name string `json:"name" validate:"required,min=1,max=100"`
|
||||
GroupName string `json:"group_name" validate:"required,min=1,max=100"`
|
||||
Path string `json:"path" validate:"required,min=1,max=100"`
|
||||
Method string `json:"method" validate:"required,oneof=GET POST PUT PATCH DELETE"`
|
||||
Sort *int32 `json:"sort" validate:"required,min=0"`
|
||||
}
|
||||
|
||||
type SearchApiParams struct {
|
||||
common.Pagination
|
||||
Name string `json:"name" form:"name" validate:"omitempty,max=100"`
|
||||
Method string `json:"method" form:"method" validate:"omitempty,oneof=GET POST PUT PATCH DELETE"`
|
||||
GroupName string `json:"group_name" form:"group_name" validate:"omitempty,max=100"`
|
||||
}
|
||||
Reference in New Issue
Block a user