Fix player deletion. Add PersonaID + NucleusID fetching upon Add-Player action.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package models
|
||||
|
||||
type Player struct {
|
||||
ID uint `json:"id" gorm:"primary_key"`
|
||||
Name string `json:"name"`
|
||||
ClanID uint `json:"clan_id"`
|
||||
Clan Clan `gorm:"references:ID"`
|
||||
ID uint `json:"id" gorm:"primary_key"`
|
||||
Name string `json:"name" gorm:"not null"`
|
||||
PersonaID uint `json:"persona_id" gorm:"not null"`
|
||||
NucleusID uint `json:"nucleus_id" gorm:"not null"`
|
||||
ClanID uint `json:"clan_id" gorm:"not null"`
|
||||
Clan Clan `gorm:"references:ID"`
|
||||
}
|
||||
|
||||
@@ -14,3 +14,10 @@ type Weapon struct {
|
||||
ShotsHit int `json:"shotsHit"`
|
||||
Accuracy float64 `json:"-"`
|
||||
}
|
||||
|
||||
type PlayerIDsJSON struct {
|
||||
Results []struct {
|
||||
PersonaID uint `json:"personaId"`
|
||||
NucleusID uint `json:"nucleusId"`
|
||||
} `json:"results"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user