This commit is contained in:
@@ -9,7 +9,7 @@ const TableNameTask = "player_task"
|
||||
|
||||
// Task mapped from table <task>
|
||||
type Task struct {
|
||||
Base
|
||||
*cool.Model
|
||||
PlayerID uint64 `gorm:"not null;index:idx_task_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
TaskID uint32 `gorm:"not null;comment:'任务ID'" json:"task_id"`
|
||||
Data []uint32 `struc:"[20]byte" gorm:"type:jsonb;not null;default:'[]';comment:'全部数据'" json:"data"`
|
||||
@@ -30,7 +30,7 @@ func (*Task) GroupName() string {
|
||||
// NewPlayerInfo create a new PlayerInfo
|
||||
func NewTask() *Task {
|
||||
return &Task{
|
||||
Base: *NewBase(),
|
||||
Model: cool.NewModel(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user