Project events (Step 12): CRUD for the V6 phoenix_kit_project_events
table — the Events extension tab's data layer. Every write logs
activity and broadcasts on the project topic; there is no notification
fan-out yet (events carry no target_uuid — deciding who an event
should notify is a product call for daylight).
Summary
Functions
Creates an event for a project. opts[:actor_uuid] for the trail.
Deletes an event.
Fetches an event scoped to its project (nil on cross-project uuids).
Events for a project ordered by start. Options: :from/:until
(DateTime bounds on starts_at), :limit.
Updates an event.
Functions
@spec create(map(), map(), keyword()) :: {:ok, PhoenixKitProjects.Schemas.ProjectEvent.t()} | {:error, Ecto.Changeset.t()}
Creates an event for a project. opts[:actor_uuid] for the trail.
@spec delete( PhoenixKitProjects.Schemas.ProjectEvent.t(), keyword() ) :: :ok | {:error, term()}
Deletes an event.
@spec get(binary(), binary()) :: PhoenixKitProjects.Schemas.ProjectEvent.t() | nil
Fetches an event scoped to its project (nil on cross-project uuids).
@spec list_for_project( binary(), keyword() ) :: [PhoenixKitProjects.Schemas.ProjectEvent.t()]
Events for a project ordered by start. Options: :from/:until
(DateTime bounds on starts_at), :limit.
@spec update(PhoenixKitProjects.Schemas.ProjectEvent.t(), map(), keyword()) :: {:ok, PhoenixKitProjects.Schemas.ProjectEvent.t()} | {:error, Ecto.Changeset.t()}
Updates an event.