package model import "time" // GamePlayer is the model-first table shape for an independent server-local game identity. type GamePlayer struct { ID string `json:"id" db:"id"` ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"` GamePlayerID string `json:"gamePlayerId" db:"game_player_id"` DisplayName string `json:"displayName" db:"display_name"` FirstSeenAt time.Time `json:"firstSeenAt" db:"first_seen_at"` LastSeenAt time.Time `json:"lastSeenAt" db:"last_seen_at"` LastEventAt time.Time `json:"lastEventAt" db:"last_event_at"` CreatedAt time.Time `json:"createdAt" db:"created_at"` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` } func (GamePlayer) TableName() string { return "game_players" } type GamePlayerAlias struct { ID string `json:"id" db:"id"` GamePlayerRecordID string `json:"gamePlayerRecordId" db:"game_player_record_id"` ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"` Alias string `json:"alias" db:"alias"` FirstSeenAt time.Time `json:"firstSeenAt" db:"first_seen_at"` LastSeenAt time.Time `json:"lastSeenAt" db:"last_seen_at"` } func (GamePlayerAlias) TableName() string { return "game_player_aliases" } type GamePlayerSession struct { ID string `json:"id" db:"id"` GamePlayerRecordID string `json:"gamePlayerRecordId" db:"game_player_record_id"` ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"` SourceSessionID string `json:"sourceSessionId" db:"source_session_id"` StartedAt time.Time `json:"startedAt" db:"started_at"` EndedAt time.Time `json:"endedAt,omitempty" db:"ended_at"` EndReason string `json:"endReason,omitempty" db:"end_reason"` LastEventAt time.Time `json:"lastEventAt" db:"last_event_at"` } func (GamePlayerSession) TableName() string { return "game_player_sessions" } // GameAccessAttempt intentionally has no raw address field; correlation is irreversible and server-scoped. type GameAccessAttempt struct { ID string `json:"id" db:"id"` ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"` GamePlayerRecordID string `json:"gamePlayerRecordId" db:"game_player_record_id"` EventID string `json:"eventId" db:"event_id"` OccurredAt time.Time `json:"occurredAt" db:"occurred_at"` Outcome string `json:"outcome" db:"outcome"` Reason string `json:"reason" db:"reason"` NetworkCorrelationKey string `json:"-" db:"network_correlation_key"` ExpiresAt time.Time `json:"expiresAt" db:"expires_at"` } func (GameAccessAttempt) TableName() string { return "game_access_attempts" } type GameSecuritySignal struct { ID string `json:"id" db:"id"` ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"` GamePlayerRecordID string `json:"gamePlayerRecordId" db:"game_player_record_id"` RuleKey string `json:"ruleKey" db:"rule_key"` Status string `json:"status" db:"status"` EvidenceCount int `json:"evidenceCount" db:"evidence_count"` Summary string `json:"summary" db:"summary"` FirstObservedAt time.Time `json:"firstObservedAt" db:"first_observed_at"` LastObservedAt time.Time `json:"lastObservedAt" db:"last_observed_at"` ExpiresAt time.Time `json:"expiresAt" db:"expires_at"` } func (GameSecuritySignal) TableName() string { return "game_security_signals" }