Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Battle ¶
type Battle struct { Base WikiID int `gorm:"not null;uniqueIndex"` URL string `gorm:"not null;uniqueIndex"` Name string `gorm:"not null;uniqueIndex"` PartOf string Summary string `gorm:"not null"` StartDate string `gorm:"not null;index"` StartDateNum float64 `gorm:"not null;index"` EndDate string `gorm:"not null;index"` EndDateNum float64 `gorm:"not null;index"` Place string `gorm:"not null"` Latitude string Longitude string Result string `gorm:"not null"` TerritorialChanges string Strength datatypes.JSON Casualties datatypes.JSON BattleCommanders []BattleCommander BattleFactions []BattleFaction BattleCommanderFactions []BattleCommanderFaction }
Battle is used to store data that defines a specific battle. This struct defines the SQL schema
type BattleCommander ¶
type BattleCommander struct { BattleID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` CommanderID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` Side SideKind `gorm:"type:integer;primaryKey;not null"` Battle Battle Commander Commander }
BattleCommander is used to store which commanders were part of a battle, and in which side they fought. This struct defines the SQL schema
type BattleCommanderFaction ¶
type BattleCommanderFaction struct { BattleID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` CommanderID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` FactionID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` Battle Battle Commander Commander Faction Faction }
BattleCommanderFaction is used to store under which faction each commander fought in each battle. Not all commanders were always part of the same faction, and due to the way data was obtained, in some cases it is not clear to which faction a commander belonged in a specific battle. This may result in some commanders being present in battles, but not being assigned a faction. This struct defines the SQL schema
type BattleFaction ¶
type BattleFaction struct { BattleID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` FactionID uuid.UUID `gorm:"type:uuid;primaryKey;not null"` Side SideKind `gorm:"type:integer;primaryKey;not null"` Battle Battle Faction Faction }
BattleFaction is used to store which factions were part of a battle, and in which side they fought. This struct defines the SQL schema
type Commander ¶
type Commander struct { Base WikiID int `gorm:"not null;uniqueIndex"` URL string `gorm:"not null;uniqueIndex"` Name string `gorm:"not null;index"` Summary string `gorm:"not null"` }
Commander is used to store data that defines a specific commander. This struct defines the SQL schema
type Faction ¶
type Faction struct { Base WikiID int `gorm:"not null;uniqueIndex"` URL string `gorm:"not null;uniqueIndex"` Name string `gorm:"not null;index"` Summary string `gorm:"not null"` }
Faction is used to store data that defines a specific faction. This struct defines the SQL schema