project

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx server.Context)

Create 处理创建项目请求

func CreateProject

func CreateProject(tx persistence.TxContext, code, name string) (*model.Project, error)

CreateProject 创建项目服务

func Delete

func Delete(ctx server.Context)

Delete 处理删除项目请求

func DeleteProject

func DeleteProject(tx persistence.TxContext, code string) error

DeleteProject 删除项目服务

func Get

func Get(ctx server.Context)

Get 处理获取项目详情请求

func GetProjectByCode

func GetProjectByCode(tx persistence.TxContext, code string) (*model.Project, error)

GetProjectByCode 根据code获取项目详情

func GetProjectCode

func GetProjectCode(ctx server.Context)

GetProjectCode 获取项目编号

func GetProjectList

func GetProjectList(tx persistence.TxContext, page, pageSize int, code, name string) ([]model.Project, int64, error)

GetProjectList 获取项目列表服务

func List

func List(ctx server.Context)

List 处理查询项目列表请求

func Router

func Router(router server.Router)

func Update

func Update(ctx server.Context)

Update 处理更新项目请求

func UpdateProject

func UpdateProject(tx persistence.TxContext, code string, newName, newCode string) (*model.Project, error)

UpdateProject 更新项目服务

Types

type ProjectListResp

type ProjectListResp struct {
	Total    int           `json:"total"`
	Page     int           `json:"page"`
	PageSize int           `json:"pageSize"`
	List     []ProjectResp `json:"list"`
}

ProjectListResp 项目列表响应体

type ProjectReq

type ProjectReq struct {
	Code string `json:"code,omitempty"`
	Name string `json:"name,omitempty"`
}

ProjectReq 创建/更新项目请求体

type ProjectResp

type ProjectResp struct {
	Id        int    `json:"id"`
	Code      string `json:"code"`
	Name      string `json:"name"`
	CreatedAt string `json:"createTime"`
	UpdatedAt string `json:"updateTime"`
}

ProjectResp 项目响应体

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL