72 lines
2.0 KiB
Go
72 lines
2.0 KiB
Go
package dto
|
|
|
|
import (
|
|
"rag-local/kb/model/entity"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type SaveCaseReq struct {
|
|
g.Meta `path:"/save" method:"post" tags:"案例管理" summary:"创建/更新案例"`
|
|
Id int64 `json:"id"`
|
|
Title string `v:"required" json:"title"`
|
|
CaseNumber string `json:"case_number"`
|
|
CaseType string `json:"case_type"`
|
|
Court string `json:"court"`
|
|
Parties string `json:"parties"`
|
|
Description string `json:"description"`
|
|
DatasetIds string `json:"dataset_ids"`
|
|
Status int `json:"status"`
|
|
}
|
|
|
|
type SaveCaseRes struct {
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type ListCaseReq struct {
|
|
g.Meta `path:"/list" method:"get" tags:"案例管理" summary:"案例列表"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|
|
|
|
type ListCaseRes struct {
|
|
List []*entity.Case `json:"list"`
|
|
Total int `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|
|
|
|
type GetCaseDetailReq struct {
|
|
g.Meta `path:"/detail" method:"get" tags:"案例管理" summary:"案例详情"`
|
|
Id int64 `v:"required" json:"id"`
|
|
}
|
|
|
|
type GetCaseDetailRes struct {
|
|
Case *entity.Case `json:"case"`
|
|
Evidences []*entity.Evidence `json:"evidences"`
|
|
Contracts []*entity.ContractTask `json:"contracts"`
|
|
}
|
|
|
|
type DeleteCaseReq struct {
|
|
g.Meta `path:"/delete" method:"post" tags:"案例管理" summary:"删除案例"`
|
|
Id int64 `v:"required" json:"id"`
|
|
}
|
|
|
|
type DeleteCaseRes struct{}
|
|
|
|
type LinkEvidenceReq struct {
|
|
g.Meta `path:"/link_evidence" method:"post" tags:"案例管理" summary:"关联证物到案例"`
|
|
CaseId int64 `v:"required" json:"case_id"`
|
|
EvidenceIds []int64 `v:"required" json:"evidence_ids"`
|
|
}
|
|
|
|
type LinkEvidenceRes struct{}
|
|
|
|
type UnlinkEvidenceReq struct {
|
|
g.Meta `path:"/unlink_evidence" method:"post" tags:"案例管理" summary:"取消关联证物"`
|
|
CaseId int64 `v:"required" json:"case_id"`
|
|
EvidenceId int64 `v:"required" json:"evidence_id"`
|
|
}
|
|
|
|
type UnlinkEvidenceRes struct{}
|