69 lines
2.1 KiB
Go
69 lines
2.1 KiB
Go
package dto
|
||
|
||
import (
|
||
"rag-local/kb/model/domain"
|
||
"rag-local/kb/model/entity"
|
||
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
"github.com/gogf/gf/v2/net/ghttp"
|
||
)
|
||
|
||
type UploadContractReq struct {
|
||
g.Meta `path:"/upload" method:"post" tags:"合同标注" summary:"上传合同并启动标注"`
|
||
DatasetIds string `json:"dataset_ids" dc:"法律语料数据集ID JSON 数组,如 [1,3]"`
|
||
File *ghttp.UploadFile `json:"file" dc:"合同文件"`
|
||
}
|
||
|
||
type UploadContractRes struct {
|
||
Id int64 `json:"id"`
|
||
}
|
||
|
||
type ListContractTaskReq struct {
|
||
g.Meta `path:"/list" method:"get" tags:"合同标注" summary:"标注任务列表"`
|
||
Page int `json:"page"`
|
||
PageSize int `json:"page_size"`
|
||
}
|
||
|
||
type ListContractTaskRes struct {
|
||
List []*entity.ContractTask `json:"list"`
|
||
Total int `json:"total"`
|
||
Page int `json:"page"`
|
||
PageSize int `json:"page_size"`
|
||
}
|
||
|
||
type GetContractDetailReq struct {
|
||
g.Meta `path:"/detail" method:"get" tags:"合同标注" summary:"任务详情(含条款与标注结果)"`
|
||
Id int64 `v:"required" json:"id"`
|
||
}
|
||
|
||
type GetContractDetailRes struct {
|
||
Task *entity.ContractTask `json:"task"`
|
||
Clauses []*entity.ContractClause `json:"clauses"`
|
||
Marks map[int64][]*entity.ContractMark `json:"marks"`
|
||
Risks map[int64][]*entity.ContractRisk `json:"risks"`
|
||
}
|
||
|
||
type SummaryContractReq struct {
|
||
g.Meta `path:"/summary" method:"get" tags:"合同标注" summary:"合同风险汇总报告(分级清单+LLM 整体评述)"`
|
||
Id int64 `v:"required" json:"id"`
|
||
}
|
||
|
||
type SummaryContractRes struct {
|
||
Task *entity.ContractTask `json:"task"`
|
||
domain.RiskSummary
|
||
}
|
||
|
||
type AnnotatedContractReq struct {
|
||
g.Meta `path:"/annotated" method:"get" tags:"合同标注" summary:"导出标注版合同(HTML,可打印/另存 PDF)"`
|
||
Id int64 `v:"required" json:"id"`
|
||
}
|
||
|
||
type AnnotatedContractRes struct{}
|
||
|
||
type DeleteContractReq struct {
|
||
g.Meta `path:"/delete" method:"post" tags:"合同标注" summary:"删除标注任务"`
|
||
Id int64 `v:"required" json:"id"`
|
||
}
|
||
|
||
type DeleteContractRes struct{}
|