videoplayer/proto/user_req.go

68 lines
3.3 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 proto
import (
"time"
)
type UpdateUserInfoReq struct {
ID int `json:"id" form:"id"` //用户id
Username string `json:"name" form:"name"` //用户名
Age int `json:"age" form:"age"` //年龄
Role string `json:"role" form:"role"` //角色
Gender string `json:"gender" form:"gender"` //性别
Redis bool `json:"redis" form:"redis"` //是否刷新redis
Upload bool `json:"upload" form:"upload"` //是否上传头像
VideoFunc bool `json:"video_func" form:"video_func"` //视频功能
DeviceFunc bool `json:"device_func" form:"device_func"` //设备功能
CIDFunc bool `json:"cid_func" form:"cid_func"` //持续集成功能
Run bool `json:"run" form:"run"` //是否运行
Avatar string `json:"avatar" form:"avatar"` //头像
}
type CIDRUN struct {
CID uint `json:"cid" form:"cid"` //持续集成ID,查找持续集成任务
Curr int `json:"curr" form:"curr"` //当前剩余时间每次执行减10s小于等于0则执行
Every int `json:"every" form:"every"` //每隔多少秒执行一次,小于等于0表示不执行时间粒度为10s
}
// 用于执行函数,方法
type CronInfo struct {
Type int `json:"type" form:"type"` //类型编码,1日志清理且只会有一个其他待定2从服务器同步数据
Info string `json:"info" form:"info"` //信息
Curr int `json:"curr" form:"curr"` //当前剩余时间每次执行减10s小于等于0则执行
Every int `json:"every" form:"every"` //每隔多少秒执行一次,小于等于0表示不执行时间粒度为10s
}
// 用户数据同步
type UserSync struct {
Update []UserAddOrUpdate `json:"update" form:"update"` //更新用户
Add []UserAddOrUpdate `json:"add" form:"add"` //添加用户
Delete []UserDelID `json:"delete" form:"delete"` //删除用户
}
type UserDelID struct {
ID uint `json:"ID" form:"ID"` //用户id
}
type UserAddOrUpdate struct {
ID uint `json:"ID" form:"ID"` //用户id
CreatedAt time.Time `json:"CreatedAt" form:"CreatedAt"` //创建时间
UpdatedAt time.Time `json:"UpdatedAt" form:"UpdatedAt"` //更新时间
DeletedAt time.Time `json:"DeletedAt" form:"DeletedAt"` //删除时间
Name string `json:"Name" form:"Name"` //用户名
Age int `json:"Age" form:"Age"` //年龄
Email string `json:"Email" form:"Email"` //邮箱
Password string `json:"Password" form:"Password"` //密码
Gender string `json:"Gender" form:"Gender"` //性别
Role string `json:"Role" form:"Role"` //角色
Redis bool `json:"Redis" form:"Redis"` //是否刷新redis
Run bool `json:"Run" form:"Run"` //是否运行
Upload bool `json:"Upload" form:"Upload"` //是否上传头像
VideoFunc bool `json:"VideoFunc" form:"VideoFunc"` //视频功能
DeviceFunc bool `json:"DeviceFunc" form:"DeviceFunc"`
CIDFunc bool `json:"CIDFunc" form:"CIDFunc"`
Avatar string `json:"Avatar" form:"Avatar"` //头像
CreateTime string `json:"CreateTime" form:"CreateTime"`
UpdateTime string `json:"UpdateTime" form:"UpdateTime"`
}