feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -0,0 +1,47 @@
package request
import (
"errors"
"github.com/anxpp/common-utils/str"
)
type UpdateChatroomInfoRequest struct {
BaseRequest
ChatroomId string
Announcement string
WelcomeMessage string
RoomName string
UpSeatType string //1=排麦 2=自由麦
IsRecordCharm string // 是否记录魅力值 1=记录 0=不记录
SendMessageTimeGap string // 发消息间隔时间 -1=不可以发 1=每1秒一次
SeatCountDown string // 麦序的倒计时秒数
}
// 注册用户信息签名验证
func (request *UpdateChatroomInfoRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.ChatroomId) == 0 {
err = errors.New("ChatroomId不能为空")
return
}
if len(request.RoomName) == 0 {
err = errors.New("RoomName不能为空")
return
}
if len(request.SeatCountDown) > 0 {
if str.StringToInt(request.SeatCountDown) < 10 || str.StringToInt(request.SeatCountDown) > 9999 {
err = errors.New("SeatCountdown只能在10-9999之间")
return
}
}
return
}