Bookings
This commit is contained in:
@@ -14,8 +14,8 @@ CREATE TYPE account_role AS ENUM ('unverified_email', 'verified_email', 'admin',
|
||||
CREATE TYPE account_type AS ENUM ('email', 'google', 'microsoft', 'facebook', 'guest');
|
||||
CREATE TYPE payment_type AS ENUM ('deposit', 'full', 'tip', 'balance', 'partial');
|
||||
CREATE TYPE payment_method AS ENUM ('online_square', 'in_person_card', 'cash', 'giftcard', 'discount');
|
||||
CREATE TYPE booking_status AS ENUM ('pending', 'confirmed', 'in_progress', 'completed', 'client_cancelled', 'we_cancelled', 're-schedule', 'no_show');
|
||||
CREATE TYPE payment_status AS ENUM ('pending', 'completed', 'failed', 'refunded');
|
||||
CREATE TYPE booking_status AS ENUM ('pending', 'confirmed', 'in_progress', 'completed', 'client_cancelled', 'we_cancelled', 're-schedule', 'no_show');
|
||||
|
||||
-- =======================================
|
||||
-- SHORT ID GENERATION
|
||||
@@ -130,6 +130,7 @@ CREATE TABLE user_referrals (
|
||||
referrer_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
referred_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
referred_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
claimed_booking_id CHAR(12) REFERENCES bookings(id) ON DELETE SET NULL,
|
||||
PRIMARY KEY (referrer_id, referred_id)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user