PhoenixKitBookings.Schemas.Unit (PhoenixKitBookings v0.1.1)

Copy Markdown View Source

A named bookable unit of a service — Room 101, Chair 2, Court A.

When a service has ANY active units, its capacity becomes the count of active units (overriding seats) and every confirmed/pending booking is auto-assigned the least-loaded free unit inside the locked create (PhoenixKitBookings.Bookings). Services without units keep the pooled seats counter (Checkfront/Planyo-style) — the Booqable trackable dichotomy, deferred per service.

Summary

Functions

service_uuid is stamped by the context, never cast.

Types

t()

@type t() :: %PhoenixKitBookings.Schemas.Unit{
  __meta__: term(),
  active: term(),
  inserted_at: term(),
  name: term(),
  service_uuid: term(),
  updated_at: term(),
  uuid: term()
}

Functions

changeset(unit, attrs)

service_uuid is stamped by the context, never cast.