l_short_url/entity.go

65 lines
1.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package l_short_utl_request
import "encoding/json"
type ResCommon struct {
Code int `json:"code"`
Message string `json:"message"`
Data json.RawMessage `json:"data"`
}
type ShortUrlBatchCreate struct {
//批次名称
BatchName string `json:"batch_name,omitempty"`
//链接
Urls []string `json:"urls"`
// 开始时间yyyy-mm-dd
StartTimeStr string `json:"start_time_str,omitempty"`
// 结束时间yyyy-mm-dd不填则永久有效
EndTimeStr string `json:"end_time_str,omitempty"`
//返回映射列表
WithBatchMap bool `json:"with_batch_map,omitempty"`
}
type ShortUrlBatchCreateResult struct {
Id int32 `json:"id"`
// 名称
BatchName string `json:"batch_name"`
// 批次号
BatchNo int64 `json:"batch_no"`
UrlMap map[string]string `json:"url_map,omitempty"`
}
type ShortUrlCreateReq struct {
BatchName string `json:"batch_name,omitempty"`
// 用户id
UserId int32 `json:"user_id,omitempty"`
// 链接
Urls []string `json:"urls,omitempty"`
// 开始时间yyyy-mm-dd
StartTimeStr string `json:"start_time_str,omitempty"`
// 结束时间yyyy-mm-dd不填则永久有效
EndTimeStr string `json:"end_time_str,omitempty"`
// 结束时间yyyy-mm-dd不填则永久有效
WithBatchMap bool `json:"with_batch_map,omitempty"`
}
type BatchQueryReq struct {
BatchNo int64 `json:"batch_no,omitempty"`
Id int64 `json:"id,omitempty"`
BatchName string `json:"batch_name,omitempty"`
OriginUrl string `json:"origin_url,omitempty"`
// 短链接
ShortUrl string `json:"short_url,omitempty"`
}
type QueryBatchWithUrlResp struct {
// id
Id int32 `json:"id,omitempty"`
// 名称
BatchName string `json:"batch_name,omitempty"`
// 批次号
BatchNo int64 `json:"batch_no,omitempty"`
UrlMap map[string]string `json:"url_map,omitempty"`
}