Alle tabellen leven in Supabase (PostgreSQL). UUIDs worden gegenereerd door Supabase (gen_random_uuid()).
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | Primary key |
first_name | text | ✅ | |
last_name | text | ✅ | |
email | text | ✅ | Uniek, gekoppeld aan Supabase Auth |
phone | text | | |
whatsapp | text | | Kan afwijken van telefoon |
address | text | | |
emergency_contact_name | text | | |
emergency_contact_phone | text | | |
locale | text | ✅ | nl / en / es / pap |
notes | text | | Interne notities (alleen admin) |
onboarding_completed | boolean | ✅ | Default: false |
terms_accepted_at | timestamptz | | Moment van akkoord voorwaarden |
created_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
client_id | uuid | ✅ | FK → clients |
name | text | ✅ | |
breed | text | | |
date_of_birth | date | | |
gender | text | | male / female |
neutered | boolean | | |
weight_kg | numeric | | |
color | text | | |
microchip_number | text | | |
passport_number | text | | Hondenpaspoort nummer |
photo_url | text | | Opgeslagen in Supabase Storage |
trial_day_passed | boolean | ✅ | Default: false. Verplicht voor andere diensten |
trial_day_date | date | | Datum testdag doorlopen |
vet_name | text | | |
vet_phone | text | | |
medical_conditions | text | | |
medications | text | | Medicijnen + dosering |
allergies | text | | |
insured | boolean | | |
food_brand | text | | |
food_amount | text | | Bijv. “1 kop 2x per dag” |
feeding_times | text | | |
food_notes | text | | |
good_with_dogs | boolean | | |
good_with_children | boolean | | |
energy_level | text | | low / medium / high |
behavior_notes | text | | |
special_notes | text | | Bijzonderheden voor volgend bezoek (bijv. eerdere ziekte, gedrag). Zichtbaar bij check-in |
notes | text | | Algemene notities |
active | boolean | ✅ | Default: true |
created_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
dog_id | uuid | ✅ | FK → dogs |
vaccine_type | text | ✅ | DHLPP / Bordetella / Rabies |
date_administered | date | ✅ | |
expiry_date | date | ✅ | |
document_url | text | | Upload in Supabase Storage |
verified_by_admin | boolean | ✅ | Default: false |
created_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
name | jsonb | ✅ | { nl, en, es, pap } |
description | jsonb | | { nl, en, es, pap } |
type | text | ✅ | single / bundle / subscription |
price | numeric | ✅ | |
price_unit | text | ✅ | per_day / per_night / per_session / per_month |
bundle_credits | integer | | Alleen bij type bundle |
bundle_expiry_days | integer | | Optioneel: geldigheid bundel in dagen |
active | boolean | ✅ | Default: true |
created_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
client_id | uuid | ✅ | FK → clients |
check_in | timestamptz | ✅ | |
check_out | timestamptz | | Null bij open check-out |
status | text | ✅ | pending / confirmed / checked_in / checked_out / cancelled |
room_type | text | | outside_ac / ac_room / ac_deluxe / presidential |
special_instructions | text | | Algemene instructies voor deze boeking |
authorized_pickup | text | | Geautoriseerde personen voor ophalen |
medication_admin | boolean | ✅ | Default: false. Medicatie toediening nodig? |
total_amount | numeric | ✅ | Berekend totaal |
notes | text | | Interne notities admin |
cancelled_at | timestamptz | | |
cancelled_by | uuid | | FK → users |
cancellation_reason | text | | |
created_at | timestamptz | ✅ | |
Alle fysieke kamers van het hotel.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
name | text | ✅ | Bijv. “Kamer 1”, “Presidential Suite” |
type | text | ✅ | outside_ac / ac_room / ac_deluxe / presidential |
capacity | integer | ✅ | Max aantal honden (normaal 1) |
has_airco | boolean | ✅ | Default: false |
active | boolean | ✅ | Default: true. Inactief = buiten gebruik |
notes | text | | Bijv. “naast zwembad”, “extra groot” |
created_at | timestamptz | ✅ | |
Welke hond zit in welke kamer, per boeking.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
room_id | uuid | ✅ | FK → rooms |
booking_id | uuid | ✅ | FK → bookings |
dog_id | uuid | ✅ | FK → dogs |
assigned_from | timestamptz | ✅ | Start kameringebruikname (normaal check-in) |
assigned_until | timestamptz | | Einde kameringebruikname (normaal check-out) |
assigned_by | uuid | | FK → users (medewerker die toewijst) |
created_at | timestamptz | ✅ | |
Unieke constraint: UNIQUE(room_id, assigned_from, assigned_until) — voorkomt dubbele toewijzing.
Koppeltabel: welke honden zitten in een boeking en welke dienst.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
booking_id | uuid | ✅ | FK → bookings |
dog_id | uuid | ✅ | FK → dogs |
service_id | uuid | ✅ | FK → services |
special_instructions | text | | Per hond specifiek voor dit verblijf |
price | numeric | ✅ | Prijs op moment van boeking (snapshot) |
bundle_usage_id | uuid | | FK → bundle_usage (indien strippenkaart) |
Strippenkaarten en trainingspakketten.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
client_id | uuid | ✅ | FK → clients |
dog_id | uuid | ✅ | FK → dogs |
service_id | uuid | ✅ | FK → services |
type | text | ✅ | strippenkaart / training |
total_credits | integer | ✅ | Gekocht aantal |
used_credits | integer | ✅ | Default: 0 |
expires_at | date | | Optioneel |
price_paid | numeric | ✅ | |
payment_id | uuid | | FK → payments |
purchased_at | timestamptz | ✅ | |
remaining_credits is een computed column: total_credits - used_credits
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
bundle_id | uuid | ✅ | FK → bundles |
booking_id | uuid | ✅ | FK → bookings |
credits_used | integer | ✅ | Default: 1 |
used_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
bundle_id | uuid | ✅ | FK → bundles |
dog_id | uuid | ✅ | FK → dogs |
lesson_number | integer | ✅ | Les 1, 2, 3… |
scheduled_at | timestamptz | | |
status | text | ✅ | scheduled / completed / missed / cancelled |
trainer_notes | text | | Zichtbaar voor klant |
created_at | timestamptz | ✅ | |
Unlimited daycare abonnementen.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
client_id | uuid | ✅ | FK → clients |
dog_id | uuid | ✅ | FK → dogs |
service_id | uuid | ✅ | FK → services |
start_date | date | ✅ | |
end_date | date | | Null = doorlopend |
price_per_month | numeric | ✅ | |
billing_day | integer | ✅ | Dag van de maand (bijv. 1) |
status | text | ✅ | active / paused / cancelled |
next_billing_date | date | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
subscription_id | uuid | ✅ | FK → subscriptions |
period_start | date | ✅ | |
period_end | date | ✅ | |
amount | numeric | ✅ | |
due_date | date | ✅ | |
status | text | ✅ | pending / paid / overdue / cancelled |
reminder_count | integer | ✅ | Default: 0 |
last_reminder_at | timestamptz | | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
booking_id | uuid | | FK → bookings (null bij bundel/abonnement) |
bundle_id | uuid | | FK → bundles |
subscription_invoice_id | uuid | | FK → subscription_invoices |
amount | numeric | ✅ | |
method | text | ✅ | sentoo / card / cash / pin |
status | text | ✅ | pending / success / failed / cancelled / expired |
sentoo_transaction_id | text | | Alleen bij Sentoo |
sentoo_payment_url | text | | Betaallink voor klant |
paid_at | timestamptz | | |
marked_by | uuid | | FK → users (bij handmatig) |
created_at | timestamptz | ✅ | |
Medewerkers van het hotel (admin panel toegang).
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | Gekoppeld aan Supabase Auth |
email | text | ✅ | |
first_name | text | ✅ | |
last_name | text | ✅ | |
role | text | ✅ | admin / medewerker / trainer |
active | boolean | ✅ | Default: true |
created_at | timestamptz | ✅ | |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
invoice_number | text | ✅ | Auto-increment, bijv. 2026000238 |
booking_id | uuid | | FK → bookings (null bij bundel/abonnement) |
bundle_id | uuid | | FK → bundles |
subscription_invoice_id | uuid | | FK → subscription_invoices |
client_id | uuid | ✅ | FK → clients |
status | text | ✅ | draft / concept / approved / sent / paid / cancelled |
subtotal | numeric | ✅ | Som van regels |
tax_bbo | numeric | ✅ | 6% BBO |
tax_bazv | numeric | ✅ | 1.5% BAZV |
total | numeric | ✅ | Eindtotaal |
discount_percent | numeric | | Korting percentage (indien van toepassing) |
discount_reason | text | | Bijv. “Langdurig verblijf >30 dagen” |
concept_notes | text | | Admin notities bij concept-factuur |
approved_by | uuid | | FK → users |
approved_at | timestamptz | | |
sent_at | timestamptz | | |
due_date | date | ✅ | Vervaldatum |
created_at | timestamptz | ✅ | |
draft → concept → approved → sent → paid
draft: automatisch gegenereerd door systeem
concept: handmatige controle nodig (langdurig verblijf, kortingen)
approved: goedgekeurd door admin, klaar om te versturen
sent: verstuurd naar klant met betaallink
paid: betaald via Sentoo webhook of handmatig gemarkeerd
cancelled: geannuleerd
Regelitems per factuur. Eén regel per hond per dienst.
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
invoice_id | uuid | ✅ | FK → invoices |
dog_id | uuid | | FK → dogs |
service_id | uuid | | FK → services |
description | text | ✅ | Bijv. “AC Room Deluxe - Max - 5 dagen” |
quantity | numeric | ✅ | Aantal dagen/lessen/stuks |
unit_price | numeric | ✅ | Prijs per eenheid |
discount_percent | numeric | | Korting op deze regel |
line_total | numeric | ✅ | quantity * unit_price * (1 - discount) |
| Kolom | Type | Verplicht | Toelichting |
|---|
id | uuid | ✅ | |
user_id | uuid | ✅ | FK → users |
action | text | ✅ | create / update / delete / approve |
entity_type | text | ✅ | booking / invoice / payment / dog / client |
entity_id | uuid | ✅ | |
metadata | jsonb | | Gewijzigde velden |
created_at | timestamptz | ✅ | |