Spaces:
Sleeping
Sleeping
Download create_tables.sql from low-key-007/maidapp: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/spaces/low-key-007/maidapp/resolve/main/create_tables.sql
- Command line
-
hf download hf://spaces/low-key-007/maidapp/create_tables.sql
-
curl -L -o create_tables.sql https://huggingface.co/spaces/low-key-007/maidapp/resolve/main/create_tables.sql
1.6 kB
| -- create_tables.sql | |
| -- Run this in Supabase SQL editor to create tables used by the app. | |
| create table if not exists users ( | |
| id text primary key, | |
| phone text unique, | |
| name text, | |
| preferred_language text default 'en', | |
| role text default 'user', | |
| created_at timestamptz default now() | |
| ); | |
| create table if not exists maids ( | |
| id text primary key, | |
| user_id text references users(id), | |
| kyc_status text default 'pending', | |
| skills text[], | |
| languages text[] default array['en'], | |
| service_radius_km int default 10, | |
| rating_avg double precision default 0.0, | |
| rating_count int default 0, | |
| created_at timestamptz default now() | |
| ); | |
| create table if not exists maid_locations ( | |
| id uuid primary key default gen_random_uuid(), | |
| maid_id text references maids(id), | |
| lon double precision, | |
| lat double precision, | |
| updated_at timestamptz default now() | |
| ); | |
| create table if not exists services ( | |
| id text primary key, | |
| name text, | |
| slug text unique, | |
| description text, | |
| base_price int, | |
| min_duration_min int default 30, | |
| add_ons jsonb | |
| ); | |
| create table if not exists bookings ( | |
| id text primary key, | |
| user_id text references users(id), | |
| maid_id text references maids(id), | |
| service_id text references services(id), | |
| status text default 'pending', | |
| scheduled_at timestamptz, | |
| start_eta_min int, | |
| price_total int, | |
| address jsonb, | |
| notes text, | |
| created_at timestamptz default now() | |
| ); | |
| create table if not exists booking_events ( | |
| id uuid primary key default gen_random_uuid(), | |
| booking_id text references bookings(id), | |
| type text, | |
| payload jsonb, | |
| created_at timestamptz default now() | |
| ); | |