- 工单编号改为业务格式 TK-yyMMdd-NNN
- 类型断言加 comma-ok 防 panic
- priority 用指针区分未传/P0
- json.Marshal 错误处理
- 提取 ParseID 公共函数消除重复
- HTTP client 包级别复用
- LIKE 查询特殊字符转义
- interface{} → any
- auth 中间件用 dto.Fail 统一响应
50 lines
1.4 KiB
Go
50 lines
1.4 KiB
Go
package dto
|
|
|
|
type LoginRequest struct {
|
|
Account string `json:"account" binding:"required"`
|
|
Password string `json:"password" binding:"required"`
|
|
}
|
|
|
|
type CreateTicketRequest struct {
|
|
Title string `json:"title" binding:"required"`
|
|
Content string `json:"content" binding:"required"`
|
|
Contactname string `json:"contactname" binding:"required"`
|
|
Contactphone string `json:"contactphone" binding:"required"`
|
|
Source string `json:"source"`
|
|
Category string `json:"category"`
|
|
Priority int16 `json:"priority"`
|
|
}
|
|
|
|
type UpdateTicketRequest struct {
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
Contactname string `json:"contactname"`
|
|
Contactphone string `json:"contactphone"`
|
|
Category string `json:"category"`
|
|
Priority *int16 `json:"priority"`
|
|
Handlerid *int `json:"handlerid"`
|
|
}
|
|
|
|
type UpdateStatusRequest struct {
|
|
Status int16 `json:"status" binding:"required"`
|
|
}
|
|
|
|
type TicketListQuery struct {
|
|
Status *int16 `form:"status"`
|
|
Category string `form:"category"`
|
|
Priority *int16 `form:"priority"`
|
|
Keyword string `form:"keyword"`
|
|
Page int `form:"page"`
|
|
PageSize int `form:"pageSize"`
|
|
}
|
|
|
|
type ConfirmAnalysisRequest struct {
|
|
Category string `json:"category"`
|
|
Priority int16 `json:"priority"`
|
|
Summary string `json:"summary"`
|
|
}
|
|
|
|
type AddNoteRequest struct {
|
|
Content string `json:"content" binding:"required"`
|
|
}
|