用户反馈信息基本CRUD
This commit is contained in:
19
api/feedback/feedback.go
Normal file
19
api/feedback/feedback.go
Normal file
@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package feedback
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/api/feedback/v1"
|
||||
)
|
||||
|
||||
type IFeedbackV1 interface {
|
||||
List(ctx context.Context, req *v1.ListReq) (res *v1.ListRes, err error)
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
UpdateReply(ctx context.Context, req *v1.UpdateReplyReq) (res *v1.UpdateReplyRes, err error)
|
||||
InfoFeedback(ctx context.Context, req *v1.InfoFeedbackReq) (res *v1.InfoFeedbackRes, err error)
|
||||
}
|
||||
77
api/feedback/v1/feedback.go
Normal file
77
api/feedback/v1/feedback.go
Normal file
@ -0,0 +1,77 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/feedback" method:"get" tags:"Feedback" summary:"根据用户查询反馈列表"`
|
||||
//UserId int64 `json:"userId" v:"required#用户ID不能为空" dc:"用户ID"`
|
||||
Status int `json:"status" v:"required#状态不能为空" dc:"状态"`
|
||||
Page int `json:"page" v:"required#页数不能为空" dc:"页数"`
|
||||
Size int `json:"size" v:"required#页大小不能为"`
|
||||
FeedbackType int `json:"feedbackType" v:"required#反馈类型不能为空" dc:"反馈类型"`
|
||||
Title string `json:"title" v:"required#标题不能为空" dc:"标题"`
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"反馈列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/feedback" method:"post" tags:"Feedback" summary:"创建反馈"`
|
||||
Title string `json:"title" v:"required#标题不能为空" dc:"标题"`
|
||||
Content string `json:"content" v:"required#反馈内容不能为空" dc:"反馈内容"`
|
||||
FeedbackType int `json:"feedbackType" v:"required#反馈类型不能为空" dc:"反馈类型"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/feedback" method:"put" tags:"Feedback" summary:"更新反馈"`
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
Title string `json:"title" v:"required#标题不能为空" dc:"标题"`
|
||||
Content string `json:"content" v:"required#反馈内容不能为空" dc:"反馈内容"`
|
||||
FeedbackType int `json:"feedbackType" v:"required#反馈类型不能为空" dc:"反馈类型"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
//type DeleteReq struct {
|
||||
// g.Meta `path:"/feedback" method:"delete" tags:"Feedback" summary:"删除反馈"`
|
||||
// Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
//}
|
||||
|
||||
type UpdateReplyReq struct {
|
||||
g.Meta `path:"/feedback/reply" method:"put" tags:"Feedback" summary:"更新反馈回复"`
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
Reply string `json:"reply" v:"required#回复内容不能为空" dc:"回复内容"`
|
||||
Status int `json:"status" v:"required#状态不能为空" dc:"状态"`
|
||||
}
|
||||
|
||||
type UpdateReplyRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type InfoFeedbackReq struct {
|
||||
g.Meta `path:"/feedback/{id}" method:"get" tags:"Feedback" summary:"获取反馈信息"`
|
||||
Id int64 `in:"path" json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
type InfoFeedbackRes struct {
|
||||
Id int64 `json:"id" dc:"ID"`
|
||||
Title string `json:"title" dc:"标题"`
|
||||
Content string `json:"content" dc:"反馈内容"`
|
||||
FeedbackType int `json:"feedbackType" dc:"反馈类型"`
|
||||
Reply string `json:"reply" dc:"回复"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreateTime int64 `json:"createTime" dc:"创建时间"`
|
||||
UpdateTime int64 `json:"updateTime" dc:"更新时间"`
|
||||
DeleteTime int64 `json:"deleteTime" dc:"删除时间"`
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
MerchantId int64 `json:"merchantId" dc:"商户ID"`
|
||||
StoreId int64 `json:"storeId" dc:"店铺ID"`
|
||||
}
|
||||
Reference in New Issue
Block a user