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 inconcordia-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, velouuid
Optional reference to normalized address with geolocation
decimal(10,7)
Latitude coordinate (-90 to 90)Example:
48.8566969decimal(10,7)
Longitude coordinate (-180 to 180)Example:
2.3514616Contact 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, luxuryRatings
decimal(2,1)
Average rating (0.0 to 5.0), calculated automatically from reviewsExample:
4.2integer
Total number of published reviewsExample:
42Status Workflow
Places follow a state machine for moderation:enum
default:"pending_review"
required
Current status:
pending_review, published, archived, rejectedState Transitions
When status transitions to
published, the published_at timestamp is automatically set.Multi-Language Translations
Fromconcordia-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, estext
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
Fromconcordia-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, enumtext[]
Required if
value_type is enumExample: ["gratuit", "payant"]uuid[]
Categories this attribute applies to (null = all categories)
Attribute Values
Fromconcordia-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
booleantext
Populated if attribute type is
string or enum (max 255 chars)integer
Populated if attribute type is
integerdecimal
Populated if attribute type is
decimalOwnership Model
Places follow the “Propriétaire” (owner) model from the specifications:- User Role: User must have the
ownerrole in theuser_roletable - Submission: Owner creates a place with status
pending_review - Moderation: Admin reviews and approves/rejects
- Management: Owner can update, archive, and reactivate their places
- 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
Fromconcordia-specs.md (lines 523-542):
Gastronomy Details
Fromconcordia-specs.md (lines 544-561):
Activity Details
Fromconcordia-specs.md (lines 563-579):
Address Structure
Fromconcordia-specs.md (lines 581-599), addresses are normalized:
Integration Points
With Reviews
Places can receive reviews that automatically updaterating_avg and rating_count fields.
With Services
Places can have associated services via thelocal_service table’s place_id foreign key.
With Bookings
Places can define availability schedules viaservice_availability for reservation systems.
With Blog Articles
Articles can reference places viaarticle_place_link for editorial content.
Example JSON
Fromconcordia-specs.md (lines 450-480):