2025-03-07 17:23:50 +08:00

36 lines
1.5 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.

package requests
type ProjectRequest struct {
GetProjectPage // 获取列表-分页
PutProject // 修改
PutProjectStatus // 操作状态
AddProject // 新增
}
// GetProjectPage 获取列表-分页
type GetProjectPage struct {
Page int `json:"page" form:"page" label:"页码"`
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
ProjectName string `json:"project_name" form:"project_name" label:"项目名称"`
ProjectStatus *int `json:"project_status" form:"project_status" label:"项目状态0:无效 1:正常)"`
}
// PutProject 修改
type PutProject struct {
ProjectImage string `json:"project_image" form:"project_image" label:"项目背景图" validate:"required"`
ProjectName string `json:"project_name" form:"project_name" label:"项目名称" validate:"required"`
ProjectStatus int `json:"project_status" form:"project_status" label:"项目状态" validate:"omitempty,oneof=0 1"`
}
// PutProjectStatus 操作状态
type PutProjectStatus struct {
ProjectStatus int `json:"project_status" form:"project_status" label:"项目状态" validate:"omitempty,oneof=0 1"`
}
// AddProject 新增
type AddProject struct {
ProjectImage string `json:"project_image" form:"project_image" label:"项目背景图" validate:"required"`
ProjectName string `json:"project_name" form:"project_name" label:"项目名称" validate:"required"`
ProjectStatus int `json:"project_status" form:"project_status" label:"项目状态" validate:"omitempty,oneof=0 1"`
}