diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 0b1d0aada..e1c1bc0ff 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -218,16 +218,16 @@ type ManagementSendMsgReq struct { type PictureBaseInfo struct { UUID string `mapstructure:"uuid"` - Type string `mapstructure:"type" validate:"required"` - Size int64 `mapstructure:"size" validate:"required"` - Width int32 `mapstructure:"width" validate:"required"` - Height int32 `mapstructure:"height" validate:"required"` - Url string `mapstructure:"url" validate:"required"` + Type string `mapstructure:"type" ` + Size int64 `mapstructure:"size" ` + Width int32 `mapstructure:"width" ` + Height int32 `mapstructure:"height"` + Url string `mapstructure:"url" ` } type PictureElem struct { SourcePath string `mapstructure:"sourcePath"` - SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"` + SourcePicture PictureBaseInfo `mapstructure:"sourcePicture"` BigPicture PictureBaseInfo `mapstructure:"bigPicture" ` SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"` } @@ -282,25 +282,15 @@ type RevokeElem struct { RevokeMsgClientID string `mapstructure:"revokeMsgClientID" validate:"required"` } type OANotificationElem struct { - NotificationName string `mapstructure:"notificationName" validate:"required"` - NotificationFaceURL string `mapstructure:"notificationFaceURL" validate:"required"` - NotificationType int32 `mapstructure:"notificationType" validate:"required"` - Text string `mapstructure:"text" validate:"required"` - Url string `mapstructure:"url"` - MixType int32 `mapstructure:"mixType"` - Image struct { - SourceUrl string `mapstructure:"sourceURL"` - SnapshotUrl string `mapstructure:"snapshotURL"` - } `mapstructure:"image"` - Video struct { - SourceUrl string `mapstructure:"sourceURL"` - SnapshotUrl string `mapstructure:"snapshotURL"` - Duration int64 `mapstructure:"duration"` - } `mapstructure:"video"` - File struct { - SourceUrl string `mapstructure:"sourceURL"` - FileName string `mapstructure:"fileName"` - FileSize int64 `mapstructure:"fileSize"` - } `mapstructure:"file"` - Ex string `mapstructure:"ex"` + NotificationName string `mapstructure:"notificationName" validate:"required"` + NotificationFaceURL string `mapstructure:"notificationFaceURL" validate:"required"` + NotificationType int32 `mapstructure:"notificationType" validate:"required"` + Text string `mapstructure:"text" validate:"required"` + Url string `mapstructure:"url"` + MixType int32 `mapstructure:"mixType"` + PictureElem PictureElem `mapstructure:"pictureElem"` + SoundElem SoundElem `mapstructure:"soundElem"` + VideoElem VideoElem `mapstructure:"videoElem"` + FileElem FileElem `mapstructure:"fileElem"` + Ex string `mapstructure:"ex"` }