Files
bl/modules/blazing/model/TeamInfo.go
昔念 50232339d9 ```
refactor(rpc): 更新结构体标签以跳过特定字段序列化

将多个结构体中的 `struc:"[0]pad"` 标签更改为 `struc:"skip"`,
以避免在序列化过程中处理不必要的填充字段。同时新增放生与领回相关逻辑,
并完善部分控制器函数和消息结构定义。
```
2025-11-24 11:56:20 +08:00

35 lines
1.1 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 model
// TeamInfo 战队信息结构
type TeamInfo struct {
//Head common.TomeeHeader `cmd:"1001" struc:"skip"` // 命令头
ID uint32 `struc:"uint32" default:"0"` // 默认值0
Priv uint32 `struc:"uint32" default:"1"` // 默认值1
SuperCore uint32 `struc:"uint32" default:"1"` // 默认值1
IsShow uint32 `struc:"uint32" default:"1"` // 默认值1
AllContribution uint32 `struc:"uint32" default:"1"` // 默认值1
CanExContribution uint32 `struc:"uint32" default:"1"` // 默认值1
}
// InitDefaults 初始化默认值
func (t *TeamInfo) InitDefaults() {
t.ID = 0
t.Priv = 1
t.SuperCore = 1
t.IsShow = 1
t.AllContribution = 1
t.CanExContribution = 1
}
// TeamPKInfo 战队PK相关信息结构
type TeamPKInfo struct {
GroupID uint32 `struc:"uint32" default:"1"` // 分组ID默认值1@UInt long
HomeTeamID uint32 `struc:"uint32" default:"1"` // 主队ID默认值1@UInt long
}
// InitDefaults 初始化默认值(确保字段默认值正确赋值)
func (t *TeamPKInfo) InitDefaults() {
t.GroupID = 1
t.HomeTeamID = 1
}