import { MigrationInterface, QueryRunner } from "typeorm";

export class InitialSchema1775555814626 implements MigrationInterface {
    name = 'InitialSchema1775555814626'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`CREATE TABLE "tenants" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "subdomain" character varying(100) NOT NULL, "is_active" boolean NOT NULL DEFAULT true, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "UQ_32731f181236a46182a38c992a8" UNIQUE ("name"), CONSTRAINT "UQ_21bb89e012fa5b58532009c1601" UNIQUE ("subdomain"), CONSTRAINT "PK_53be67a04681c66b87ee27c9321" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE TYPE "public"."role_permissions_access_level_enum" AS ENUM('none', 'view', 'create', 'edit', 'delete')`);
        await queryRunner.query(`CREATE TABLE "role_permissions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "module" character varying(100) NOT NULL, "access_level" "public"."role_permissions_access_level_enum" NOT NULL DEFAULT 'none', "role_id" uuid, CONSTRAINT "UQ_de1c8919147b9fb5c43229510b9" UNIQUE ("role_id", "module"), CONSTRAINT "PK_84059017c90bfcb701b8fa42297" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_d6fcb39857e2116aff96b97df0" ON "role_permissions" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "roles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(255) NOT NULL, "description" character varying(500), "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_c1433d71a4838793a49dcad46ab" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_e59a01f4fe46ebbece575d9a0f" ON "roles" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "users" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(255) NOT NULL, "email" character varying(255) NOT NULL, "phone" character varying(50), "password_hash" character varying(255) NOT NULL, "is_active" boolean NOT NULL DEFAULT true, "last_login_at" TIMESTAMP WITH TIME ZONE, "role_id" uuid, CONSTRAINT "UQ_e9f4c2efab52114c4e99e28efb1" UNIQUE ("tenant_id", "email"), CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_109638590074998bb72a2f2cf0" ON "users" ("tenant_id") `);
        await queryRunner.query(`CREATE TYPE "public"."currencies_format_enum" AS ENUM('indian', 'international', 'dot')`);
        await queryRunner.query(`CREATE TABLE "currencies" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(255) NOT NULL, "code" character varying(10) NOT NULL, "symbol" character varying(5) NOT NULL, "rounding" integer NOT NULL DEFAULT '1', "format" "public"."currencies_format_enum" NOT NULL DEFAULT 'international', "is_active" boolean NOT NULL DEFAULT true, "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_fd42ee9d8e5e08aa467ba91b9dc" UNIQUE ("tenant_id", "code"), CONSTRAINT "PK_d528c54860c4182db13548e08c4" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_93d3723be0d6e29acc46c7f767" ON "currencies" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "tenant_settings" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "company_name" character varying(255), "default_currency_id" uuid, "timezone" character varying(100), "fiscal_year_start" character varying(20), "website_url" character varying(500), "logo_url" character varying(500), "primary_color" character varying(20) NOT NULL DEFAULT '#10b981', "secondary_color" character varying(20) NOT NULL DEFAULT '#1e293b', "address" text, "phone" character varying(50), "email" character varying(255), "tax_number" character varying(100), "gst_number" character varying(100), "pan_number" character varying(100), "bank_name" character varying(255), "account_number" character varying(100), "ifsc_code" character varying(50), "distribution_mode" character varying(50) NOT NULL DEFAULT 'round_robin', "terms_and_conditions" text, CONSTRAINT "PK_69225c0ca64bcbbf9af8a217043" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_a6abc1c3ed0df635955fc852f1" ON "tenant_settings" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "destinations" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(255) NOT NULL, "short_code" character varying(50) NOT NULL, "country" character varying(100) NOT NULL, "city" character varying(100) NOT NULL DEFAULT '', "currency_id" uuid, "timezone" character varying(100), "description" text, "image_url" character varying(500), "visa_required" boolean NOT NULL DEFAULT false, "services" text, CONSTRAINT "UQ_973baa12ebb95d71a2ed665da65" UNIQUE ("tenant_id", "short_code"), CONSTRAINT "PK_69c5e8db964dcb83d3a0640f3c7" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_65bf7da7c28f799147ffde6213" ON "destinations" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "service_types" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(255) NOT NULL, "code" character varying(50) NOT NULL, "description" character varying(500), "is_active" boolean NOT NULL DEFAULT true, "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_b90c5eb2e444b75be244abbe0fe" UNIQUE ("tenant_id", "code"), CONSTRAINT "PK_1dc93417a097cdee3491f39d7cc" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_254e99605b8efaff80d22e7463" ON "service_types" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "tax_types" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(100) NOT NULL, "display_name" character varying(255) NOT NULL, "default_value" numeric(5,2) NOT NULL DEFAULT '0', "is_active" boolean NOT NULL DEFAULT true, "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_2de2f29eb1a5375f9c42afac135" UNIQUE ("tenant_id", "name"), CONSTRAINT "PK_0eb0ecec0ae0c193f791057058a" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_b9adb80e1cb5405f63e1131a89" ON "tax_types" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "trip_sources" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "source_type" character varying(50) NOT NULL, "name" character varying(255) NOT NULL, "short_name" character varying(100) NOT NULL, "contact_name" character varying(255) NOT NULL, "contact_email" character varying(255), "contact_phone_code" character varying(10), "contact_phone" character varying(20), "city" character varying(100), "state" character varying(100), "country" character varying(100), "pin_code" character varying(20), "street_address" character varying(500), "locality" character varying(255), "landmark" character varying(255), "billing_name" character varying(255), "billing_details" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_6ade789b59b3fab4f3b5e73338b" UNIQUE ("tenant_id", "short_name"), CONSTRAINT "PK_977625f31570152505414592edf" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_c8fdcac308f28c3daa8a228118" ON "trip_sources" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "hotels" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "name" character varying(255) NOT NULL, "address" character varying(500) NOT NULL, "location" character varying(255), "gps_latitude" character varying(20), "gps_longitude" character varying(20), "pickup_gate" character varying(255), "dropoff_gate" character varying(255), "contact_person" character varying(255) NOT NULL, "contact_phone" character varying(20), "special_instructions" text, "meeting_point" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_2636e9b4fad1635cc02f639624e" UNIQUE ("tenant_id", "name", "destination_id"), CONSTRAINT "PK_2bb06797684115a1ba7c705fc7b" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_70dad11992435ea396a3f00d9e" ON "hotels" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "transport_services" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "short_code" character varying(50) NOT NULL, "category" character varying(50) NOT NULL, "from_city" character varying(100) NOT NULL, "from_address" character varying(500), "from_gps_latitude" character varying(20), "from_gps_longitude" character varying(20), "to_city" character varying(100) NOT NULL, "to_address" character varying(500), "to_gps_latitude" character varying(20), "to_gps_longitude" character varying(20), "distance_km" numeric(10,2), "duration_mins" integer, "description" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_b14e3c00035c3417b8d7c240df8" UNIQUE ("tenant_id", "short_code"), CONSTRAINT "PK_c4cdc05cd4bf60722cab6a98022" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_9f6874619aaf3f12e76b831da1" ON "transport_services" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "activity_tickets" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "activity_id" uuid NOT NULL, "name" character varying(255) NOT NULL, "internal_ref" character varying(100), "time_slot" character varying(100), "duration_mins" integer, "description" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_7758573eacfce84c28c3dc8d78c" UNIQUE ("tenant_id", "activity_id", "name"), CONSTRAINT "PK_2f5924be7a690b0fd5d5d4b1093" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_deb0b9aaae2a51a90b30006208" ON "activity_tickets" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "activities" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "name" character varying(255) NOT NULL, "address" character varying(500) NOT NULL, "location" character varying(255), "operating_days" character varying(255), "gps_latitude" character varying(20), "gps_longitude" character varying(20), "contact_person" character varying(255) NOT NULL, "contact_phone" character varying(20), "description" text, "special_instructions" text, "meeting_point" text, "age_config" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_0224a47cdf23fd742fda2a33ddb" UNIQUE ("tenant_id", "name", "destination_id"), CONSTRAINT "PK_7f4004429f731ffb9c88eb486a8" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_d93b88829c6e18be67ebf2e7f1" ON "activities" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "suppliers" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "supplier_types" text NOT NULL, "name" character varying(255) NOT NULL, "contact_person" character varying(255) NOT NULL, "phone" character varying(20) NOT NULL, "email" character varying(255), "alt_phone" character varying(20), "photo_url" character varying(500), "address" text, "linked_transport_services" text, "transport_operational_area" character varying(255), "transport_operational_hours" character varying(255), "fleet_count" integer, "transport_notes" text, "linked_activities" text, "activity_operational_area" character varying(255), "activity_operational_hours" character varying(255), "capacity" integer, "pricing_type" character varying(50), "activity_notes" text, "operational_area" character varying(255), "operational_hours" character varying(255), "notes" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_5570af6a0e75075c5e1b32e56c4" UNIQUE ("tenant_id", "name", "destination_id"), CONSTRAINT "PK_b70ac51766a9e3144f778cfe81e" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_b0d0350059126fa08fddc3c7a4" ON "suppliers" ("tenant_id") `);
        await queryRunner.query(`CREATE TYPE "public"."drivers_status_enum" AS ENUM('available', 'on_trip', 'inactive')`);
        await queryRunner.query(`CREATE TABLE "drivers" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "supplier_id" uuid NOT NULL, "name" character varying(255) NOT NULL, "phone" character varying(20) NOT NULL, "email" character varying(255), "alt_phone" character varying(20), "license_no" character varying(50) NOT NULL, "license_expiry" date, "photo_url" character varying(500), "address" text, "operational_hours" character varying(255), "status" "public"."drivers_status_enum" NOT NULL DEFAULT 'available', "notes" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_29e8fc69df5111d7a5be1c2e854" UNIQUE ("tenant_id", "license_no"), CONSTRAINT "PK_92ab3fb69e566d3eb0cae896047" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_7793872525aa2c0a99f86601d2" ON "drivers" ("tenant_id") `);
        await queryRunner.query(`CREATE TYPE "public"."vehicles_status_enum" AS ENUM('available', 'assigned', 'maintenance')`);
        await queryRunner.query(`CREATE TABLE "vehicles" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "supplier_id" uuid NOT NULL, "assigned_driver_id" uuid, "vehicle_no" character varying(50) NOT NULL, "type" character varying(100) NOT NULL, "company" character varying(255), "model" character varying(255), "year" integer, "capacity" integer, "fuel_type" character varying(50), "color" character varying(50), "insurance_expiry" date, "features" text, "status" "public"."vehicles_status_enum" NOT NULL DEFAULT 'available', "notes" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_c85602f66e8c990f79cb09e8384" UNIQUE ("tenant_id", "vehicle_no"), CONSTRAINT "PK_18d8646b59304dce4af3a9e35b6" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_83421ac7781fdc9554f5256841" ON "vehicles" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "exchange_rates" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "from_currency_id" uuid NOT NULL, "to_currency_id" uuid NOT NULL, "rate" numeric(12,6) NOT NULL, "effective_date" date NOT NULL, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_602315700c214113c41e767fa1f" UNIQUE ("tenant_id", "from_currency_id", "to_currency_id"), CONSTRAINT "PK_33a614bad9e61956079d817ebe2" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_c31e8d47293d3a79f39cb7967c" ON "exchange_rates" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "seasons" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "name" character varying(100) NOT NULL, "start_date" date, "end_date" date, "sort_order" integer NOT NULL DEFAULT '0', "is_active" boolean NOT NULL DEFAULT true, "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_4964ae23c01244a3cc94bb545a6" UNIQUE ("tenant_id", "destination_id", "name"), CONSTRAINT "PK_cb8ed53b5fe109dcd4a4449ec9d" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_08738d6b342d7e67796bb0aa9b" ON "seasons" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "transport_pricing" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "transport_service_id" uuid NOT NULL, "category" character varying(50) NOT NULL, "cab_type" character varying(100) NOT NULL, "currency_id" uuid NOT NULL, "default_price" numeric(12,2), "season_1_price" numeric(12,2), "season_2_price" numeric(12,2), "season_3_price" numeric(12,2), "season_4_price" numeric(12,2), "season_5_price" numeric(12,2), CONSTRAINT "UQ_d8fa436703ef844971e6ff3d7f9" UNIQUE ("tenant_id", "transport_service_id", "cab_type", "currency_id"), CONSTRAINT "PK_2ca7a77ed0aa94126becaad028d" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_168a0c3f13f4918c7cc3053ea6" ON "transport_pricing" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "activity_pricing" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "destination_id" uuid NOT NULL, "activity_id" uuid NOT NULL, "ticket_id" uuid, "age_group" character varying(50) NOT NULL, "currency_id" uuid NOT NULL, "default_price" numeric(12,2), "season_1_price" numeric(12,2), "season_2_price" numeric(12,2), "season_3_price" numeric(12,2), "season_4_price" numeric(12,2), "season_5_price" numeric(12,2), CONSTRAINT "UQ_9d96234d049ae6ce6000d4d17e1" UNIQUE ("tenant_id", "activity_id", "ticket_id", "age_group", "currency_id"), CONSTRAINT "PK_d0f456e7d2c9e8d53c592a69724" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_fe061192bc9ad93a4b85894898" ON "activity_pricing" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "vehicle_types" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "name" character varying(100) NOT NULL, "is_active" boolean NOT NULL DEFAULT true, "is_system" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_372e7720a7b471ece07a3c813bd" UNIQUE ("tenant_id", "name"), CONSTRAINT "PK_73d1e40f4add7f4f6947acad3a8" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_afa0aeac17bf1ece44c2aa0a8d" ON "vehicle_types" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "query_quote_hotels" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "quote_id" uuid NOT NULL, "hotel_id" uuid NOT NULL, "room_type" character varying(100), "meal_plan" character varying(100), "check_in_date" date NOT NULL, "check_out_date" date NOT NULL, "nights" integer NOT NULL, "pax_per_room" integer NOT NULL DEFAULT '1', "num_rooms" integer NOT NULL DEFAULT '1', "aweb" integer NOT NULL DEFAULT '0', "cweb" integer NOT NULL DEFAULT '0', "cnb" integer NOT NULL DEFAULT '0', "nightly_rates" text, "subtotal" numeric(12,2) NOT NULL DEFAULT '0', CONSTRAINT "PK_523e7cc703983d05feff5c0629c" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_520dc6fe5f6e3a351e1072236d" ON "query_quote_hotels" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "query_quote_transports" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "quote_id" uuid NOT NULL, "transport_service_id" uuid NOT NULL, "vehicle_type" character varying(100) NOT NULL, "quantity" integer NOT NULL DEFAULT '1', "unit_price" numeric(12,2) NOT NULL DEFAULT '0', "subtotal" numeric(12,2) NOT NULL DEFAULT '0', "date" date, "sort_order" integer NOT NULL DEFAULT '0', "notes" text, CONSTRAINT "PK_385bd909bb45841168688f59b44" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_7d25e2b012195c5402f935a27b" ON "query_quote_transports" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "query_quote_activities" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "quote_id" uuid NOT NULL, "activity_id" uuid NOT NULL, "ticket_id" uuid, "age_group" character varying(50) NOT NULL, "quantity" integer NOT NULL DEFAULT '1', "unit_price" numeric(12,2) NOT NULL DEFAULT '0', "subtotal" numeric(12,2) NOT NULL DEFAULT '0', "slot" character varying(100), "date" date, "sort_order" integer NOT NULL DEFAULT '0', "notes" text, CONSTRAINT "PK_6892fa3f2f90d6cd7e0fe443014" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_b3e5c49a235373ff45fab3f473" ON "query_quote_activities" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "query_quote_specials" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "quote_id" uuid NOT NULL, "service_name" character varying(255) NOT NULL, "total_price" numeric(12,2) NOT NULL, "date" date, "sort_order" integer NOT NULL DEFAULT '0', "comments" text, CONSTRAINT "PK_100513c49db933f76b746bfa27c" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_9a485fd232d67bae1d79314898" ON "query_quote_specials" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "query_quotes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "query_id" uuid NOT NULL, "quote_number" integer NOT NULL, "label" character varying(100), "is_selected" boolean NOT NULL DEFAULT false, "hotel_total" numeric(12,2) NOT NULL DEFAULT '0', "transport_total" numeric(12,2) NOT NULL DEFAULT '0', "activity_total" numeric(12,2) NOT NULL DEFAULT '0', "special_total" numeric(12,2) NOT NULL DEFAULT '0', "grand_total" numeric(12,2) NOT NULL DEFAULT '0', "notes" text, "pricing_strategy" character varying(30) NOT NULL DEFAULT 'overall', "selling_currency_id" uuid, "exchange_rate" numeric(12,6) NOT NULL DEFAULT '1', "markup_type" character varying(10) NOT NULL DEFAULT 'amount', "rounding" integer NOT NULL DEFAULT '1', "markup_amount" numeric(12,2) NOT NULL DEFAULT '0', "hotel_markup" numeric(12,2) NOT NULL DEFAULT '0', "transport_markup" numeric(12,2) NOT NULL DEFAULT '0', "activity_markup" numeric(12,2) NOT NULL DEFAULT '0', "special_markup" numeric(12,2) NOT NULL DEFAULT '0', "transport_excluded_pax" integer NOT NULL DEFAULT '0', "selling_total" numeric(12,2) NOT NULL DEFAULT '0', "internal_comments" text, "customer_remarks" text, CONSTRAINT "UQ_c346dde9688923e1d2010b11da8" UNIQUE ("tenant_id", "query_id", "quote_number"), CONSTRAINT "PK_a97999402bedcae25ec902d4099" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_f01a5e71a125ad2cf893e93c0a" ON "query_quotes" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "queries" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "created_by" uuid, "updated_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "is_deleted" boolean NOT NULL DEFAULT false, "query_number" character varying(20) NOT NULL, "source_id" uuid NOT NULL, "ref_id" character varying(100), "assigned_to" uuid NOT NULL, "tags" text, "destination_id" uuid NOT NULL, "start_date" date NOT NULL, "end_date" date NOT NULL, "adults" integer NOT NULL, "children_ages" text, "infants" integer NOT NULL DEFAULT '0', "guest_name" character varying(255) NOT NULL, "guest_email" character varying(255), "guest_mobile" character varying(20) NOT NULL, "guest_alt_phone" character varying(20), "notes" text, "stage" character varying(20) NOT NULL DEFAULT 'new', "currency_id" uuid, CONSTRAINT "UQ_b75a609c457b6b07501dffe6a08" UNIQUE ("tenant_id", "query_number"), CONSTRAINT "PK_e212c03c614452a1d1f8699d2ae" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_c822ad1a85e10c95336f06bb07" ON "queries" ("tenant_id") `);
        await queryRunner.query(`CREATE TABLE "audit_logs" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "tenant_id" uuid NOT NULL, "entity_type" character varying(50) NOT NULL, "entity_id" uuid NOT NULL, "action" character varying(50) NOT NULL, "changes" jsonb, "performed_by" uuid, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_1bb179d048bbc581caa3b013439" PRIMARY KEY ("id"))`);
        await queryRunner.query(`CREATE INDEX "IDX_6f18d459490bb48923b1f40bdb" ON "audit_logs" ("tenant_id") `);
        await queryRunner.query(`CREATE INDEX "IDX_995671e3d78249653ab941244f" ON "audit_logs" ("tenant_id", "entity_type", "entity_id") `);
        await queryRunner.query(`ALTER TABLE "role_permissions" ADD CONSTRAINT "FK_178199805b901ccd220ab7740ec" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "users" ADD CONSTRAINT "FK_a2cecd1a3531c0b041e29ba46e1" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "tenant_settings" ADD CONSTRAINT "FK_8518fd3a0f1e7c8400e4d233818" FOREIGN KEY ("default_currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "destinations" ADD CONSTRAINT "FK_c3c3566d3b933e61f613c3ac3a4" FOREIGN KEY ("currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "hotels" ADD CONSTRAINT "FK_19f50177d0433995be03c8f2d81" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "transport_services" ADD CONSTRAINT "FK_4b1245a651f0cf66773dd2744b9" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activity_tickets" ADD CONSTRAINT "FK_8dd2242b65e6d8bf7336d52190e" FOREIGN KEY ("activity_id") REFERENCES "activities"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activities" ADD CONSTRAINT "FK_0f714ef35e7317e3ebc3b4af59a" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "suppliers" ADD CONSTRAINT "FK_135f9c5c0baafce064af3f8773f" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "drivers" ADD CONSTRAINT "FK_a3894bf1dbf65ba67de32b7ff8a" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "drivers" ADD CONSTRAINT "FK_de545aa75eff2266dffddc78242" FOREIGN KEY ("supplier_id") REFERENCES "suppliers"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "vehicles" ADD CONSTRAINT "FK_b1c717c2cf5262d251e8232e5bc" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "vehicles" ADD CONSTRAINT "FK_59046774697595e4ddeec7e5461" FOREIGN KEY ("supplier_id") REFERENCES "suppliers"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "vehicles" ADD CONSTRAINT "FK_206dc3b1eaf70992421f45433fa" FOREIGN KEY ("assigned_driver_id") REFERENCES "drivers"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "exchange_rates" ADD CONSTRAINT "FK_b2ef436f4da7ada3cf6b5c27f4c" FOREIGN KEY ("from_currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "exchange_rates" ADD CONSTRAINT "FK_437913540d381a4e268a682ee94" FOREIGN KEY ("to_currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "seasons" ADD CONSTRAINT "FK_143e7dafa22f3f7a49a8a205808" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" ADD CONSTRAINT "FK_5a9288d7352b5fbf3afcfad97ec" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" ADD CONSTRAINT "FK_89c6a5799a90a4b0d316f01895f" FOREIGN KEY ("transport_service_id") REFERENCES "transport_services"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" ADD CONSTRAINT "FK_56a9f28e99363fd5415e842fd42" FOREIGN KEY ("currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" ADD CONSTRAINT "FK_038b3fb352afa21bd5ed218c507" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" ADD CONSTRAINT "FK_54b7a4e568625473d83243b8573" FOREIGN KEY ("activity_id") REFERENCES "activities"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" ADD CONSTRAINT "FK_5219c613c6867ce84e78550c2e9" FOREIGN KEY ("ticket_id") REFERENCES "activity_tickets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" ADD CONSTRAINT "FK_91c14c3953f3a236fcff7dd464d" FOREIGN KEY ("currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_hotels" ADD CONSTRAINT "FK_f8d7e56271b5c102f368747ed6b" FOREIGN KEY ("quote_id") REFERENCES "query_quotes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_hotels" ADD CONSTRAINT "FK_1928a2eda2eb6c07fb70fac0079" FOREIGN KEY ("hotel_id") REFERENCES "hotels"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_transports" ADD CONSTRAINT "FK_c9c37d98ad4d6baf393fa16229b" FOREIGN KEY ("quote_id") REFERENCES "query_quotes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_transports" ADD CONSTRAINT "FK_be2967870e0429c4180b07fda30" FOREIGN KEY ("transport_service_id") REFERENCES "transport_services"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" ADD CONSTRAINT "FK_3f47928ea18cb0b1fb8fe910f90" FOREIGN KEY ("quote_id") REFERENCES "query_quotes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" ADD CONSTRAINT "FK_e9aa90ae1de87e40bdbaff1e071" FOREIGN KEY ("activity_id") REFERENCES "activities"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" ADD CONSTRAINT "FK_d9952dcfe2395264d6985327199" FOREIGN KEY ("ticket_id") REFERENCES "activity_tickets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quote_specials" ADD CONSTRAINT "FK_ac722779135e420c2dc6b32a7ed" FOREIGN KEY ("quote_id") REFERENCES "query_quotes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quotes" ADD CONSTRAINT "FK_f3e27ba44c76ff5f7eecc5ae4b5" FOREIGN KEY ("query_id") REFERENCES "queries"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "query_quotes" ADD CONSTRAINT "FK_ad0ab42956a4f028b8bd873bed5" FOREIGN KEY ("selling_currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "queries" ADD CONSTRAINT "FK_92702a8ef27e4359a9a0cc43b7c" FOREIGN KEY ("source_id") REFERENCES "trip_sources"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "queries" ADD CONSTRAINT "FK_8bcb3702134327e61dee1dfa456" FOREIGN KEY ("assigned_to") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "queries" ADD CONSTRAINT "FK_7e8dbc5a9dfcb02d97328825d09" FOREIGN KEY ("destination_id") REFERENCES "destinations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "queries" ADD CONSTRAINT "FK_6e45f0f279d35eeab6138965850" FOREIGN KEY ("currency_id") REFERENCES "currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE "audit_logs" ADD CONSTRAINT "FK_ae97aac6d6d471b9d88cea1c971" FOREIGN KEY ("performed_by") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "audit_logs" DROP CONSTRAINT "FK_ae97aac6d6d471b9d88cea1c971"`);
        await queryRunner.query(`ALTER TABLE "queries" DROP CONSTRAINT "FK_6e45f0f279d35eeab6138965850"`);
        await queryRunner.query(`ALTER TABLE "queries" DROP CONSTRAINT "FK_7e8dbc5a9dfcb02d97328825d09"`);
        await queryRunner.query(`ALTER TABLE "queries" DROP CONSTRAINT "FK_8bcb3702134327e61dee1dfa456"`);
        await queryRunner.query(`ALTER TABLE "queries" DROP CONSTRAINT "FK_92702a8ef27e4359a9a0cc43b7c"`);
        await queryRunner.query(`ALTER TABLE "query_quotes" DROP CONSTRAINT "FK_ad0ab42956a4f028b8bd873bed5"`);
        await queryRunner.query(`ALTER TABLE "query_quotes" DROP CONSTRAINT "FK_f3e27ba44c76ff5f7eecc5ae4b5"`);
        await queryRunner.query(`ALTER TABLE "query_quote_specials" DROP CONSTRAINT "FK_ac722779135e420c2dc6b32a7ed"`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" DROP CONSTRAINT "FK_d9952dcfe2395264d6985327199"`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" DROP CONSTRAINT "FK_e9aa90ae1de87e40bdbaff1e071"`);
        await queryRunner.query(`ALTER TABLE "query_quote_activities" DROP CONSTRAINT "FK_3f47928ea18cb0b1fb8fe910f90"`);
        await queryRunner.query(`ALTER TABLE "query_quote_transports" DROP CONSTRAINT "FK_be2967870e0429c4180b07fda30"`);
        await queryRunner.query(`ALTER TABLE "query_quote_transports" DROP CONSTRAINT "FK_c9c37d98ad4d6baf393fa16229b"`);
        await queryRunner.query(`ALTER TABLE "query_quote_hotels" DROP CONSTRAINT "FK_1928a2eda2eb6c07fb70fac0079"`);
        await queryRunner.query(`ALTER TABLE "query_quote_hotels" DROP CONSTRAINT "FK_f8d7e56271b5c102f368747ed6b"`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" DROP CONSTRAINT "FK_91c14c3953f3a236fcff7dd464d"`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" DROP CONSTRAINT "FK_5219c613c6867ce84e78550c2e9"`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" DROP CONSTRAINT "FK_54b7a4e568625473d83243b8573"`);
        await queryRunner.query(`ALTER TABLE "activity_pricing" DROP CONSTRAINT "FK_038b3fb352afa21bd5ed218c507"`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" DROP CONSTRAINT "FK_56a9f28e99363fd5415e842fd42"`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" DROP CONSTRAINT "FK_89c6a5799a90a4b0d316f01895f"`);
        await queryRunner.query(`ALTER TABLE "transport_pricing" DROP CONSTRAINT "FK_5a9288d7352b5fbf3afcfad97ec"`);
        await queryRunner.query(`ALTER TABLE "seasons" DROP CONSTRAINT "FK_143e7dafa22f3f7a49a8a205808"`);
        await queryRunner.query(`ALTER TABLE "exchange_rates" DROP CONSTRAINT "FK_437913540d381a4e268a682ee94"`);
        await queryRunner.query(`ALTER TABLE "exchange_rates" DROP CONSTRAINT "FK_b2ef436f4da7ada3cf6b5c27f4c"`);
        await queryRunner.query(`ALTER TABLE "vehicles" DROP CONSTRAINT "FK_206dc3b1eaf70992421f45433fa"`);
        await queryRunner.query(`ALTER TABLE "vehicles" DROP CONSTRAINT "FK_59046774697595e4ddeec7e5461"`);
        await queryRunner.query(`ALTER TABLE "vehicles" DROP CONSTRAINT "FK_b1c717c2cf5262d251e8232e5bc"`);
        await queryRunner.query(`ALTER TABLE "drivers" DROP CONSTRAINT "FK_de545aa75eff2266dffddc78242"`);
        await queryRunner.query(`ALTER TABLE "drivers" DROP CONSTRAINT "FK_a3894bf1dbf65ba67de32b7ff8a"`);
        await queryRunner.query(`ALTER TABLE "suppliers" DROP CONSTRAINT "FK_135f9c5c0baafce064af3f8773f"`);
        await queryRunner.query(`ALTER TABLE "activities" DROP CONSTRAINT "FK_0f714ef35e7317e3ebc3b4af59a"`);
        await queryRunner.query(`ALTER TABLE "activity_tickets" DROP CONSTRAINT "FK_8dd2242b65e6d8bf7336d52190e"`);
        await queryRunner.query(`ALTER TABLE "transport_services" DROP CONSTRAINT "FK_4b1245a651f0cf66773dd2744b9"`);
        await queryRunner.query(`ALTER TABLE "hotels" DROP CONSTRAINT "FK_19f50177d0433995be03c8f2d81"`);
        await queryRunner.query(`ALTER TABLE "destinations" DROP CONSTRAINT "FK_c3c3566d3b933e61f613c3ac3a4"`);
        await queryRunner.query(`ALTER TABLE "tenant_settings" DROP CONSTRAINT "FK_8518fd3a0f1e7c8400e4d233818"`);
        await queryRunner.query(`ALTER TABLE "users" DROP CONSTRAINT "FK_a2cecd1a3531c0b041e29ba46e1"`);
        await queryRunner.query(`ALTER TABLE "role_permissions" DROP CONSTRAINT "FK_178199805b901ccd220ab7740ec"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_995671e3d78249653ab941244f"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_6f18d459490bb48923b1f40bdb"`);
        await queryRunner.query(`DROP TABLE "audit_logs"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_c822ad1a85e10c95336f06bb07"`);
        await queryRunner.query(`DROP TABLE "queries"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_f01a5e71a125ad2cf893e93c0a"`);
        await queryRunner.query(`DROP TABLE "query_quotes"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_9a485fd232d67bae1d79314898"`);
        await queryRunner.query(`DROP TABLE "query_quote_specials"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_b3e5c49a235373ff45fab3f473"`);
        await queryRunner.query(`DROP TABLE "query_quote_activities"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_7d25e2b012195c5402f935a27b"`);
        await queryRunner.query(`DROP TABLE "query_quote_transports"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_520dc6fe5f6e3a351e1072236d"`);
        await queryRunner.query(`DROP TABLE "query_quote_hotels"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_afa0aeac17bf1ece44c2aa0a8d"`);
        await queryRunner.query(`DROP TABLE "vehicle_types"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_fe061192bc9ad93a4b85894898"`);
        await queryRunner.query(`DROP TABLE "activity_pricing"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_168a0c3f13f4918c7cc3053ea6"`);
        await queryRunner.query(`DROP TABLE "transport_pricing"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_08738d6b342d7e67796bb0aa9b"`);
        await queryRunner.query(`DROP TABLE "seasons"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_c31e8d47293d3a79f39cb7967c"`);
        await queryRunner.query(`DROP TABLE "exchange_rates"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_83421ac7781fdc9554f5256841"`);
        await queryRunner.query(`DROP TABLE "vehicles"`);
        await queryRunner.query(`DROP TYPE "public"."vehicles_status_enum"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_7793872525aa2c0a99f86601d2"`);
        await queryRunner.query(`DROP TABLE "drivers"`);
        await queryRunner.query(`DROP TYPE "public"."drivers_status_enum"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_b0d0350059126fa08fddc3c7a4"`);
        await queryRunner.query(`DROP TABLE "suppliers"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_d93b88829c6e18be67ebf2e7f1"`);
        await queryRunner.query(`DROP TABLE "activities"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_deb0b9aaae2a51a90b30006208"`);
        await queryRunner.query(`DROP TABLE "activity_tickets"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_9f6874619aaf3f12e76b831da1"`);
        await queryRunner.query(`DROP TABLE "transport_services"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_70dad11992435ea396a3f00d9e"`);
        await queryRunner.query(`DROP TABLE "hotels"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_c8fdcac308f28c3daa8a228118"`);
        await queryRunner.query(`DROP TABLE "trip_sources"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_b9adb80e1cb5405f63e1131a89"`);
        await queryRunner.query(`DROP TABLE "tax_types"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_254e99605b8efaff80d22e7463"`);
        await queryRunner.query(`DROP TABLE "service_types"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_65bf7da7c28f799147ffde6213"`);
        await queryRunner.query(`DROP TABLE "destinations"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_a6abc1c3ed0df635955fc852f1"`);
        await queryRunner.query(`DROP TABLE "tenant_settings"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_93d3723be0d6e29acc46c7f767"`);
        await queryRunner.query(`DROP TABLE "currencies"`);
        await queryRunner.query(`DROP TYPE "public"."currencies_format_enum"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_109638590074998bb72a2f2cf0"`);
        await queryRunner.query(`DROP TABLE "users"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_e59a01f4fe46ebbece575d9a0f"`);
        await queryRunner.query(`DROP TABLE "roles"`);
        await queryRunner.query(`DROP INDEX "public"."IDX_d6fcb39857e2116aff96b97df0"`);
        await queryRunner.query(`DROP TABLE "role_permissions"`);
        await queryRunner.query(`DROP TYPE "public"."role_permissions_access_level_enum"`);
        await queryRunner.query(`DROP TABLE "tenants"`);
    }

}
