1
This commit is contained in:
427
model/dto/xiaohongshu_dto.go
Normal file
427
model/dto/xiaohongshu_dto.go
Normal file
@@ -0,0 +1,427 @@
|
||||
package dto
|
||||
|
||||
// ==================== 通用响应结构 ====================
|
||||
|
||||
type XhsCommonRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
// ==================== 绑定/解绑账户通知(接收) ====================
|
||||
|
||||
type XhsBindAccountReq struct {
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
}
|
||||
|
||||
type XhsBindAccountDecrypted struct {
|
||||
UserId string `json:"user_id"`
|
||||
NickName string `json:"nick_name"`
|
||||
AppId int64 `json:"app_id"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type XhsUnbindAccountReq struct {
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
}
|
||||
|
||||
type XhsUnbindAccountDecrypted struct {
|
||||
UserId string `json:"user_id"`
|
||||
AppId int64 `json:"app_id"`
|
||||
AccountCode string `json:"account_code"`
|
||||
}
|
||||
|
||||
type XhsBindKosUserReq struct {
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
}
|
||||
|
||||
// KOS账户绑定事件
|
||||
type XhsBindKosUserDecrypted struct {
|
||||
UserId string `json:"user_id"`
|
||||
AuthStatus int `json:"auth_status"` // 2-已生效,4-已取消
|
||||
KosNickName string `json:"kos_nick_name"`
|
||||
KosUserId string `json:"kos_user_id"`
|
||||
KosAvatarImg string `json:"kos_avatar_img"`
|
||||
}
|
||||
|
||||
// ==================== 查询KOS授权绑定列表(发送) ====================
|
||||
|
||||
type XhsQueryBindUsersReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
PageNum int `json:"page_num" v:"required"`
|
||||
PageSize int `json:"page_size" v:"required"`
|
||||
}
|
||||
|
||||
type XhsQueryBindUsersRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
Total int64 `json:"total"`
|
||||
KosUserList []struct {
|
||||
UserId string `json:"user_id"`
|
||||
NickName string `json:"nick_name"`
|
||||
AvatarImg string `json:"avatar_img"`
|
||||
} `json:"kos_user_list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// ==================== 发送消息接口(发送) ====================
|
||||
|
||||
type XhsSendMessageReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
RequestId string `json:"request_id" v:"required"`
|
||||
MessageType string `json:"message_type" v:"required"` // TEXT/IMAGE/VIDEO/CARD/REVOKE
|
||||
FromUserId string `json:"from_user_id" v:"required"`
|
||||
ToUserId string `json:"to_user_id" v:"required"`
|
||||
ThirdAccountId string `json:"third_account_id" v:"required"`
|
||||
Timestamp int64 `json:"timestamp" v:"required"`
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
}
|
||||
|
||||
type XhsSendMessageRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
RequestId string `json:"request_id"`
|
||||
MessageId string `json:"message_id"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// 消息内容解密后结构
|
||||
type XhsTextContent struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type XhsImageContent struct {
|
||||
Link string `json:"link"`
|
||||
Size struct {
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
} `json:"size"`
|
||||
}
|
||||
|
||||
type XhsVideoContent struct {
|
||||
Duration int64 `json:"duration"`
|
||||
VideoSize int64 `json:"video_size"`
|
||||
Cover string `json:"cover"`
|
||||
Link string `json:"link"`
|
||||
Size struct {
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
} `json:"size"`
|
||||
}
|
||||
|
||||
// 通用卡片内容(用于switch分支解析)
|
||||
type XhsCardContent struct {
|
||||
Id string `json:"id"`
|
||||
ContentType string `json:"content_type"`
|
||||
}
|
||||
|
||||
type XhsCardNoteContent struct {
|
||||
NoteId string `json:"note_id"`
|
||||
ContentType string `json:"content_type"` // note
|
||||
}
|
||||
|
||||
type XhsCardPageContent struct {
|
||||
PageId string `json:"page_id"`
|
||||
ContentType string `json:"content_type"` // common
|
||||
}
|
||||
|
||||
type XhsCardCommentContent struct {
|
||||
CommentId string `json:"comment_id"`
|
||||
Content string `json:"content"`
|
||||
ContentType string `json:"content_type"` // purchaseComments
|
||||
}
|
||||
|
||||
type XhsCardSocialContent struct {
|
||||
Id string `json:"id"`
|
||||
ContentType string `json:"content_type"` // social_card
|
||||
}
|
||||
|
||||
type XhsCardLeadContent struct {
|
||||
Id string `json:"id"`
|
||||
ContentType string `json:"content_type"` // lead_card
|
||||
}
|
||||
|
||||
type XhsCardTradeContent struct {
|
||||
Id string `json:"id"`
|
||||
ContentType string `json:"content_type"` // tradeBusinessCard
|
||||
}
|
||||
|
||||
type XhsRevokeContent struct {
|
||||
MessageId string `json:"message_id"`
|
||||
}
|
||||
|
||||
// ==================== 接收消息接口(接收Webhook) ====================
|
||||
|
||||
type XhsReceiveMessageReq struct {
|
||||
MessageId string `json:"message_id" v:"required"`
|
||||
MessageType string `json:"message_type" v:"required"` // TEXT/IMAGE/VIDEO/CARD/HINT/REVOKE/SMILES
|
||||
MessageSource int `json:"message_source" v:"required"` // 1-C2B用户,2-C2B系统,3-B2C系统
|
||||
FromUserId string `json:"from_user_id" v:"required"`
|
||||
ToUserId string `json:"to_user_id" v:"required"`
|
||||
Timestamp int64 `json:"timestamp" v:"required"`
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
UserInfo []XhsReceiveMessageUser `json:"user_info"`
|
||||
}
|
||||
|
||||
type XhsReceiveMessageUser struct {
|
||||
UserId string `json:"user_id"`
|
||||
Nickname string `json:"nickname"`
|
||||
HeaderImage string `json:"header_image"`
|
||||
}
|
||||
|
||||
// 接收消息-卡片内容(笔记)
|
||||
type XhsReceiveCardNoteContent struct {
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
Link string `json:"link"`
|
||||
ContentType string `json:"content_type"` // note
|
||||
UserInfo struct {
|
||||
Nickname string `json:"nickname"`
|
||||
HeaderImage string `json:"header_image"`
|
||||
} `json:"user_info"`
|
||||
}
|
||||
|
||||
// 接收消息-卡片内容(落地页)
|
||||
type XhsReceiveCardPageContent struct {
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
Link string `json:"link"`
|
||||
Desc string `json:"desc"`
|
||||
ContentType string `json:"content_type"` // common
|
||||
}
|
||||
|
||||
// 接收消息-卡片内容(名片)
|
||||
type XhsReceiveCardSocialContent struct {
|
||||
Id string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Name string `json:"name"`
|
||||
Image string `json:"image"`
|
||||
ContentType string `json:"content_type"` // social_card
|
||||
}
|
||||
|
||||
// 接收消息-卡片内容(留资卡)
|
||||
type XhsReceiveCardLeadContent struct {
|
||||
Id string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Name string `json:"name"`
|
||||
Image string `json:"image"`
|
||||
ContentType string `json:"content_type"` // lead_card
|
||||
}
|
||||
|
||||
// 接收消息-卡片内容(交易卡)
|
||||
type XhsReceiveCardTradeContent struct {
|
||||
Id string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
SubTitle string `json:"sub_title"`
|
||||
Image string `json:"image"`
|
||||
LinkPlatform string `json:"link_platform"` // wx_mini/ctrip/meituan
|
||||
ContentType string `json:"content_type"` // tradeBusinessCard
|
||||
}
|
||||
|
||||
// 接收消息-HINT内容
|
||||
type XhsReceiveHintContent struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
// ==================== 查询物料接口(发送) ====================
|
||||
|
||||
// 查询落地页列表
|
||||
type XhsQueryPageListReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
PageNum int `json:"page_num" v:"required"`
|
||||
PageSize int `json:"page_size" v:"required"`
|
||||
}
|
||||
|
||||
type XhsQueryPageListRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
Total int64 `json:"total"`
|
||||
List []struct {
|
||||
Title string `json:"title"`
|
||||
CreateTime int64 `json:"create_time"`
|
||||
PageId string `json:"page_id"`
|
||||
PageDesc string `json:"page_desc"`
|
||||
PageUrl string `json:"page_url"`
|
||||
Cover string `json:"cover"`
|
||||
} `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// 查询名片/留资卡/交易卡列表
|
||||
type XhsQueryMaterialListReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
PageNum int `json:"page_num" v:"required"`
|
||||
PageSize int `json:"page_size" v:"required"`
|
||||
Type int `json:"type" v:"required"` // 4-名片 5-留资卡 7-交易卡
|
||||
}
|
||||
|
||||
type XhsQueryMaterialListRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
Total int64 `json:"total"`
|
||||
List []struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Image string `json:"image"`
|
||||
Ext struct {
|
||||
SocialCardExt *struct {
|
||||
CardType int `json:"card_type"` // 1-微信、2-钉钉、3-电话、4-企微 5-留资卡
|
||||
} `json:"social_card_ext,omitempty"`
|
||||
TradeCardExt *struct {
|
||||
SubTitle string `json:"sub_title"`
|
||||
LinkPlatform string `json:"link_platform"` // ctrip/meituan/wx_mini
|
||||
} `json:"trade_card_ext,omitempty"`
|
||||
} `json:"ext"`
|
||||
} `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// 查询笔记列表
|
||||
type XhsQueryNoteListReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
NoteId string `json:"note_id,omitempty"`
|
||||
PageNum int `json:"page_num" v:"required"`
|
||||
PageSize int `json:"page_size" v:"required"`
|
||||
}
|
||||
|
||||
type XhsQueryNoteListRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
Total int64 `json:"total"`
|
||||
List []struct {
|
||||
NoteId string `json:"note_id"`
|
||||
PublishTime int64 `json:"publish_time"`
|
||||
Link string `json:"link"`
|
||||
Title string `json:"title"`
|
||||
Cover string `json:"cover"`
|
||||
UserInfo struct {
|
||||
Nickname string `json:"nickname"`
|
||||
HeaderImage string `json:"header_image"`
|
||||
} `json:"user_info"`
|
||||
} `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// 查询意向评论列表
|
||||
type XhsQueryCommentListReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
PageNum int `json:"page_num" v:"required"`
|
||||
PageSize int `json:"page_size" v:"required"`
|
||||
BeginTime string `json:"begin_time,omitempty"`
|
||||
EndTime string `json:"end_time,omitempty"`
|
||||
}
|
||||
|
||||
type XhsQueryCommentListRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
Total int64 `json:"total"`
|
||||
List []struct {
|
||||
NoteId string `json:"note_id"`
|
||||
Cover string `json:"cover"`
|
||||
NoteTitle string `json:"note_title"`
|
||||
NoteAuthorUserId string `json:"note_author_user_id"`
|
||||
CommentContent string `json:"comment_content"`
|
||||
CommentTime int64 `json:"comment_time"`
|
||||
CommentUserName string `json:"comment_user_name"`
|
||||
CommentUserId string `json:"comment_user_id"`
|
||||
CommentId string `json:"comment_id"`
|
||||
UniqId string `json:"uniq_id"`
|
||||
ReplyState int `json:"reply_state"`
|
||||
ReplyThirdAccountId string `json:"reply_third_account_id"`
|
||||
} `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// ==================== 意向评论推送(接收Webhook) ====================
|
||||
|
||||
type XhsIntentCommentPushReq struct {
|
||||
NoteId string `json:"note_id"`
|
||||
Cover string `json:"cover"`
|
||||
NoteTitle string `json:"note_title"`
|
||||
NoteAuthorUserId string `json:"note_author_user_id"`
|
||||
CommentContent string `json:"comment_content"`
|
||||
CommentTime int64 `json:"comment_time"`
|
||||
CommentUserName string `json:"comment_user_name"`
|
||||
CommentUserId string `json:"comment_user_id"`
|
||||
CommentId string `json:"comment_id"`
|
||||
UniqId string `json:"uniq_id"`
|
||||
ReplyState int `json:"reply_state"`
|
||||
ReplyThirdAccountId string `json:"reply_third_account_id"`
|
||||
}
|
||||
|
||||
// ==================== 留资数据回传(发送) ====================
|
||||
|
||||
type XhsBackLeadResultReq struct {
|
||||
UserId string `json:"user_id" v:"required"`
|
||||
RequestId string `json:"request_id" v:"required"`
|
||||
BrandUserId string `json:"brand_user_id" v:"required"`
|
||||
CUserId string `json:"c_user_id" v:"required"`
|
||||
ThirdBackSource string `json:"third_back_source" v:"required"`
|
||||
Timestamp int64 `json:"timestamp" v:"required"`
|
||||
Content string `json:"content" v:"required"` // 加密后内容
|
||||
}
|
||||
|
||||
type XhsBackLeadResultDecrypted struct {
|
||||
PhoneNum string `json:"phone_num"`
|
||||
Wechat string `json:"wechat"`
|
||||
Remark string `json:"remark"`
|
||||
Area string `json:"area"`
|
||||
City string `json:"city"`
|
||||
CustomerServiceName string `json:"customer_service_name"`
|
||||
Time int64 `json:"time"`
|
||||
ExtList []struct {
|
||||
Key string `json:"key"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
} `json:"extList"`
|
||||
}
|
||||
|
||||
type XhsBackLeadResultRes struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Success bool `json:"success"`
|
||||
Data struct {
|
||||
RequestId string `json:"request_id"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
// ==================== 留资和广告归因数据推送(接收Webhook) ====================
|
||||
|
||||
type XhsPushLeadReq struct {
|
||||
UserId string `json:"user_id"`
|
||||
BrandUserId string `json:"brand_user_id"`
|
||||
KosUserId string `json:"kos_user_id"`
|
||||
ConvTime string `json:"conv_time"`
|
||||
AdvertiserName string `json:"advertiser_name"`
|
||||
AdvertiserId string `json:"advertiser_id"`
|
||||
CampaignName string `json:"campaign_name"`
|
||||
CampaignId string `json:"campaign_id"`
|
||||
CreativityName string `json:"creativity_name"`
|
||||
CreativityId string `json:"creativity_id"`
|
||||
LeadsTag string `json:"leads_tag"`
|
||||
Area string `json:"area"`
|
||||
PhoneNum string `json:"phone_num"`
|
||||
Wechat string `json:"wechat"`
|
||||
Remark string `json:"remark"`
|
||||
PushType int `json:"push_type"` // 1-进线 2-开口 3-留资 4-留资归因
|
||||
WechatCopy int `json:"wechat_copy"`
|
||||
LinkId string `json:"link_id"`
|
||||
LinkName string `json:"link_name"`
|
||||
CustomerChannel string `json:"customer_channel"`
|
||||
MsgAppOpen int `json:"msg_app_open"`
|
||||
WechatType int `json:"wechat_type"` // 1-文本 2-图片链接
|
||||
DecryptUserId string `json:"decrypt_user_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user