Skip to main content

Places Directory

The Places Directory is Concordia’s core feature for managing physical establishments and points of interest. It supports multi-language translations, dynamic attributes, and a complete ownership model where proprietors can manage their own listings.

Overview

The directory system enables:
  • Submission and management of places by proprietors (owners)
  • Multi-language translations for international reach
  • Dynamic attribute system for flexible place characteristics
  • Moderation workflow with status management
  • Integration with reviews, bookings, and services

Place Entity

Based on the specifications in concordia-specs.md, places represent physical establishments or points of interest.

Core Fields

uuid
required
Unique identifier for the place
uuid
required
Reference to the user who owns/manages this place. User must have the owner role.
uuid
required
Reference to a leaf category of type place. Categories can be hierarchical (max 3 levels).
text
required
Unique URL-friendly identifier (2-220 chars, alphanumeric + hyphens)Example: "hotel-du-parc-paris"
enum
required
Place type from: restaurant, hotel, camping, commerce, admin, activity, poi, trail, balade, randonnee, velo
uuid
Optional reference to normalized address with geolocation
decimal(10,7)
Latitude coordinate (-90 to 90)Example: 48.8566969
decimal(10,7)
Longitude coordinate (-180 to 180)Example: 2.3514616

Contact Information

text
Contact email for the establishment
text
Phone number in E.164 format
text
Valid URL for the establishment’s website

Business Details

jsonb
Structured JSON object with opening hours by day of week
text[]
Accessibility featuresExample: ["wheelchair", "elevator"]
text[]
Target audience labelsExample: ["families", "couples", "business"]
enum
Price level: low, medium, high, luxury

Ratings

decimal(2,1)
Average rating (0.0 to 5.0), calculated automatically from reviewsExample: 4.2
integer
Total number of published reviewsExample: 42

Status Workflow

Places follow a state machine for moderation:
enum
default:"pending_review"
required
Current status: pending_review, published, archived, rejected

State Transitions

When status transitions to published, the published_at timestamp is automatically set.

Multi-Language Translations

From concordia-specs.md (lines 484-502), places support translations via the place_translation table:

Translation Fields

uuid
required
Reference to the parent place
text
required
ISO 639-1 language code: fr, en, ar, es
text
required
Translated name (2-200 chars)Example: "Hôtel du Parc"
text
Translated description (max 2000 chars)Example: "Un hôtel charmant au cœur de la ville..."
A place must have at least one translation in the owner’s preferred language. The composite key (place_id, language) ensures uniqueness.

Dynamic Attributes

The attribute system allows flexible, admin-defined characteristics for places.

Attribute Definition

From concordia-specs.md (lines 337-359), administrators create attribute definitions:
text
required
Attribute name (2-100 chars, globally unique)Example: "Wifi"
enum
required
Data type: boolean, string, integer, decimal, enum
text[]
Required if value_type is enumExample: ["gratuit", "payant"]
uuid[]
Categories this attribute applies to (null = all categories)

Attribute Values

From concordia-specs.md (lines 504-521), owners set values via place_attribute_value:
uuid
required
Reference to the place
uuid
required
Reference to the attribute definition
boolean
Populated if attribute type is boolean
text
Populated if attribute type is string or enum (max 255 chars)
integer
Populated if attribute type is integer
decimal
Populated if attribute type is decimal
Exactly one value_* field must be non-null, matching the attribute definition’s value_type.

Ownership Model

Places follow the “Propriétaire” (owner) model from the specifications:
  1. User Role: User must have the owner role in the user_role table
  2. Submission: Owner creates a place with status pending_review
  3. Moderation: Admin reviews and approves/rejects
  4. Management: Owner can update, archive, and reactivate their places
  5. Restrictions: Delete only allowed if no bookings or reviews exist

Specialized Place Types

Based on place type, additional detail tables provide type-specific fields:

Accommodation Details

From concordia-specs.md (lines 523-542):

Gastronomy Details

From concordia-specs.md (lines 544-561):

Activity Details

From concordia-specs.md (lines 563-579):

Address Structure

From concordia-specs.md (lines 581-599), addresses are normalized:

Integration Points

With Reviews

Places can receive reviews that automatically update rating_avg and rating_count fields.

With Services

Places can have associated services via the local_service table’s place_id foreign key.

With Bookings

Places can define availability schedules via service_availability for reservation systems.

With Blog Articles

Articles can reference places via article_place_link for editorial content.

Example JSON

From concordia-specs.md (lines 450-480):