56 lines
1.4 KiB
Go
56 lines
1.4 KiB
Go
|
package merchant
|
||
|
|
||
|
type GetListByIdReq struct {
|
||
|
Id int64 `json:"id" validate:"required" example:"1"`
|
||
|
}
|
||
|
|
||
|
type GetListByIdResp struct {
|
||
|
Id int64 `json:"id"`
|
||
|
MerchantId int64 `json:"merchant_id"`
|
||
|
Ip string `json:"ip"`
|
||
|
CreatedAt string `json:"created_at" example:"2020-01-01 00:00:00"`
|
||
|
}
|
||
|
|
||
|
type SearcgReq struct {
|
||
|
Id int64 `json:"id"`
|
||
|
MerchantId int64 `json:"merchant_id"`
|
||
|
Ip string `json:"ip"`
|
||
|
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 {
|
||
|
Id int64 `json:"id"`
|
||
|
MerchantId int64 `json:"merchant_id"`
|
||
|
Ip string `json:"ip"`
|
||
|
CreatedAt string `json:"created_at" example:"2020-01-01 00:00:00"`
|
||
|
}
|
||
|
|
||
|
type CreateReq struct {
|
||
|
MerchantId int64 `json:"merchant_id" validate:"required"`
|
||
|
Ip string `json:"ip" validate:"required"`
|
||
|
}
|
||
|
|
||
|
type CreateResp struct {
|
||
|
Id int64 `json:"id" example:"1"`
|
||
|
}
|
||
|
|
||
|
type UpdateReq struct {
|
||
|
Id int64 `json:"id" validate:"required"`
|
||
|
MerchantId int64 `json:"merchant_id" validate:"required"`
|
||
|
Ip string `json:"ip" validate:"required"`
|
||
|
}
|
||
|
|
||
|
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"`
|
||
|
}
|