Files
zmkgC/api/test/test_project_info.go
2025-07-07 20:11:59 +08:00

105 lines
4.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2023-09-01 16:15:09
// 生成路径: api/v1/test/test_project_info.go
// 生成人yqq
// desc:项目备案信息相关参数
// company:云南奇讯科技有限公司
// ==========================================================================
package test
import (
"github.com/gogf/gf/v2/frame/g"
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
"github.com/tiger1103/gfast/v3/internal/app/test/model"
)
// TestProjectInfoSearchReq 分页请求参数
type TestProjectInfoSearchReq struct {
g.Meta `path:"/list" tags:"项目备案信息" method:"get" summary:"项目备案信息列表"`
Id string `p:"id"` //
ProjectName string `p:"projectName"` //项目名称
ProjectAddress string `p:"projectAddress"` //单位地址
ProjectLeader string `p:"projectLeader"` //项目负责人
ResourceName string `p:"resourceName"` //资源方
OwnerId string `p:"ownerId" v:"ownerId@integer#业主名id需为整数"` //业主名id
ProjectType string `p:"projectType"` //项目类型
ProjectInfo string `p:"projectInfo"` //项目概况
ProjectState string `p:"projectState" v:"projectState@integer#项目状态(0未开始 1进行中 2已完成需为整数"` //项目状态(0未开始 1进行中 2已完成
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建日期需为YYYY-MM-DD hh:mm:ss格式"` //创建日期
commonApi.PageReq
commonApi.Author
}
// TestProjectInfoSearchRes 列表返回结果
type TestProjectInfoSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.TestProjectInfoListRes `json:"list"`
}
// TestProjectInfoAddReq 添加操作请求参数
type TestProjectInfoAddReq struct {
g.Meta `path:"/add" tags:"项目备案信息" method:"post" summary:"项目备案信息添加"`
commonApi.Author
ProjectName string `p:"projectName" v:"required#项目名称不能为空"`
ProjectAddress string `p:"projectAddress" `
ProjectLeader string `p:"projectLeader" `
ResourceName string `p:"resourceName" v:"required#资源方不能为空"`
OwnerId int `p:"ownerId" v:"required#业主名id不能为空"`
ProjectType string `p:"projectType" `
ProjectInfo string `p:"projectInfo" `
ProjectState int `p:"projectState" `
}
// TestProjectInfoAddRes 添加操作返回结果
type TestProjectInfoAddRes struct {
commonApi.EmptyRes
}
// TestProjectInfoEditReq 修改操作请求参数
type TestProjectInfoEditReq struct {
g.Meta `path:"/edit" tags:"项目备案信息" method:"put" summary:"项目备案信息修改"`
commonApi.Author
Id uint `p:"id" v:"required#主键ID不能为空"`
ProjectName string `p:"projectName" v:"required#项目名称不能为空"`
ProjectAddress string `p:"projectAddress" `
ProjectLeader string `p:"projectLeader" `
ResourceName string `p:"resourceName" v:"required#资源方不能为空"`
OwnerId int `p:"ownerId" v:"required#业主名id不能为空"`
ProjectType string `p:"projectType" `
ProjectInfo string `p:"projectInfo" `
ProjectState int `p:"projectState" `
}
// TestProjectInfoEditRes 修改操作返回结果
type TestProjectInfoEditRes struct {
commonApi.EmptyRes
}
// TestProjectInfoGetReq 获取一条数据请求
type TestProjectInfoGetReq struct {
g.Meta `path:"/get" tags:"项目备案信息" method:"get" summary:"获取项目备案信息信息"`
commonApi.Author
Id uint `p:"id" v:"required#主键必须"` //通过主键获取
}
// TestProjectInfoGetRes 获取一条数据结果
type TestProjectInfoGetRes struct {
g.Meta `mime:"application/json"`
*model.TestProjectInfoInfoRes
}
// TestProjectInfoDeleteReq 删除数据请求
type TestProjectInfoDeleteReq struct {
g.Meta `path:"/delete" tags:"项目备案信息" method:"delete" summary:"删除项目备案信息"`
commonApi.Author
Ids []uint `p:"ids" v:"required#主键必须"` //通过主键删除
}
// TestProjectInfoDeleteRes 删除数据返回
type TestProjectInfoDeleteRes struct {
commonApi.EmptyRes
}