answer/internal/schema/revision_schema.go

63 lines
1.4 KiB
Go
Raw Normal View History

2022-09-27 17:59:05 +08:00
package schema
import (
"time"
)
// AddRevisionDTO add revision request
type AddRevisionDTO struct {
// user id
UserID string
// object id
ObjectID string
// title
Title string
// content
Content string
// log
Log string
2022-11-23 12:07:06 +08:00
// status
Status int
2022-09-27 17:59:05 +08:00
}
// GetRevisionListReq get revision list all request
type GetRevisionListReq struct {
// object id
ObjectID string `validate:"required" comment:"object_id" form:"object_id"`
}
2022-11-23 16:27:35 +08:00
type RevisionSearch struct {
Page int `json:"page" form:"page"` // Query number of pages
}
2022-11-23 16:52:27 +08:00
type GetUnreviewedRevisionResp struct {
2022-11-23 18:10:34 +08:00
Type string `json:"type"`
Info *UnreviewedRevisionInfoInfo `json:"info"`
UnreviewedInfo *GetRevisionResp `json:"unreviewed_info"`
2022-11-23 16:52:27 +08:00
}
2022-09-27 17:59:05 +08:00
// GetRevisionResp get revision response
type GetRevisionResp struct {
// id
ID string `json:"id"`
// user id
UserID string `json:"use_id"`
// object id
ObjectID string `json:"object_id"`
// object type
ObjectType int `json:"-"`
// title
Title string `json:"title"`
// content
Content string `json:"-"`
// content parsed
ContentParsed interface{} `json:"content"`
// revision status(normal: 1; delete 2)
Status int `json:"status"`
// create time
CreatedAt time.Time `json:"-"`
CreatedAtParsed int64 `json:"create_at"`
UserInfo UserBasicInfo `json:"user_info"`
Log string `json:"reason"`
}