This commit is contained in:
2025-08-05 17:46:04 +08:00
parent e03259608e
commit e43d78ddf0
8 changed files with 1294 additions and 0 deletions
@@ -0,0 +1,42 @@
package request
// SaveMpConfigRequest 保存微信配置请求
type SaveMpConfigRequest struct {
ConfigType string `json:"configType" binding:"required" example:"mp"`
AppID string `json:"appId" binding:"required" example:"wx1234567890"`
AppSecret string `json:"appSecret" binding:"required" example:"your_app_secret"`
Token *string `json:"token" example:"your_token"`
EncodingAESKey *string `json:"encodingAESKey" example:"your_encoding_aes_key"`
// 公众号特有配置
ServerURL *string `json:"serverUrl" example:"https://your-server.com"`
WebhookURL *string `json:"webhookUrl" example:"https://your-server.com/webhook"`
// 小程序特有配置
MiniAppName *string `json:"miniAppName" example:"我的小程序"`
MiniAppDesc *string `json:"miniAppDesc" example:"小程序描述"`
// 状态信息
Status string `json:"status" example:"active"`
// 扩展配置
ExtraConfig *string `json:"extraConfig" example:"{}"`
Remark *string `json:"remark" example:"配置备注"`
}
// TestMpConfigRequest 测试微信配置请求
type TestMpConfigRequest struct {
ConfigType string `json:"configType" binding:"required" example:"mp"`
AppID string `json:"appId" binding:"required" example:"wx1234567890"`
AppSecret string `json:"appSecret" binding:"required" example:"your_app_secret"`
Token *string `json:"token" example:"your_token"`
EncodingAESKey *string `json:"encodingAESKey" example:"your_encoding_aes_key"`
// 公众号特有配置
ServerURL *string `json:"serverUrl" example:"https://your-server.com"`
WebhookURL *string `json:"webhookUrl" example:"https://your-server.com/webhook"`
// 小程序特有配置
MiniAppName *string `json:"miniAppName" example:"我的小程序"`
MiniAppDesc *string `json:"miniAppDesc" example:"小程序描述"`
}
@@ -0,0 +1,56 @@
package request
// CreateMpNewsRequest 创建图文记录请求
type CreateMpNewsRequest struct {
MediaID string `json:"mediaId" example:"media_id_123"`
Title string `json:"title" binding:"required" example:"图文标题"`
Author *string `json:"author" example:"作者名称"`
Digest *string `json:"digest" example:"图文摘要"`
Content *string `json:"content" example:"图文内容"`
ContentURL *string `json:"contentUrl" example:"https://mp.weixin.qq.com/s/xxx"`
SourceURL *string `json:"sourceUrl" example:"https://example.com"`
ThumbMediaID *string `json:"thumbMediaId" example:"thumb_media_id"`
ThumbURL *string `json:"thumbUrl" example:"https://example.com/thumb.jpg"`
ShowCover bool `json:"showCover" example:"true"`
NeedOpenComment bool `json:"needOpenComment" example:"false"`
OnlyFansCanComment bool `json:"onlyFansCanComment" example:"false"`
// 发布信息
PublishStatus string `json:"publishStatus" example:"draft"`
// 微信相关
WechatURL *string `json:"wechatUrl" example:"https://mp.weixin.qq.com/s/xxx"`
WechatMsgID *string `json:"wechatMsgId" example:"msg_id_123"`
}
// UpdateMpNewsRequest 更新图文记录请求
type UpdateMpNewsRequest struct {
ID uint `json:"id" binding:"required"`
MediaID string `json:"mediaId"`
Title string `json:"title"`
Author *string `json:"author"`
Digest *string `json:"digest"`
Content *string `json:"content"`
ContentURL *string `json:"contentUrl"`
SourceURL *string `json:"sourceUrl"`
ThumbMediaID *string `json:"thumbMediaId"`
ThumbURL *string `json:"thumbUrl"`
ShowCover bool `json:"showCover"`
NeedOpenComment bool `json:"needOpenComment"`
OnlyFansCanComment bool `json:"onlyFansCanComment"`
// 发布信息
PublishStatus string `json:"publishStatus"`
// 微信相关
WechatURL *string `json:"wechatUrl"`
WechatMsgID *string `json:"wechatMsgId"`
}
// MpNewsPageRequest 图文记录分页请求
type MpNewsPageRequest struct {
PageInfo
Title *string `json:"title" form:"title"`
Author *string `json:"author" form:"author"`
PublishStatus *string `json:"publishStatus" form:"publishStatus"`
}