PhoenixLiveCalendar.Store.Ecto.EventSchema (PhoenixLiveCalendar v0.1.0)

Copy Markdown View Source

Default Ecto schema for calendar events.

This schema is provided as a convenience for consumers who opt into the Ecto persistence layer. It maps directly to PhoenixLiveCalendar.Event.

Table name

Defaults to phoenix_live_calendar_events. Configure with:

config :phoenix_live_calendar, table_prefix: "my_prefix"

Primary key

Uses UUID by default. Compatible with UUIDv7 when available.

Summary

Types

t()

Persisted calendar-event row (the runtime struct is PhoenixLiveCalendar.Event).

Functions

Creates a changeset for a new event.

Converts this Ecto schema to a PhoenixLiveCalendar.Event struct.

Types

t()

@type t() :: %PhoenixLiveCalendar.Store.Ecto.EventSchema{
  __meta__: term(),
  all_day: term(),
  badge: term(),
  border_color: term(),
  calendar_id: term(),
  category: term(),
  class: term(),
  color: term(),
  description: term(),
  display: term(),
  editable: term(),
  end_at: term(),
  end_date: term(),
  extra: term(),
  group_id: term(),
  icon: term(),
  id: term(),
  inserted_at: term(),
  location: term(),
  overlap: term(),
  priority: term(),
  recurrence_id: term(),
  resource_id: term(),
  resource_ids: term(),
  rrule: term(),
  start_at: term(),
  start_date: term(),
  status: term(),
  text_color: term(),
  title: term(),
  transparency: term(),
  updated_at: term(),
  urgency: term(),
  url: term(),
  visibility: term()
}

Persisted calendar-event row (the runtime struct is PhoenixLiveCalendar.Event).

Functions

changeset(event \\ %__MODULE__{}, attrs)

Creates a changeset for a new event.

to_event(schema)

Converts this Ecto schema to a PhoenixLiveCalendar.Event struct.