Gamend.LobbySnapshots.Event (gamend_core v1.0.1192)

Copy Markdown View Source

A decision worth explaining, recorded between two snapshots.

Snapshots record what changed; they cannot record why. A snapshot shows speed: 100 -> 50; only an event carries the gap and targets_ahead that produced it.

Which interval an event falls in is derived at read time by timeline/1 — the latest snapshot at or before the event — rather than stored. See the migration.

Summary

Types

t()

@type t() :: %Gamend.LobbySnapshots.Event{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  kind: term(),
  lobby_id: term(),
  payload: term(),
  user: term(),
  user_id: term()
}

Functions

changeset(event, attrs)

@spec changeset(t(), map()) :: Ecto.Changeset.t()