86 lines
2.8 KiB
Go
86 lines
2.8 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2023-07-27 15:20:52
|
||
// 生成路径: api/v1/system/sys_user_project.go
|
||
// 生成人:gfast
|
||
// desc:用户和项目关联相关参数
|
||
// company:云南奇讯科技有限公司
|
||
// ==========================================================================
|
||
|
||
package system
|
||
|
||
import (
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||
)
|
||
|
||
// SysUserProjectSearchReq 分页请求参数
|
||
type SysUserProjectSearchReq struct {
|
||
g.Meta `path:"/list" tags:"用户和项目关联" method:"get" summary:"用户和项目关联列表"`
|
||
Id string `p:"id"` //序号
|
||
UserId string `p:"userId" v:"userId@integer#用户需为整数"` //用户
|
||
ProjectId string `p:"projectId" v:"projectId@integer#项目需为整数"` //项目
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// SysUserProjectSearchRes 列表返回结果
|
||
type SysUserProjectSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.SysUserProjectListRes `json:"list"`
|
||
}
|
||
|
||
// SysUserProjectAddReq 添加操作请求参数
|
||
type SysUserProjectAddReq struct {
|
||
g.Meta `path:"/add" tags:"用户和项目关联" method:"post" summary:"用户和项目关联添加"`
|
||
commonApi.Author
|
||
UserId int64 `p:"userId" `
|
||
ProjectId int64 `p:"projectId" `
|
||
}
|
||
|
||
// SysUserProjectAddRes 添加操作返回结果
|
||
type SysUserProjectAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// SysUserProjectEditReq 修改操作请求参数
|
||
type SysUserProjectEditReq struct {
|
||
g.Meta `path:"/edit" tags:"用户和项目关联" method:"put" summary:"用户和项目关联修改"`
|
||
commonApi.Author
|
||
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
||
UserId int64 `p:"userId" `
|
||
ProjectId int64 `p:"projectId" `
|
||
}
|
||
|
||
// SysUserProjectEditRes 修改操作返回结果
|
||
type SysUserProjectEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// SysUserProjectGetReq 获取一条数据请求
|
||
type SysUserProjectGetReq struct {
|
||
g.Meta `path:"/get" tags:"用户和项目关联" method:"get" summary:"获取用户和项目关联信息"`
|
||
commonApi.Author
|
||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// SysUserProjectGetRes 获取一条数据结果
|
||
type SysUserProjectGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.SysUserProjectInfoRes
|
||
}
|
||
|
||
// SysUserProjectDeleteReq 删除数据请求
|
||
type SysUserProjectDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"用户和项目关联" method:"delete" summary:"删除用户和项目关联"`
|
||
commonApi.Author
|
||
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// SysUserProjectDeleteRes 删除数据返回
|
||
type SysUserProjectDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|