A domain entity (table).
frontend selects the render transport for generated UI:
:live (default) emits LiveView + WebSocket; :rest emits a
controller + Inertia-style HTTP response via caravela_svelte.
realtime? opts the entity into SSE-driven live updates on top
of :rest. Only valid when frontend: :rest — a :live entity
already has LiveView's WebSocket for real-time. Generated
controllers publish broadcast_patch/3 on create / update /
delete when this flag is set.
Summary
Types
@type frontend() :: :live | :rest
@type t() :: %Caravela.Schema.Entity{ auth: Caravela.Schema.AuthConfig.t() | nil, fields: [Caravela.Schema.Field.t()], frontend: frontend(), name: atom(), realtime?: boolean() }