com.snow.auto_monitor/app/http/entities/product/product.go

73 lines
2.4 KiB
Go
Raw Normal View History

2024-07-12 18:11:21 +08:00
package merchant
type GetListByIdReq struct {
Id int64 `json:"id" validate:"required" example:"1"`
}
type GetListByIdResp struct {
2024-07-26 17:56:54 +08:00
Id int64 `json:"id" example:"1"`
Name string `json:"name" example:"snow"`
Price int64 `json:"price" example:"100"`
ProductUrl string `json:"product_url" example:"http://www.baidu.com"`
Status int64 `json:"status" example:"1"`
CreatedAt string `json:"created_at" example:"2020-01-01 00:00:00"`
Type int64 `json:"type" example:"1"`
ExtendParameter string `json:"extend_parameter" example:"{}"`
2024-09-10 14:26:07 +08:00
QueueNo int64 `json:"queue_no" example:"1"`
2024-07-12 18:11:21 +08:00
}
type SearcgReq struct {
Id int64 `json:"id"`
Name string `json:"name"`
CreatedAt []string `json:"created_at" form:"created_at"`
PageNum int `json:"page_num" form:"page" validate:"required"`
PageSize int `json:"page_size" form:"page_size" validate:"required"`
}
type SearchResp struct {
2024-07-26 17:56:54 +08:00
Id int64 `json:"id" example:"1"`
Name string `json:"name" example:"snow"`
Price int64 `json:"price" example:"100"`
ProductUrl string `json:"product_url" example:"http://www.baidu.com"`
Status int64 `json:"status" example:"1"`
CreatedAt string `json:"created_at" example:"2020-01-01 00:00:00"`
Type int64 `json:"type" example:"1"`
ExtendParameter string `json:"extend_parameter" example:"{}"`
2024-09-10 14:26:07 +08:00
QueueNo int64 `json:"queue_no" example:"1"`
2024-07-12 18:11:21 +08:00
}
type CreateReq struct {
2024-07-26 17:56:54 +08:00
Name string `json:"name" validate:"required"`
Price int64 `json:"price" validate:"required"`
2024-08-03 12:13:55 +08:00
ProductUrl string `json:"product_url"`
2024-07-26 17:56:54 +08:00
Type int64 `json:"type" validate:"required"`
ExtendParameter string `json:"extend_parameter"`
2024-09-10 14:26:07 +08:00
QueueNo int64 `json:"queue_no" example:"1"`
2024-07-12 18:11:21 +08:00
}
type CreateResp struct {
Id int64 `json:"id" example:"1"`
}
type UpdateReq struct {
2024-07-26 17:56:54 +08:00
Id int64 `json:"id" validate:"required"`
Name string `json:"name" `
Price int64 `json:"price" `
ProductUrl string `json:"product_url" `
Type int64 `json:"type" `
ExtendParameter string `json:"extend_parameter"`
2024-09-10 14:26:07 +08:00
QueueNo int64 `json:"queue_no" example:"1"`
2024-07-12 18:11:21 +08:00
}
type UpdateResp struct {
Id int64 `json:"id" example:"1"`
}
type DeleteReq struct {
Id int64 `json:"id" validate:"required"`
}
type DeleteResp struct {
Id int64 `json:"id" example:"1"`
}