fix errors on insertion to game, fix db creation of game
This commit is contained in:
@@ -3,20 +3,20 @@ package json
|
||||
import "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/temp_models/db"
|
||||
|
||||
type CardDeck struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
Img string `json:"img"`
|
||||
Cards []*Card `json:"cards"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
Rotation int `json:"rotation"`
|
||||
DisplayCount bool `json:"displayCount"`
|
||||
Stats Stats `json:"_stats"`
|
||||
Ownership Ownership `json:"ownership"`
|
||||
Folder string `json:"folder"`
|
||||
Sort int `json:"sort"`
|
||||
ID string `json:"_id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
Img string `json:"img"`
|
||||
Cards []*Card `json:"cards"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
Rotation int `json:"rotation"`
|
||||
DisplayCount bool `json:"displayCount"`
|
||||
Stats Stats `json:"_stats"`
|
||||
Ownership map[string]int `json:"ownership,omitempty"`
|
||||
Folder string `json:"folder"`
|
||||
Sort int `json:"sort"`
|
||||
ID string `json:"_id"`
|
||||
// Flags any `json:"flags"`
|
||||
// Cards0System any `json:"system"`
|
||||
}
|
||||
@@ -41,8 +41,8 @@ func (c *CardDeck) ToDB(dest **db.CardDeck) bool {
|
||||
}
|
||||
|
||||
c.Stats.ToDB(&cardDeck.Stats)
|
||||
c.Ownership.ToDB(&cardDeck.Ownership)
|
||||
|
||||
OwnershipToDB(&cardDeck.Ownership, c.Ownership)
|
||||
CopySliceToDB(&cardDeck.Cards, c.Cards)
|
||||
|
||||
*dest = cardDeck
|
||||
|
||||
Reference in New Issue
Block a user