feat: persist rate overrides to DB when applying prices in AvailabilityPage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
12
backend/migrations/022_rate_overrides.sql
Normal file
12
backend/migrations/022_rate_overrides.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS rate_overrides (
|
||||
hotel_id UUID NOT NULL REFERENCES hotels(id) ON DELETE CASCADE,
|
||||
category_id TEXT NOT NULL,
|
||||
date DATE NOT NULL,
|
||||
price INTEGER NOT NULL,
|
||||
extra_person INTEGER NOT NULL DEFAULT 0,
|
||||
min_nights INTEGER NOT NULL DEFAULT 1,
|
||||
channel_prices JSONB NOT NULL DEFAULT '{}',
|
||||
closed BOOLEAN NOT NULL DEFAULT false,
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
PRIMARY KEY (hotel_id, category_id, date)
|
||||
);
|
||||
Reference in New Issue
Block a user