41 lines
2.1 KiB
Go
41 lines
2.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// GameMapTrackPoint is the safe, map-normalized and retention-bounded trajectory table shape.
|
|
type GameMapTrackPoint struct {
|
|
ID string `json:"id" db:"id"`
|
|
EventID string `json:"eventId" db:"event_id"`
|
|
ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"`
|
|
MapID string `json:"mapId" db:"map_id"`
|
|
MapVersion string `json:"mapVersion" db:"map_version"`
|
|
EntityKind string `json:"entityKind" db:"entity_kind"`
|
|
EntityID string `json:"entityId" db:"entity_id"`
|
|
GamePlayerRecordID string `json:"gamePlayerRecordId,omitempty" db:"game_player_record_id"`
|
|
MapX float64 `json:"mapX" db:"map_x"`
|
|
MapY float64 `json:"mapY" db:"map_y"`
|
|
Source string `json:"source" db:"source"`
|
|
OccurredAt time.Time `json:"occurredAt" db:"occurred_at"`
|
|
CollectedAt time.Time `json:"collectedAt" db:"collected_at"`
|
|
ExpiresAt time.Time `json:"expiresAt" db:"expires_at"`
|
|
}
|
|
|
|
func (GameMapTrackPoint) TableName() string { return "game_map_track_points" }
|
|
|
|
// GamePlayerVehicleSegment is a server-local, typed ride association; it contains no vehicle storage details.
|
|
type GamePlayerVehicleSegment struct {
|
|
ID string `json:"id" db:"id"`
|
|
EventID string `json:"eventId" db:"event_id"`
|
|
ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"`
|
|
GamePlayerRecordID string `json:"gamePlayerRecordId" db:"game_player_record_id"`
|
|
GamePlayerID string `json:"gamePlayerId" db:"game_player_id"`
|
|
VehicleID string `json:"vehicleId" db:"vehicle_id"`
|
|
MapID string `json:"mapId" db:"map_id"`
|
|
MapVersion string `json:"mapVersion" db:"map_version"`
|
|
StartedAt time.Time `json:"startedAt" db:"started_at"`
|
|
EndedAt time.Time `json:"endedAt,omitempty" db:"ended_at"`
|
|
ExpiresAt time.Time `json:"expiresAt" db:"expires_at"`
|
|
}
|
|
|
|
func (GamePlayerVehicleSegment) TableName() string { return "game_player_vehicle_segments" }
|