Skip to content

public.court

Description

Columns

Name Type Default Nullable Children Parents Comment
id uuid false public.court_image public.game public.match_series public.court_blocker_court Unique identifier for the court.(DC2Type:uuid)
name varchar(255) false Display name of the court (e.g., "Court 1", "Center Court").
club_id uuid true public.club Reference to the club this court belongs to. Cascades on delete.(DC2Type:uuid)
location_type varchar(255) false Location type of the court: INDOOR or OUTDOOR. Must be one of the predefined LOCATIONS constants.
match_type varchar(255) true Supported match type: SINGLES or DOUBLES. Null indicates support for both types.
contentful_id varchar(64) false Unique identifier from Contentful CMS for content synchronization.
is_active boolean false false Flag indicating whether this court is currently active and available for booking.
sport_id uuid false public.sport Reference to the sport type this court is designed for (e.g., TENNIS, PADEL, PICKLEBALL).(DC2Type:uuid)
is_premium boolean false false Flag indicating whether this is a premium court requiring special access or additional fees.

Constraints

Name Type Definition
fk_63ae193f61190a32 FOREIGN KEY FOREIGN KEY (club_id) REFERENCES club(id) ON DELETE CASCADE
court_pkey PRIMARY KEY PRIMARY KEY (id)
fk_63ae193fac78bcf8 FOREIGN KEY FOREIGN KEY (sport_id) REFERENCES sport(id)

Indexes

Name Definition
court_pkey CREATE UNIQUE INDEX court_pkey ON public.court USING btree (id)
idx_63ae193f61190a32 CREATE INDEX idx_63ae193f61190a32 ON public.court USING btree (club_id)
uniq_63ae193fd756ce8c CREATE UNIQUE INDEX uniq_63ae193fd756ce8c ON public.court USING btree (contentful_id)
idx_63ae193fac78bcf8 CREATE INDEX idx_63ae193fac78bcf8 ON public.court USING btree (sport_id)

Relations

er


Generated by tbls