初始
This commit is contained in:
155
api/v1/system/bus_question_save.go
Normal file
155
api/v1/system/bus_question_save.go
Normal file
@ -0,0 +1,155 @@
|
||||
// ==========================================================================
|
||||
// GFast自动生成api操作代码。
|
||||
// 生成日期:2023-11-01 17:33:04
|
||||
// 生成路径: api/v1/system/bus_question_save.go
|
||||
// 生成人:gfast
|
||||
// desc:用户试卷存储相关参数
|
||||
// company:云南奇讯科技有限公司
|
||||
// ==========================================================================
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||||
)
|
||||
|
||||
// BusQuestionSaveSearchReq 分页请求参数
|
||||
type BusQuestionSaveSearchReq struct {
|
||||
g.Meta `path:"/list" tags:"用户试卷存储" method:"get" summary:"用户试卷存储列表"`
|
||||
Id string `p:"id"` //主键ID
|
||||
Openid string `p:"openid"` //openid
|
||||
BankId string `p:"bankId" v:"bankId@integer#题库ID需为整数"` //题库ID
|
||||
Answer string `p:"answer"` //答案
|
||||
Correct string `p:"correct"` //答题是否正确(1正确 2错误)
|
||||
Score string `p:"score" v:"score@float#得分(当前题)需为浮点数"` //得分(当前题)
|
||||
Sign string `p:"sign"` //签名路径
|
||||
TakeTime string `p:"takeTime" v:"takeTime@integer#用时时间(时间戳/秒)需为整数"` //用时时间(时间戳/秒)
|
||||
TimeOut string `p:"timeOut" v:"timeOut@integer#最大超时时间(单位/分钟)需为整数"` //最大超时时间(单位/分钟)
|
||||
Pass string `p:"pass"` //及格线/总分(格式:60,100)
|
||||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// BusQuestionSaveSearchRes 列表返回结果
|
||||
type BusQuestionSaveSearchRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.BusQuestionSaveListRes `json:"list"`
|
||||
}
|
||||
|
||||
// BusQuestionSaveAddReq 添加操作请求参数
|
||||
type BusQuestionSaveAddReq struct {
|
||||
g.Meta `path:"/add" tags:"用户试卷存储" method:"post" summary:"用户试卷存储添加"`
|
||||
commonApi.Author
|
||||
Openid string `p:"openid" dc:"openid"`
|
||||
//Sign *ghttp.UploadFile `p:"sign" dc:"签名(http图上传)"`
|
||||
TakeTime int64 `p:"takeTime" dc:"用时时间(时间戳/秒)"`
|
||||
List []*BusQuestionSaveAddEntity `json:"list"`
|
||||
}
|
||||
|
||||
// BusQuestionSaveAddRes 添加操作返回结果
|
||||
type BusQuestionSaveAddRes struct {
|
||||
commonApi.EmptyRes
|
||||
AnswerTime int `p:"answerTime" dc:"总考试时间(分钟)"`
|
||||
TakeTime int64 `p:"takeTime" dc:"用时时间(时间戳/秒)"`
|
||||
FullMark float64 `json:"fullMark" dc:"满分"`
|
||||
PassingScore float64 `json:"passingScore" dc:"及格分"`
|
||||
Score float64 `json:"score" dc:"当前分"`
|
||||
Number int `json:"number" dc:"答对题数"`
|
||||
PdfStr string `json:"pdfStr" dc:"试卷"`
|
||||
}
|
||||
|
||||
type BusQuestionSaveAddEntity struct {
|
||||
BankId int64 `json:"bankId" dc:"题库ID"`
|
||||
Answer string `json:"answer" dc:"答案"`
|
||||
Score float64 `json:"score" dc:"当前题分数"`
|
||||
}
|
||||
|
||||
// BusQuestionSaveGetReq 获取一条数据请求
|
||||
type BusQuestionSaveGetReq struct {
|
||||
g.Meta `path:"/get" tags:"用户试卷存储" method:"get" summary:"获取用户试卷存储信息"`
|
||||
commonApi.Author
|
||||
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||||
}
|
||||
|
||||
// BusQuestionSaveGetRes 获取一条数据结果
|
||||
type BusQuestionSaveGetRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
*model.BusQuestionSaveInfoRes
|
||||
}
|
||||
|
||||
// BusQuestionSaveDeleteReq 删除数据请求
|
||||
type BusQuestionSaveDeleteReq struct {
|
||||
g.Meta `path:"/delete" tags:"用户试卷存储" method:"delete" summary:"删除用户试卷存储"`
|
||||
commonApi.Author
|
||||
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||||
}
|
||||
|
||||
// BusQuestionSaveDeleteRes 删除数据返回
|
||||
type BusQuestionSaveDeleteRes struct {
|
||||
commonApi.EmptyRes
|
||||
}
|
||||
|
||||
// PassOrNotReq 查询用户的考试是否已达到及格线
|
||||
type PassOrNotReq struct {
|
||||
g.Meta `path:"/passOrNot" tags:"用户试卷存储" method:"get" summary:"查询用户的考试是否已达到及格线"`
|
||||
commonApi.Author
|
||||
Openid string `p:"openid" v:"required#openid必须"`
|
||||
}
|
||||
|
||||
// PassOrNotRes 查询用户的考试是否已达到及格线
|
||||
type PassOrNotRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
IsPass string `json:"isPass" dc:"成绩是否合格(1及格 2不及格 3暂无记录)"`
|
||||
PdfStr string `json:"pdfStr" dc:"上次考试的试卷(PDF格式)"`
|
||||
Type string `json:"type" dc:"1pdf 2图片"`
|
||||
}
|
||||
|
||||
// WeChatPdfWoReq 根据项目id+班组id 查询到当前用户的考试信息
|
||||
type WeChatPdfWoReq struct {
|
||||
g.Meta `path:"/weChatPdfWo" tags:"用户试卷存储" method:"get" summary:"根据项目id或者加班组id 查询到当前用户的考试信息(安全考试)"`
|
||||
ProjectId int64 `p:"projectId" dc:"项目id" v:"required#项目ID必须"`
|
||||
TeamId int64 `p:"teamId" dc:"班组id"`
|
||||
Name string `p:"name" dc:"名称"`
|
||||
commonApi.PageReq
|
||||
commonApi.Author
|
||||
//commonApi.Paging
|
||||
}
|
||||
|
||||
// WeChatPdfWoRes 根据项目id+班组id 查询到当前用户的考试信息
|
||||
type WeChatPdfWoRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
commonApi.ListRes
|
||||
List []*model.ModelWeChatPdfWoRes `json:"list"`
|
||||
}
|
||||
|
||||
// MultifileDownloadReq 批量下载用户试卷
|
||||
type MultifileDownloadReq struct {
|
||||
g.Meta `path:"/multifileDownload" tags:"用户试卷存储" method:"get" summary:"批量下载用户试卷"`
|
||||
//ProjectId int64 `p:"projectId" dc:"项目id" `
|
||||
//TeamId int64 `p:"teamId" dc:"班组id" `
|
||||
Openids []string `p:"openids" dc:"openid,传入openid就不需要项目和班组id" v:"required#班组ID必须"`
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// MultifileDownloadRes 批量下载用户试卷
|
||||
type MultifileDownloadRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
// UploadZipFileReq 上传施工人员线下安全考试(上传压缩zip文件)
|
||||
type UploadZipFileReq struct {
|
||||
g.Meta `path:"/uploadZipFile" tags:"用户试卷存储" method:"post" summary:"上传施工人员线下安全考试(上传压缩zip文件)"`
|
||||
//File *ghttp.UploadFile `p:"file" `
|
||||
FilePath string `p:"filePath" `
|
||||
commonApi.Author
|
||||
}
|
||||
|
||||
// UploadZipFileRes 上传施工人员线下安全考试(上传压缩zip文件)
|
||||
type UploadZipFileRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
}
|
Reference in New Issue
Block a user