





















const db = require('../models');
const Users = db.users;






const Organizations = db.organizations;

const Hotels = db.hotels;

const Departments = db.departments;

const StaffProfiles = db.staff_profiles;

const Shifts = db.shifts;

const RoomTypes = db.room_types;

const Rooms = db.rooms;

const Guests = db.guests;

const GuestDocuments = db.guest_documents;

const RatePlans = db.rate_plans;

const SeasonalRates = db.seasonal_rates;

const DynamicPricingRules = db.dynamic_pricing_rules;

const SalesChannels = db.sales_channels;

const OtaConnections = db.ota_connections;

const Reservations = db.reservations;

const ReservationGuests = db.reservation_guests;

const StayFolios = db.stay_folios;

const FolioItems = db.folio_items;

const Payments = db.payments;

const Refunds = db.refunds;

const Invoices = db.invoices;

const HousekeepingTasks = db.housekeeping_tasks;

const MaintenanceTickets = db.maintenance_tickets;

const Notifications = db.notifications;

const BookingWidgets = db.booking_widgets;

const Subscriptions = db.subscriptions;

const AuditLogs = db.audit_logs;

const DailySnapshots = db.daily_snapshots;







const OrganizationsData = [
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
];



const HotelsData = [
    
    {
    
        
        
            
                "name": "Sunset Resort",
            
        
    
        
        
            
                "legal_name": "Sunset Resort Hospitality LLC",
            
        
    
        
        
            
                "address_line1": "100 Oceanview Drive",
            
        
    
        
        
            
                "address_line2": "Building A",
            
        
    
        
        
            
                "city": "San Diego",
            
        
    
        
        
            
                "state_region": "CA",
            
        
    
        
        
            
                "postal_code": "92101",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "phone": "+1-619-555-0140",
            
        
    
        
        
            
                "email": "contact@sunsetresort.example",
            
        
    
        
        
            
                "website": "https://sunsetresort.example",
            
        
    
        
        
            
                "timezone": "America/Los_Angeles",
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "default_tax_rate": 0.095,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "stripe_customer_reference": "cus_demo_sunset_001",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Harbor Point Hotel",
            
        
    
        
        
            
                "legal_name": "Harbor Point Lodging Inc",
            
        
    
        
        
            
                "address_line1": "22 Marina Boulevard",
            
        
    
        
        
            
                "address_line2": "Suite 200",
            
        
    
        
        
            
                "city": "Seattle",
            
        
    
        
        
            
                "state_region": "WA",
            
        
    
        
        
            
                "postal_code": "98101",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "phone": "+1-206-555-0109",
            
        
    
        
        
            
                "email": "hello@harborpoint.example",
            
        
    
        
        
            
                "website": "https://harborpoint.example",
            
        
    
        
        
            
                "timezone": "America/Los_Angeles",
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "default_tax_rate": 0.102,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "stripe_customer_reference": "cus_demo_harbor_001",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Mountain View Lodge",
            
        
    
        
        
            
                "legal_name": "Mountain View Lodge LLC",
            
        
    
        
        
            
                "address_line1": "8 Pine Ridge Road",
            
        
    
        
        
            
                "address_line2": "Front Desk",
            
        
    
        
        
            
                "city": "Denver",
            
        
    
        
        
            
                "state_region": "CO",
            
        
    
        
        
            
                "postal_code": "80202",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "phone": "+1-303-555-0177",
            
        
    
        
        
            
                "email": "stay@mountainviewlodge.example",
            
        
    
        
        
            
                "website": "https://mountainviewlodge.example",
            
        
    
        
        
            
                "timezone": "America/Denver",
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "default_tax_rate": 0.085,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "stripe_customer_reference": "cus_demo_mountain_001",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DepartmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Front Office",
            
        
    
        
        
            
                "description": "Reception and guest services.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Housekeeping",
            
        
    
        
        
            
                "description": "Cleaning and room readiness.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Maintenance",
            
        
    
        
        
            
                "description": "Property repairs and preventive work.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StaffProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_title": "General Manager",
            
        
    
        
        
            
                "employee_code": "SR-EMP-0001",
            
        
    
        
        
            
                "hire_date": new Date('2024-03-01T00:00:00Z'),
            
        
    
        
        
            
                "can_login": true,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_title": "Front Desk Agent",
            
        
    
        
        
            
                "employee_code": "SR-EMP-0101",
            
        
    
        
        
            
                "hire_date": new Date('2025-05-10T00:00:00Z'),
            
        
    
        
        
            
                "can_login": true,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_title": "Housekeeping Associate",
            
        
    
        
        
            
                "employee_code": "SR-EMP-0201",
            
        
    
        
        
            
                "hire_date": new Date('2025-06-15T00:00:00Z'),
            
        
    
        
        
            
                "can_login": true,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ShiftsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-06-24T07:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-06-24T15:00:00Z'),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "notes": "Morning shift front desk",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-06-25T15:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-06-25T23:00:00Z'),
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "notes": "Evening shift front desk",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-06-24T08:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-06-24T16:00:00Z'),
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "notes": "Daily room cleaning route",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RoomTypesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Standard King",
            
        
    
        
        
            
                "description": "King bed, garden view, work desk.",
            
        
    
        
        
            
                "capacity_adults": 2,
            
        
    
        
        
            
                "capacity_children": 1,
            
        
    
        
        
            
                "base_rate": 159.0,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Deluxe Queen",
            
        
    
        
        
            
                "description": "Two queen beds, partial ocean view.",
            
        
    
        
        
            
                "capacity_adults": 4,
            
        
    
        
        
            
                "capacity_children": 2,
            
        
    
        
        
            
                "base_rate": 199.0,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ocean Suite",
            
        
    
        
        
            
                "description": "Suite with balcony and living area.",
            
        
    
        
        
            
                "capacity_adults": 3,
            
        
    
        
        
            
                "capacity_children": 2,
            
        
    
        
        
            
                "base_rate": 299.0,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RoomsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "room_number": "101",
            
        
    
        
        
            
                "floor": "1",
            
        
    
        
        
            
                "status": "inspected",
            
        
    
        
        
            
                "notes": "Near lobby",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "room_number": "214",
            
        
    
        
        
            
                "floor": "2",
            
        
    
        
        
            
                "status": "available",
            
        
    
        
        
            
                "notes": "Late checkout yesterday",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "room_number": "305",
            
        
    
        
        
            
                "floor": "3",
            
        
    
        
        
            
                "status": "inspected",
            
        
    
        
        
            
                "notes": "VIP guest",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GuestsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Taylor",
            
        
    
        
        
            
                "last_name": "Bennett",
            
        
    
        
        
            
                "email": "taylor.bennett@examplemail.com",
            
        
    
        
        
            
                "phone": "+1-415-555-0201",
            
        
    
        
        
            
                "nationality": "United States",
            
        
    
        
        
            
                "address_line1": "12 Maple Street",
            
        
    
        
        
            
                "address_line2": "Apt 5",
            
        
    
        
        
            
                "city": "San Francisco",
            
        
    
        
        
            
                "state_region": "CA",
            
        
    
        
        
            
                "postal_code": "94107",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "preferences": "High floor if available",
            
        
    
        
        
            
                "notes": "Prefers quiet room",
            
        
    
        
        
            
                "loyalty_points": 120,
            
        
    
        
        
            
                "marketing_opt_in": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Sam",
            
        
    
        
        
            
                "last_name": "Hernandez",
            
        
    
        
        
            
                "email": "sam.hernandez@examplemail.com",
            
        
    
        
        
            
                "phone": "+1-212-555-0202",
            
        
    
        
        
            
                "nationality": "United States",
            
        
    
        
        
            
                "address_line1": "88 Broadway",
            
        
    
        
        
            
                "address_line2": "Unit 14C",
            
        
    
        
        
            
                "city": "New York",
            
        
    
        
        
            
                "state_region": "NY",
            
        
    
        
        
            
                "postal_code": "10004",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "preferences": "Extra towels",
            
        
    
        
        
            
                "notes": "Allergy to feathers",
            
        
    
        
        
            
                "loyalty_points": 60,
            
        
    
        
        
            
                "marketing_opt_in": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Priya",
            
        
    
        
        
            
                "last_name": "Sharma",
            
        
    
        
        
            
                "email": "priya.sharma@examplemail.com",
            
        
    
        
        
            
                "phone": "+1-312-555-0203",
            
        
    
        
        
            
                "nationality": "India",
            
        
    
        
        
            
                "address_line1": "200 Lakeshore Dr",
            
        
    
        
        
            
                "address_line2": "Suite 900",
            
        
    
        
        
            
                "city": "Chicago",
            
        
    
        
        
            
                "state_region": "IL",
            
        
    
        
        
            
                "postal_code": "60601",
            
        
    
        
        
            
                "country": "United States",
            
        
    
        
        
            
                "preferences": "Late checkout when possible",
            
        
    
        
        
            
                "notes": "Corporate traveler",
            
        
    
        
        
            
                "loyalty_points": 220,
            
        
    
        
        
            
                "marketing_opt_in": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const GuestDocumentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "national_id",
            
        
    
        
        
            
                "document_number": "CA-DL-9827341",
            
        
    
        
        
            
                "issued_at": new Date('2021-04-01T00:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2029-04-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Verified at check-in",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "passport",
            
        
    
        
        
            
                "document_number": "US-P-55201988",
            
        
    
        
        
            
                "issued_at": new Date('2020-02-12T00:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2030-02-12T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "Scan stored for compliance",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_type": "passport",
            
        
    
        
        
            
                "document_number": "IN-P-78123099",
            
        
    
        
        
            
                "issued_at": new Date('2019-08-20T00:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2029-08-20T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "notes": "International guest ID",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RatePlansData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Best Flexible Rate",
            
        
    
        
        
            
                "plan_type": "non_refundable",
            
        
    
        
        
            
                "refundable": true,
            
        
    
        
        
            
                "min_nights": 1,
            
        
    
        
        
            
                "max_nights": 30,
            
        
    
        
        
            
                "deposit_percent": 0.0,
            
        
    
        
        
            
                "cancellation_policy": "Cancel by 6pm local time one day prior to arrival to avoid a one-night penalty.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Advance Purchase",
            
        
    
        
        
            
                "plan_type": "corporate",
            
        
    
        
        
            
                "refundable": true,
            
        
    
        
        
            
                "min_nights": 1,
            
        
    
        
        
            
                "max_nights": 30,
            
        
    
        
        
            
                "deposit_percent": 100.0,
            
        
    
        
        
            
                "cancellation_policy": "Non-refundable. Full prepayment required at booking.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Weekly Saver",
            
        
    
        
        
            
                "plan_type": "standard",
            
        
    
        
        
            
                "refundable": true,
            
        
    
        
        
            
                "min_nights": 7,
            
        
    
        
        
            
                "max_nights": 30,
            
        
    
        
        
            
                "deposit_percent": 0.0,
            
        
    
        
        
            
                "cancellation_policy": "Cancel 48 hours prior to arrival to avoid a one-night penalty.",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SeasonalRatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_date": new Date('2026-07-01T00:00:00Z'),
            
        
    
        
        
            
                "end_date": new Date('2026-07-15T00:00:00Z'),
            
        
    
        
        
            
                "nightly_rate": 179.0,
            
        
    
        
        
            
                "pricing_mode": "delta",
            
        
    
        
        
            
                "delta_amount": 0.0,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_date": new Date('2026-08-20T00:00:00Z'),
            
        
    
        
        
            
                "end_date": new Date('2026-09-05T00:00:00Z'),
            
        
    
        
        
            
                "nightly_rate": 229.0,
            
        
    
        
        
            
                "pricing_mode": "override",
            
        
    
        
        
            
                "delta_amount": 0.0,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_date": new Date('2026-07-01T00:00:00Z'),
            
        
    
        
        
            
                "end_date": new Date('2026-07-31T00:00:00Z'),
            
        
    
        
        
            
                "nightly_rate": 279.0,
            
        
    
        
        
            
                "pricing_mode": "delta",
            
        
    
        
        
            
                "delta_amount": 0.0,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DynamicPricingRulesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "High occupancy uplift",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rule_type": "occupancy_based",
            
        
    
        
        
            
                "adjustment_percent": 8.0,
            
        
    
        
        
            
                "adjustment_amount": 0.0,
            
        
    
        
        
            
                "min_occupancy_percent": 85,
            
        
    
        
        
            
                "max_occupancy_percent": 100,
            
        
    
        
        
            
                "min_days_before": 0,
            
        
    
        
        
            
                "max_days_before": 365,
            
        
    
        
        
            
                "applies_days_of_week": "Mon,Tue,Wed,Thu,Fri,Sat,Sun",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Last minute discount",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rule_type": "length_of_stay",
            
        
    
        
        
            
                "adjustment_percent": -5.0,
            
        
    
        
        
            
                "adjustment_amount": 0.0,
            
        
    
        
        
            
                "min_occupancy_percent": 0,
            
        
    
        
        
            
                "max_occupancy_percent": 100,
            
        
    
        
        
            
                "min_days_before": 0,
            
        
    
        
        
            
                "max_days_before": 2,
            
        
    
        
        
            
                "applies_days_of_week": "Mon,Tue,Wed,Thu,Fri,Sat,Sun",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Weekend premium",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rule_type": "day_of_week",
            
        
    
        
        
            
                "adjustment_percent": 10.0,
            
        
    
        
        
            
                "adjustment_amount": 0.0,
            
        
    
        
        
            
                "min_occupancy_percent": 0,
            
        
    
        
        
            
                "max_occupancy_percent": 100,
            
        
    
        
        
            
                "min_days_before": 0,
            
        
    
        
        
            
                "max_days_before": 365,
            
        
    
        
        
            
                "applies_days_of_week": "Fri,Sat",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SalesChannelsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel_type": "corporate",
            
        
    
        
        
            
                "name": "Website Booking Widget",
            
        
    
        
        
            
                "external_reference": "direct_widget_01",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel_type": "walk_in",
            
        
    
        
        
            
                "name": "Booking.com",
            
        
    
        
        
            
                "external_reference": "ota_bookingcom_sunset",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel_type": "corporate",
            
        
    
        
        
            
                "name": "Expedia",
            
        
    
        
        
            
                "external_reference": "ota_expedia_sunset",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OtaConnectionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "other",
            
        
    
        
        
            
                "account_identifier": "SR-BOOKING-ACCT-1001",
            
        
    
        
        
            
                "api_key_reference": "ref_booking_api_sunset",
            
        
    
        
        
            
                "inventory_sync_enabled": true,
            
        
    
        
        
            
                "rate_sync_enabled": true,
            
        
    
        
        
            
                "last_sync_at": new Date('2026-06-23T12:00:00Z'),
            
        
    
        
        
            
                "sync_status": "ok",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "agoda",
            
        
    
        
        
            
                "account_identifier": "SR-EXPEDIA-ACCT-2001",
            
        
    
        
        
            
                "api_key_reference": "ref_expedia_api_sunset",
            
        
    
        
        
            
                "inventory_sync_enabled": true,
            
        
    
        
        
            
                "rate_sync_enabled": true,
            
        
    
        
        
            
                "last_sync_at": new Date('2026-06-23T12:15:00Z'),
            
        
    
        
        
            
                "sync_status": "error",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "booking_com",
            
        
    
        
        
            
                "account_identifier": "SR-BOOKING-ACCT-1002",
            
        
    
        
        
            
                "api_key_reference": "ref_booking_api_sunset_2",
            
        
    
        
        
            
                "inventory_sync_enabled": true,
            
        
    
        
        
            
                "rate_sync_enabled": true,
            
        
    
        
        
            
                "last_sync_at": new Date('2026-06-20T08:00:00Z'),
            
        
    
        
        
            
                "sync_status": "error",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ReservationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reservation_number": "SR-2026-000101",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "check_in_at": new Date('2026-06-28T15:00:00Z'),
            
        
    
        
        
            
                "check_out_at": new Date('2026-07-01T11:00:00Z'),
            
        
    
        
        
            
                "adults": 2,
            
        
    
        
        
            
                "children": 0,
            
        
    
        
        
            
                "status": "no_show",
            
        
    
        
        
            
                "total_amount": 520.0,
            
        
    
        
        
            
                "tax_amount": 49.4,
            
        
    
        
        
            
                "deposit_amount": 0.0,
            
        
    
        
        
            
                "special_requests": "Early check-in if available",
            
        
    
        
        
            
                "internal_notes": "Offer loyalty upgrade if possible",
            
        
    
        
        
            
                "cancelled_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "cancellation_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reservation_number": "SR-2026-000102",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "check_in_at": new Date('2026-06-24T15:00:00Z'),
            
        
    
        
        
            
                "check_out_at": new Date('2026-06-26T11:00:00Z'),
            
        
    
        
        
            
                "adults": 2,
            
        
    
        
        
            
                "children": 1,
            
        
    
        
        
            
                "status": "checked_out",
            
        
    
        
        
            
                "total_amount": 460.0,
            
        
    
        
        
            
                "tax_amount": 43.7,
            
        
    
        
        
            
                "deposit_amount": 0.0,
            
        
    
        
        
            
                "special_requests": "Crib requested",
            
        
    
        
        
            
                "internal_notes": "Feather-free bedding required",
            
        
    
        
        
            
                "cancelled_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "cancellation_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reservation_number": "SR-2026-000103",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "check_in_at": new Date('2026-06-25T15:00:00Z'),
            
        
    
        
        
            
                "check_out_at": new Date('2026-06-27T11:00:00Z'),
            
        
    
        
        
            
                "adults": 1,
            
        
    
        
        
            
                "children": 0,
            
        
    
        
        
            
                "status": "checked_out",
            
        
    
        
        
            
                "total_amount": 640.0,
            
        
    
        
        
            
                "tax_amount": 60.8,
            
        
    
        
        
            
                "deposit_amount": 0.0,
            
        
    
        
        
            
                "special_requests": "Quiet room away from elevator",
            
        
    
        
        
            
                "internal_notes": "Company billing requested",
            
        
    
        
        
            
                "cancelled_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "cancellation_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ReservationGuestsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "guest_role": "additional",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "guest_role": "additional",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "guest_role": "additional",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StayFoliosData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "folio_number": "FOL-SR-000101",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "balance_due": 520.0,
            
        
    
        
        
            
                "total_charges": 520.0,
            
        
    
        
        
            
                "total_payments": 0.0,
            
        
    
        
        
            
                "notes": "Awaiting payment at check-in",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "folio_number": "FOL-SR-000102",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "balance_due": 120.0,
            
        
    
        
        
            
                "total_charges": 460.0,
            
        
    
        
        
            
                "total_payments": 340.0,
            
        
    
        
        
            
                "notes": "Deposit captured via OTA virtual card",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "folio_number": "FOL-SR-000103",
            
        
    
        
        
            
                "status": "void",
            
        
    
        
        
            
                "balance_due": 640.0,
            
        
    
        
        
            
                "total_charges": 640.0,
            
        
    
        
        
            
                "total_payments": 0.0,
            
        
    
        
        
            
                "notes": "Corporate billing pending approval",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FolioItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "item_type": "fee",
            
        
    
        
        
            
                "description": "Room night 2026-06-28",
            
        
    
        
        
            
                "posted_at": new Date('2026-06-28T16:00:00Z'),
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 159.0,
            
        
    
        
        
            
                "amount": 159.0,
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "item_type": "tax",
            
        
    
        
        
            
                "description": "Room night 2026-06-29",
            
        
    
        
        
            
                "posted_at": new Date('2026-06-29T16:00:00Z'),
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 179.0,
            
        
    
        
        
            
                "amount": 179.0,
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "item_type": "tax",
            
        
    
        
        
            
                "description": "Parking fee",
            
        
    
        
        
            
                "posted_at": new Date('2026-06-24T18:00:00Z'),
            
        
    
        
        
            
                "quantity": 2,
            
        
    
        
        
            
                "unit_price": 20.0,
            
        
    
        
        
            
                "amount": 40.0,
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "method": "stripe",
            
        
    
        
        
            
                "amount": 340.0,
            
        
    
        
        
            
                "status": "captured",
            
        
    
        
        
            
                "paid_at": new Date('2026-06-24T15:30:00Z'),
            
        
    
        
        
            
                "stripe_payment_intent_reference": "pi_demo_000102",
            
        
    
        
        
            
                "stripe_charge_reference": "ch_demo_000102",
            
        
    
        
        
            
                "receipt_number": "RCPT-SR-000102-01",
            
        
    
        
        
            
                "notes": "OTA virtual card capture",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "method": "bank_transfer",
            
        
    
        
        
            
                "amount": 162.0,
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "paid_at": new Date('2026-06-20T12:05:00Z'),
            
        
    
        
        
            
                "stripe_payment_intent_reference": "",
            
        
    
        
        
            
                "stripe_charge_reference": "",
            
        
    
        
        
            
                "receipt_number": "RCPT-SR-000104-01",
            
        
    
        
        
            
                "notes": "Deposit at booking time",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "method": "cash",
            
        
    
        
        
            
                "amount": 520.0,
            
        
    
        
        
            
                "status": "authorized",
            
        
    
        
        
            
                "paid_at": new Date('2026-06-28T15:05:00Z'),
            
        
    
        
        
            
                "stripe_payment_intent_reference": "pi_demo_000101",
            
        
    
        
        
            
                "stripe_charge_reference": "",
            
        
    
        
        
            
                "receipt_number": "RCPT-SR-000101-01",
            
        
    
        
        
            
                "notes": "To capture at check-in",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RefundsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 25.0,
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "refunded_at": new Date('2026-06-21T09:00:00Z'),
            
        
    
        
        
            
                "stripe_refund_reference": "re_demo_000104_01",
            
        
    
        
        
            
                "reason": "Rate adjustment courtesy",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 10.0,
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "refunded_at": new Date('2026-06-26T11:20:00Z'),
            
        
    
        
        
            
                "stripe_refund_reference": "re_demo_000102_01",
            
        
    
        
        
            
                "reason": "Overpayment correction",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 50.0,
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "refunded_at": new Date('2026-06-28T15:30:00Z'),
            
        
    
        
        
            
                "stripe_refund_reference": "re_demo_000101_01",
            
        
    
        
        
            
                "reason": "Partial release due to cancellation window",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InvoicesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "INV-SR-2026-000102",
            
        
    
        
        
            
                "issued_at": new Date('2026-06-26T11:10:00Z'),
            
        
    
        
        
            
                "due_at": new Date('2026-06-26T11:10:00Z'),
            
        
    
        
        
            
                "status": "issued",
            
        
    
        
        
            
                "subtotal_amount": 416.3,
            
        
    
        
        
            
                "tax_amount": 43.7,
            
        
    
        
        
            
                "total_amount": 460.0,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "billing_name": "Sam Hernandez",
            
        
    
        
        
            
                "billing_address": "88 Broadway Unit 14C New York NY 10004",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "INV-SR-2026-000101",
            
        
    
        
        
            
                "issued_at": new Date('2026-06-28T15:20:00Z'),
            
        
    
        
        
            
                "due_at": new Date('2026-06-28T15:20:00Z'),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_amount": 470.6,
            
        
    
        
        
            
                "tax_amount": 49.4,
            
        
    
        
        
            
                "total_amount": 520.0,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "billing_name": "Taylor Bennett",
            
        
    
        
        
            
                "billing_address": "12 Maple Street Apt 5 San Francisco CA 94107",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "INV-SR-2026-000104",
            
        
    
        
        
            
                "issued_at": new Date('2026-07-06T11:05:00Z'),
            
        
    
        
        
            
                "due_at": new Date('2026-07-06T11:05:00Z'),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "subtotal_amount": 733.05,
            
        
    
        
        
            
                "tax_amount": 76.95,
            
        
    
        
        
            
                "total_amount": 810.0,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "billing_name": "Noah Kim",
            
        
    
        
        
            
                "billing_address": "19 Pine Ave Unit B Seattle WA 98101",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const HousekeepingTasksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_for": new Date('2026-06-24T16:00:00Z'),
            
        
    
        
        
            
                "started_at": new Date('2026-06-24T16:10:00Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "task_type": "deep_clean",
            
        
    
        
        
            
                "notes": "Priority due to same-day arrival",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_for": new Date('2026-06-24T14:00:00Z'),
            
        
    
        
        
            
                "started_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "task_type": "turndown",
            
        
    
        
        
            
                "notes": "Deep clean requested by manager",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_for": new Date('2026-06-27T12:00:00Z'),
            
        
    
        
        
            
                "started_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "task_type": "cleaning",
            
        
    
        
        
            
                "notes": "Inspect before next check-in",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MaintenanceTicketsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "hvac",
            
        
    
        
        
            
                "priority": "medium",
            
        
    
        
        
            
                "title": "Bathroom faucet leak",
            
        
    
        
        
            
                "description": "Leak reported at sink faucet; shutoff checked.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "opened_at": new Date('2026-06-23T08:30:00Z'),
            
        
    
        
        
            
                "closed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "furniture",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                "title": "Mini-fridge not cooling",
            
        
    
        
        
            
                "description": "Guest reported fridge temperature above normal range.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "opened_at": new Date('2026-06-23T18:10:00Z'),
            
        
    
        
        
            
                "closed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "appliance",
            
        
    
        
        
            
                "priority": "low",
            
        
    
        
        
            
                "title": "TV remote replacement",
            
        
    
        
        
            
                "description": "Remote missing from room; replace and test TV input.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "opened_at": new Date('2026-06-22T14:15:00Z'),
            
        
    
        
        
            
                "closed_at": new Date('2026-06-27T02:26:33Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const NotificationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "template_type": "booking_confirmation",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-06-20T16:31:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-06-20T16:32:00Z'),
            
        
    
        
        
            
                "to_address": "taylor.bennett@examplemail.com",
            
        
    
        
        
            
                "subject": "Your booking is confirmed",
            
        
    
        
        
            
                "body": "Thank you for booking with Sunset Resort. Reservation SR-2026-000101 is confirmed.",
            
        
    
        
        
            
                "provider_message_reference": "msg_demo_000101",
            
        
    
        
        
            
                "error_message": "",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "sms",
            
        
    
        
        
            
                "template_type": "payment_confirmation",
            
        
    
        
        
            
                "status": "sent",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-06-23T15:00:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-06-23T15:01:00Z'),
            
        
    
        
        
            
                "to_address": "sam.hernandez@examplemail.com",
            
        
    
        
        
            
                "subject": "Check-in reminder for tomorrow",
            
        
    
        
        
            
                "body": "We look forward to welcoming you tomorrow at Sunset Resort.",
            
        
    
        
        
            
                "provider_message_reference": "msg_demo_000102",
            
        
    
        
        
            
                "error_message": "",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "template_type": "check_in_reminder",
            
        
    
        
        
            
                "status": "sent",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-06-20T12:06:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-06-20T12:06:30Z'),
            
        
    
        
        
            
                "to_address": "noah.kim@examplemail.com",
            
        
    
        
        
            
                "subject": "Payment received",
            
        
    
        
        
            
                "body": "We have received your deposit payment for reservation SR-2026-000104.",
            
        
    
        
        
            
                "provider_message_reference": "msg_demo_000104",
            
        
    
        
        
            
                "error_message": "",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const BookingWidgetsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Sunset Resort Website Widget",
            
        
    
        
        
            
                "public_key": "bw_pub_sunset_001",
            
        
    
        
        
            
                "allowed_domains": "sunsetresort.example,www.sunsetresort.example",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Partner Landing Page Widget",
            
        
    
        
        
            
                "public_key": "bw_pub_sunset_002",
            
        
    
        
        
            
                "allowed_domains": "partners.sunsetresort.example",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Campaign Summer Widget",
            
        
    
        
        
            
                "public_key": "bw_pub_sunset_003",
            
        
    
        
        
            
                "allowed_domains": "summer.sunsetresort.example",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SubscriptionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "plan": "professional",
            
        
    
        
        
            
                "billing_cycle": "annual",
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-06-07T00:00:00Z'),
            
        
    
        
        
            
                "current_period_start_at": new Date('2026-06-07T00:00:00Z'),
            
        
    
        
        
            
                "current_period_end_at": new Date('2026-07-07T00:00:00Z'),
            
        
    
        
        
            
                "included_rooms_limit": 100,
            
        
    
        
        
            
                "included_users_limit": 20,
            
        
    
        
        
            
                "stripe_subscription_reference": "sub_demo_sunset_001",
            
        
    
        
        
            
                "stripe_price_reference": "price_demo_prof_monthly",
            
        
    
        
        
            
                "auto_renew": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "plan": "enterprise",
            
        
    
        
        
            
                "billing_cycle": "annual",
            
        
    
        
        
            
                "status": "paused",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-06-01T00:00:00Z'),
            
        
    
        
        
            
                "current_period_start_at": new Date('2026-06-01T00:00:00Z'),
            
        
    
        
        
            
                "current_period_end_at": new Date('2026-07-01T00:00:00Z'),
            
        
    
        
        
            
                "included_rooms_limit": 20,
            
        
    
        
        
            
                "included_users_limit": 3,
            
        
    
        
        
            
                "stripe_subscription_reference": "sub_demo_harbor_001",
            
        
    
        
        
            
                "stripe_price_reference": "price_demo_starter_monthly",
            
        
    
        
        
            
                "auto_renew": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "plan": "professional",
            
        
    
        
        
            
                "billing_cycle": "annual",
            
        
    
        
        
            
                "status": "past_due",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-07-15T00:00:00Z'),
            
        
    
        
        
            
                "current_period_start_at": new Date('2026-06-15T00:00:00Z'),
            
        
    
        
        
            
                "current_period_end_at": new Date('2027-06-15T00:00:00Z'),
            
        
    
        
        
            
                "included_rooms_limit": 100,
            
        
    
        
        
            
                "included_users_limit": 20,
            
        
    
        
        
            
                "stripe_subscription_reference": "sub_demo_mountain_001",
            
        
    
        
        
            
                "stripe_price_reference": "price_demo_prof_annual",
            
        
    
        
        
            
                "auto_renew": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AuditLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "suspend",
            
        
    
        
        
            
                "entity_name": "rooms",
            
        
    
        
        
            
                "record_reference": "214",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-23T17:05:00Z'),
            
        
    
        
        
            
                "ip_address": "203.0.113.10",
            
        
    
        
        
            
                "user_agent": "Chrome 126 macOS",
            
        
    
        
        
            
                "details": "Room status updated to dirty after checkout",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "delete",
            
        
    
        
        
            
                "entity_name": "reservations",
            
        
    
        
        
            
                "record_reference": "SR-2026-000105",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-23T10:15:00Z'),
            
        
    
        
        
            
                "ip_address": "203.0.113.11",
            
        
    
        
        
            
                "user_agent": "Chrome 126 Windows",
            
        
    
        
        
            
                "details": "Walk-in reservation created at front desk",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "delete",
            
        
    
        
        
            
                "entity_name": "housekeeping_tasks",
            
        
    
        
        
            
                "record_reference": "214-20260624",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-24T16:12:00Z'),
            
        
    
        
        
            
                "ip_address": "203.0.113.12",
            
        
    
        
        
            
                "user_agent": "Mobile Safari iOS",
            
        
    
        
        
            
                "details": "Housekeeping task set to in progress",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DailySnapshotsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date('2026-06-23T00:00:00Z'),
            
        
    
        
        
            
                "rooms_available": 40,
            
        
    
        
        
            
                "rooms_occupied": 8,
            
        
    
        
        
            
                "rooms_dirty": 2,
            
        
    
        
        
            
                "rooms_out_of_service": 1,
            
        
    
        
        
            
                "occupancy_rate_percent": 16.0,
            
        
    
        
        
            
                "revenue_today": 1250.0,
            
        
    
        
        
            
                "revenue_month_to_date": 38200.0,
            
        
    
        
        
            
                "adr": 185.5,
            
        
    
        
        
            
                "revpar": 29.7,
            
        
    
        
        
            
                "arrivals_today": 5,
            
        
    
        
        
            
                "departures_today": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date('2026-06-24T00:00:00Z'),
            
        
    
        
        
            
                "rooms_available": 38,
            
        
    
        
        
            
                "rooms_occupied": 10,
            
        
    
        
        
            
                "rooms_dirty": 3,
            
        
    
        
        
            
                "rooms_out_of_service": 1,
            
        
    
        
        
            
                "occupancy_rate_percent": 20.0,
            
        
    
        
        
            
                "revenue_today": 1580.0,
            
        
    
        
        
            
                "revenue_month_to_date": 39780.0,
            
        
    
        
        
            
                "adr": 192.0,
            
        
    
        
        
            
                "revpar": 38.4,
            
        
    
        
        
            
                "arrivals_today": 6,
            
        
    
        
        
            
                "departures_today": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date('2026-06-25T00:00:00Z'),
            
        
    
        
        
            
                "rooms_available": 35,
            
        
    
        
        
            
                "rooms_occupied": 13,
            
        
    
        
        
            
                "rooms_dirty": 2,
            
        
    
        
        
            
                "rooms_out_of_service": 1,
            
        
    
        
        
            
                "occupancy_rate_percent": 26.0,
            
        
    
        
        
            
                "revenue_today": 2010.0,
            
        
    
        
        
            
                "revenue_month_to_date": 41790.0,
            
        
    
        
        
            
                "adr": 197.5,
            
        
    
        
        
            
                "revpar": 51.4,
            
        
    
        
        
            
                "arrivals_today": 7,
            
        
    
        
        
            
                "departures_today": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateUserWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User0 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (User0?.setOrganization)
                {
                    await
                    User0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User1 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (User1?.setOrganization)
                {
                    await
                    User1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User2 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (User2?.setOrganization)
                {
                    await
                    User2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
    
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateHotelWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Hotel0 = await Hotels.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Hotel0?.setOrganization)
                {
                    await
                    Hotel0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Hotel1 = await Hotels.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Hotel1?.setOrganization)
                {
                    await
                    Hotel1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Hotel2 = await Hotels.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Hotel2?.setOrganization)
                {
                    await
                    Hotel2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDepartmentWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Department0 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Department0?.setHotel)
                {
                    await
                    Department0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Department1 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Department1?.setHotel)
                {
                    await
                    Department1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Department2 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Department2?.setHotel)
                {
                    await
                    Department2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateDepartmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Department0 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Department0?.setOrganization)
                {
                    await
                    Department0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Department1 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Department1?.setOrganization)
                {
                    await
                    Department1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Department2 = await Departments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Department2?.setOrganization)
                {
                    await
                    Department2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStaffProfileWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StaffProfile0 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StaffProfile0?.setHotel)
                {
                    await
                    StaffProfile0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StaffProfile1 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StaffProfile1?.setHotel)
                {
                    await
                    StaffProfile1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StaffProfile2 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StaffProfile2?.setHotel)
                {
                    await
                    StaffProfile2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateStaffProfileWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StaffProfile0 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StaffProfile0?.setUser)
                {
                    await
                    StaffProfile0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StaffProfile1 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StaffProfile1?.setUser)
                {
                    await
                    StaffProfile1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StaffProfile2 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StaffProfile2?.setUser)
                {
                    await
                    StaffProfile2.
                    setUser(relatedUser2);
                }
            
        }
        
    
        
            
            async function associateStaffProfileWithDepartment() {
            
                const relatedDepartment0 = await Departments.findOne({
                    offset: Math.floor(Math.random() * (await Departments.count())),
                });
                const StaffProfile0 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StaffProfile0?.setDepartment)
                {
                    await
                    StaffProfile0.
                    setDepartment(relatedDepartment0);
                }
            
                const relatedDepartment1 = await Departments.findOne({
                    offset: Math.floor(Math.random() * (await Departments.count())),
                });
                const StaffProfile1 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StaffProfile1?.setDepartment)
                {
                    await
                    StaffProfile1.
                    setDepartment(relatedDepartment1);
                }
            
                const relatedDepartment2 = await Departments.findOne({
                    offset: Math.floor(Math.random() * (await Departments.count())),
                });
                const StaffProfile2 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StaffProfile2?.setDepartment)
                {
                    await
                    StaffProfile2.
                    setDepartment(relatedDepartment2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStaffProfileWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StaffProfile0 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StaffProfile0?.setOrganization)
                {
                    await
                    StaffProfile0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StaffProfile1 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StaffProfile1?.setOrganization)
                {
                    await
                    StaffProfile1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StaffProfile2 = await StaffProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StaffProfile2?.setOrganization)
                {
                    await
                    StaffProfile2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateShiftWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Shift0 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Shift0?.setHotel)
                {
                    await
                    Shift0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Shift1 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Shift1?.setHotel)
                {
                    await
                    Shift1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Shift2 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Shift2?.setHotel)
                {
                    await
                    Shift2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateShiftWithStaff_profile() {
            
                const relatedStaff_profile0 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const Shift0 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Shift0?.setStaff_profile)
                {
                    await
                    Shift0.
                    setStaff_profile(relatedStaff_profile0);
                }
            
                const relatedStaff_profile1 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const Shift1 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Shift1?.setStaff_profile)
                {
                    await
                    Shift1.
                    setStaff_profile(relatedStaff_profile1);
                }
            
                const relatedStaff_profile2 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const Shift2 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Shift2?.setStaff_profile)
                {
                    await
                    Shift2.
                    setStaff_profile(relatedStaff_profile2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateShiftWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Shift0 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Shift0?.setOrganization)
                {
                    await
                    Shift0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Shift1 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Shift1?.setOrganization)
                {
                    await
                    Shift1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Shift2 = await Shifts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Shift2?.setOrganization)
                {
                    await
                    Shift2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateRoomTypeWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RoomType0 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (RoomType0?.setHotel)
                {
                    await
                    RoomType0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RoomType1 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (RoomType1?.setHotel)
                {
                    await
                    RoomType1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RoomType2 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (RoomType2?.setHotel)
                {
                    await
                    RoomType2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateRoomTypeWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RoomType0 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (RoomType0?.setOrganization)
                {
                    await
                    RoomType0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RoomType1 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (RoomType1?.setOrganization)
                {
                    await
                    RoomType1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RoomType2 = await RoomTypes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (RoomType2?.setOrganization)
                {
                    await
                    RoomType2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateRoomWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Room0 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Room0?.setHotel)
                {
                    await
                    Room0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Room1 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Room1?.setHotel)
                {
                    await
                    Room1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Room2 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Room2?.setHotel)
                {
                    await
                    Room2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateRoomWithRoom_type() {
            
                const relatedRoom_type0 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Room0 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Room0?.setRoom_type)
                {
                    await
                    Room0.
                    setRoom_type(relatedRoom_type0);
                }
            
                const relatedRoom_type1 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Room1 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Room1?.setRoom_type)
                {
                    await
                    Room1.
                    setRoom_type(relatedRoom_type1);
                }
            
                const relatedRoom_type2 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Room2 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Room2?.setRoom_type)
                {
                    await
                    Room2.
                    setRoom_type(relatedRoom_type2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateRoomWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Room0 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Room0?.setOrganization)
                {
                    await
                    Room0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Room1 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Room1?.setOrganization)
                {
                    await
                    Room1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Room2 = await Rooms.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Room2?.setOrganization)
                {
                    await
                    Room2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGuestWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Guest0 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Guest0?.setHotel)
                {
                    await
                    Guest0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Guest1 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Guest1?.setHotel)
                {
                    await
                    Guest1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Guest2 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Guest2?.setHotel)
                {
                    await
                    Guest2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGuestWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Guest0 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Guest0?.setOrganization)
                {
                    await
                    Guest0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Guest1 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Guest1?.setOrganization)
                {
                    await
                    Guest1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Guest2 = await Guests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Guest2?.setOrganization)
                {
                    await
                    Guest2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateGuestDocumentWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const GuestDocument0 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GuestDocument0?.setHotel)
                {
                    await
                    GuestDocument0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const GuestDocument1 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GuestDocument1?.setHotel)
                {
                    await
                    GuestDocument1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const GuestDocument2 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GuestDocument2?.setHotel)
                {
                    await
                    GuestDocument2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateGuestDocumentWithGuest() {
            
                const relatedGuest0 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const GuestDocument0 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GuestDocument0?.setGuest)
                {
                    await
                    GuestDocument0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const GuestDocument1 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GuestDocument1?.setGuest)
                {
                    await
                    GuestDocument1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const GuestDocument2 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GuestDocument2?.setGuest)
                {
                    await
                    GuestDocument2.
                    setGuest(relatedGuest2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGuestDocumentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GuestDocument0 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GuestDocument0?.setOrganization)
                {
                    await
                    GuestDocument0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GuestDocument1 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GuestDocument1?.setOrganization)
                {
                    await
                    GuestDocument1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const GuestDocument2 = await GuestDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GuestDocument2?.setOrganization)
                {
                    await
                    GuestDocument2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateRatePlanWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RatePlan0 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (RatePlan0?.setHotel)
                {
                    await
                    RatePlan0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RatePlan1 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (RatePlan1?.setHotel)
                {
                    await
                    RatePlan1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const RatePlan2 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (RatePlan2?.setHotel)
                {
                    await
                    RatePlan2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateRatePlanWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RatePlan0 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (RatePlan0?.setOrganization)
                {
                    await
                    RatePlan0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RatePlan1 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (RatePlan1?.setOrganization)
                {
                    await
                    RatePlan1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const RatePlan2 = await RatePlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (RatePlan2?.setOrganization)
                {
                    await
                    RatePlan2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSeasonalRateWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SeasonalRate0 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeasonalRate0?.setHotel)
                {
                    await
                    SeasonalRate0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SeasonalRate1 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeasonalRate1?.setHotel)
                {
                    await
                    SeasonalRate1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SeasonalRate2 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeasonalRate2?.setHotel)
                {
                    await
                    SeasonalRate2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateSeasonalRateWithRoom_type() {
            
                const relatedRoom_type0 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const SeasonalRate0 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeasonalRate0?.setRoom_type)
                {
                    await
                    SeasonalRate0.
                    setRoom_type(relatedRoom_type0);
                }
            
                const relatedRoom_type1 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const SeasonalRate1 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeasonalRate1?.setRoom_type)
                {
                    await
                    SeasonalRate1.
                    setRoom_type(relatedRoom_type1);
                }
            
                const relatedRoom_type2 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const SeasonalRate2 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeasonalRate2?.setRoom_type)
                {
                    await
                    SeasonalRate2.
                    setRoom_type(relatedRoom_type2);
                }
            
        }
        
    
        
            
            async function associateSeasonalRateWithRate_plan() {
            
                const relatedRate_plan0 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const SeasonalRate0 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeasonalRate0?.setRate_plan)
                {
                    await
                    SeasonalRate0.
                    setRate_plan(relatedRate_plan0);
                }
            
                const relatedRate_plan1 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const SeasonalRate1 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeasonalRate1?.setRate_plan)
                {
                    await
                    SeasonalRate1.
                    setRate_plan(relatedRate_plan1);
                }
            
                const relatedRate_plan2 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const SeasonalRate2 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeasonalRate2?.setRate_plan)
                {
                    await
                    SeasonalRate2.
                    setRate_plan(relatedRate_plan2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSeasonalRateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeasonalRate0 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SeasonalRate0?.setOrganization)
                {
                    await
                    SeasonalRate0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeasonalRate1 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SeasonalRate1?.setOrganization)
                {
                    await
                    SeasonalRate1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SeasonalRate2 = await SeasonalRates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SeasonalRate2?.setOrganization)
                {
                    await
                    SeasonalRate2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDynamicPricingRuleWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DynamicPricingRule0 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DynamicPricingRule0?.setHotel)
                {
                    await
                    DynamicPricingRule0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DynamicPricingRule1 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DynamicPricingRule1?.setHotel)
                {
                    await
                    DynamicPricingRule1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DynamicPricingRule2 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DynamicPricingRule2?.setHotel)
                {
                    await
                    DynamicPricingRule2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
            
            async function associateDynamicPricingRuleWithRoom_type() {
            
                const relatedRoom_type0 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const DynamicPricingRule0 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DynamicPricingRule0?.setRoom_type)
                {
                    await
                    DynamicPricingRule0.
                    setRoom_type(relatedRoom_type0);
                }
            
                const relatedRoom_type1 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const DynamicPricingRule1 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DynamicPricingRule1?.setRoom_type)
                {
                    await
                    DynamicPricingRule1.
                    setRoom_type(relatedRoom_type1);
                }
            
                const relatedRoom_type2 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const DynamicPricingRule2 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DynamicPricingRule2?.setRoom_type)
                {
                    await
                    DynamicPricingRule2.
                    setRoom_type(relatedRoom_type2);
                }
            
        }
        
    
        
            
            async function associateDynamicPricingRuleWithRate_plan() {
            
                const relatedRate_plan0 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const DynamicPricingRule0 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DynamicPricingRule0?.setRate_plan)
                {
                    await
                    DynamicPricingRule0.
                    setRate_plan(relatedRate_plan0);
                }
            
                const relatedRate_plan1 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const DynamicPricingRule1 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DynamicPricingRule1?.setRate_plan)
                {
                    await
                    DynamicPricingRule1.
                    setRate_plan(relatedRate_plan1);
                }
            
                const relatedRate_plan2 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const DynamicPricingRule2 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DynamicPricingRule2?.setRate_plan)
                {
                    await
                    DynamicPricingRule2.
                    setRate_plan(relatedRate_plan2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDynamicPricingRuleWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DynamicPricingRule0 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DynamicPricingRule0?.setOrganization)
                {
                    await
                    DynamicPricingRule0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DynamicPricingRule1 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DynamicPricingRule1?.setOrganization)
                {
                    await
                    DynamicPricingRule1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DynamicPricingRule2 = await DynamicPricingRules.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DynamicPricingRule2?.setOrganization)
                {
                    await
                    DynamicPricingRule2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSalesChannelWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SalesChannel0 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesChannel0?.setHotel)
                {
                    await
                    SalesChannel0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SalesChannel1 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesChannel1?.setHotel)
                {
                    await
                    SalesChannel1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const SalesChannel2 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesChannel2?.setHotel)
                {
                    await
                    SalesChannel2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSalesChannelWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesChannel0 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SalesChannel0?.setOrganization)
                {
                    await
                    SalesChannel0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesChannel1 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SalesChannel1?.setOrganization)
                {
                    await
                    SalesChannel1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SalesChannel2 = await SalesChannels.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SalesChannel2?.setOrganization)
                {
                    await
                    SalesChannel2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateOtaConnectionWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const OtaConnection0 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OtaConnection0?.setHotel)
                {
                    await
                    OtaConnection0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const OtaConnection1 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OtaConnection1?.setHotel)
                {
                    await
                    OtaConnection1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const OtaConnection2 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OtaConnection2?.setHotel)
                {
                    await
                    OtaConnection2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateOtaConnectionWithSales_channel() {
            
                const relatedSales_channel0 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const OtaConnection0 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OtaConnection0?.setSales_channel)
                {
                    await
                    OtaConnection0.
                    setSales_channel(relatedSales_channel0);
                }
            
                const relatedSales_channel1 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const OtaConnection1 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OtaConnection1?.setSales_channel)
                {
                    await
                    OtaConnection1.
                    setSales_channel(relatedSales_channel1);
                }
            
                const relatedSales_channel2 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const OtaConnection2 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OtaConnection2?.setSales_channel)
                {
                    await
                    OtaConnection2.
                    setSales_channel(relatedSales_channel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateOtaConnectionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OtaConnection0 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OtaConnection0?.setOrganization)
                {
                    await
                    OtaConnection0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OtaConnection1 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OtaConnection1?.setOrganization)
                {
                    await
                    OtaConnection1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OtaConnection2 = await OtaConnections.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OtaConnection2?.setOrganization)
                {
                    await
                    OtaConnection2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateReservationWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setHotel)
                {
                    await
                    Reservation0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setHotel)
                {
                    await
                    Reservation1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setHotel)
                {
                    await
                    Reservation2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
            
            async function associateReservationWithGuest() {
            
                const relatedGuest0 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setGuest)
                {
                    await
                    Reservation0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setGuest)
                {
                    await
                    Reservation1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setGuest)
                {
                    await
                    Reservation2.
                    setGuest(relatedGuest2);
                }
            
        }
        
    
        
            
            async function associateReservationWithRoom() {
            
                const relatedRoom0 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setRoom)
                {
                    await
                    Reservation0.
                    setRoom(relatedRoom0);
                }
            
                const relatedRoom1 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setRoom)
                {
                    await
                    Reservation1.
                    setRoom(relatedRoom1);
                }
            
                const relatedRoom2 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setRoom)
                {
                    await
                    Reservation2.
                    setRoom(relatedRoom2);
                }
            
        }
        
    
        
            
            async function associateReservationWithRoom_type() {
            
                const relatedRoom_type0 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setRoom_type)
                {
                    await
                    Reservation0.
                    setRoom_type(relatedRoom_type0);
                }
            
                const relatedRoom_type1 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setRoom_type)
                {
                    await
                    Reservation1.
                    setRoom_type(relatedRoom_type1);
                }
            
                const relatedRoom_type2 = await RoomTypes.findOne({
                    offset: Math.floor(Math.random() * (await RoomTypes.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setRoom_type)
                {
                    await
                    Reservation2.
                    setRoom_type(relatedRoom_type2);
                }
            
        }
        
    
        
            
            async function associateReservationWithRate_plan() {
            
                const relatedRate_plan0 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setRate_plan)
                {
                    await
                    Reservation0.
                    setRate_plan(relatedRate_plan0);
                }
            
                const relatedRate_plan1 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setRate_plan)
                {
                    await
                    Reservation1.
                    setRate_plan(relatedRate_plan1);
                }
            
                const relatedRate_plan2 = await RatePlans.findOne({
                    offset: Math.floor(Math.random() * (await RatePlans.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setRate_plan)
                {
                    await
                    Reservation2.
                    setRate_plan(relatedRate_plan2);
                }
            
        }
        
    
        
            
            async function associateReservationWithSales_channel() {
            
                const relatedSales_channel0 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setSales_channel)
                {
                    await
                    Reservation0.
                    setSales_channel(relatedSales_channel0);
                }
            
                const relatedSales_channel1 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setSales_channel)
                {
                    await
                    Reservation1.
                    setSales_channel(relatedSales_channel1);
                }
            
                const relatedSales_channel2 = await SalesChannels.findOne({
                    offset: Math.floor(Math.random() * (await SalesChannels.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setSales_channel)
                {
                    await
                    Reservation2.
                    setSales_channel(relatedSales_channel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateReservationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reservation0 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reservation0?.setOrganization)
                {
                    await
                    Reservation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reservation1 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reservation1?.setOrganization)
                {
                    await
                    Reservation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reservation2 = await Reservations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reservation2?.setOrganization)
                {
                    await
                    Reservation2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateReservationGuestWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const ReservationGuest0 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReservationGuest0?.setHotel)
                {
                    await
                    ReservationGuest0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const ReservationGuest1 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReservationGuest1?.setHotel)
                {
                    await
                    ReservationGuest1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const ReservationGuest2 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReservationGuest2?.setHotel)
                {
                    await
                    ReservationGuest2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateReservationGuestWithReservation() {
            
                const relatedReservation0 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const ReservationGuest0 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReservationGuest0?.setReservation)
                {
                    await
                    ReservationGuest0.
                    setReservation(relatedReservation0);
                }
            
                const relatedReservation1 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const ReservationGuest1 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReservationGuest1?.setReservation)
                {
                    await
                    ReservationGuest1.
                    setReservation(relatedReservation1);
                }
            
                const relatedReservation2 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const ReservationGuest2 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReservationGuest2?.setReservation)
                {
                    await
                    ReservationGuest2.
                    setReservation(relatedReservation2);
                }
            
        }
        
    
        
            
            async function associateReservationGuestWithGuest() {
            
                const relatedGuest0 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const ReservationGuest0 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReservationGuest0?.setGuest)
                {
                    await
                    ReservationGuest0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const ReservationGuest1 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReservationGuest1?.setGuest)
                {
                    await
                    ReservationGuest1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const ReservationGuest2 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReservationGuest2?.setGuest)
                {
                    await
                    ReservationGuest2.
                    setGuest(relatedGuest2);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateReservationGuestWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReservationGuest0 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReservationGuest0?.setOrganization)
                {
                    await
                    ReservationGuest0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReservationGuest1 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReservationGuest1?.setOrganization)
                {
                    await
                    ReservationGuest1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReservationGuest2 = await ReservationGuests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReservationGuest2?.setOrganization)
                {
                    await
                    ReservationGuest2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStayFolioWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StayFolio0 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StayFolio0?.setHotel)
                {
                    await
                    StayFolio0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StayFolio1 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StayFolio1?.setHotel)
                {
                    await
                    StayFolio1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const StayFolio2 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StayFolio2?.setHotel)
                {
                    await
                    StayFolio2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateStayFolioWithReservation() {
            
                const relatedReservation0 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const StayFolio0 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StayFolio0?.setReservation)
                {
                    await
                    StayFolio0.
                    setReservation(relatedReservation0);
                }
            
                const relatedReservation1 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const StayFolio1 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StayFolio1?.setReservation)
                {
                    await
                    StayFolio1.
                    setReservation(relatedReservation1);
                }
            
                const relatedReservation2 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const StayFolio2 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StayFolio2?.setReservation)
                {
                    await
                    StayFolio2.
                    setReservation(relatedReservation2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStayFolioWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StayFolio0 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StayFolio0?.setOrganization)
                {
                    await
                    StayFolio0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StayFolio1 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StayFolio1?.setOrganization)
                {
                    await
                    StayFolio1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StayFolio2 = await StayFolios.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StayFolio2?.setOrganization)
                {
                    await
                    StayFolio2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFolioItemWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const FolioItem0 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FolioItem0?.setHotel)
                {
                    await
                    FolioItem0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const FolioItem1 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FolioItem1?.setHotel)
                {
                    await
                    FolioItem1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const FolioItem2 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FolioItem2?.setHotel)
                {
                    await
                    FolioItem2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateFolioItemWithStay_folio() {
            
                const relatedStay_folio0 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const FolioItem0 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FolioItem0?.setStay_folio)
                {
                    await
                    FolioItem0.
                    setStay_folio(relatedStay_folio0);
                }
            
                const relatedStay_folio1 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const FolioItem1 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FolioItem1?.setStay_folio)
                {
                    await
                    FolioItem1.
                    setStay_folio(relatedStay_folio1);
                }
            
                const relatedStay_folio2 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const FolioItem2 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FolioItem2?.setStay_folio)
                {
                    await
                    FolioItem2.
                    setStay_folio(relatedStay_folio2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFolioItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FolioItem0 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FolioItem0?.setOrganization)
                {
                    await
                    FolioItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FolioItem1 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FolioItem1?.setOrganization)
                {
                    await
                    FolioItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FolioItem2 = await FolioItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FolioItem2?.setOrganization)
                {
                    await
                    FolioItem2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePaymentWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setHotel)
                {
                    await
                    Payment0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setHotel)
                {
                    await
                    Payment1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setHotel)
                {
                    await
                    Payment2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associatePaymentWithStay_folio() {
            
                const relatedStay_folio0 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setStay_folio)
                {
                    await
                    Payment0.
                    setStay_folio(relatedStay_folio0);
                }
            
                const relatedStay_folio1 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setStay_folio)
                {
                    await
                    Payment1.
                    setStay_folio(relatedStay_folio1);
                }
            
                const relatedStay_folio2 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setStay_folio)
                {
                    await
                    Payment2.
                    setStay_folio(relatedStay_folio2);
                }
            
        }
        
    
        
            
            async function associatePaymentWithReservation() {
            
                const relatedReservation0 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setReservation)
                {
                    await
                    Payment0.
                    setReservation(relatedReservation0);
                }
            
                const relatedReservation1 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setReservation)
                {
                    await
                    Payment1.
                    setReservation(relatedReservation1);
                }
            
                const relatedReservation2 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setReservation)
                {
                    await
                    Payment2.
                    setReservation(relatedReservation2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrganization)
                {
                    await
                    Payment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrganization)
                {
                    await
                    Payment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrganization)
                {
                    await
                    Payment2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateRefundWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setHotel)
                {
                    await
                    Refund0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setHotel)
                {
                    await
                    Refund1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setHotel)
                {
                    await
                    Refund2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateRefundWithPayment() {
            
                const relatedPayment0 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setPayment)
                {
                    await
                    Refund0.
                    setPayment(relatedPayment0);
                }
            
                const relatedPayment1 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setPayment)
                {
                    await
                    Refund1.
                    setPayment(relatedPayment1);
                }
            
                const relatedPayment2 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setPayment)
                {
                    await
                    Refund2.
                    setPayment(relatedPayment2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateRefundWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setOrganization)
                {
                    await
                    Refund0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setOrganization)
                {
                    await
                    Refund1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setOrganization)
                {
                    await
                    Refund2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInvoiceWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setHotel)
                {
                    await
                    Invoice0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setHotel)
                {
                    await
                    Invoice1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setHotel)
                {
                    await
                    Invoice2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithStay_folio() {
            
                const relatedStay_folio0 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setStay_folio)
                {
                    await
                    Invoice0.
                    setStay_folio(relatedStay_folio0);
                }
            
                const relatedStay_folio1 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setStay_folio)
                {
                    await
                    Invoice1.
                    setStay_folio(relatedStay_folio1);
                }
            
                const relatedStay_folio2 = await StayFolios.findOne({
                    offset: Math.floor(Math.random() * (await StayFolios.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setStay_folio)
                {
                    await
                    Invoice2.
                    setStay_folio(relatedStay_folio2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInvoiceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setOrganization)
                {
                    await
                    Invoice0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setOrganization)
                {
                    await
                    Invoice1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setOrganization)
                {
                    await
                    Invoice2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateHousekeepingTaskWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const HousekeepingTask0 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HousekeepingTask0?.setHotel)
                {
                    await
                    HousekeepingTask0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const HousekeepingTask1 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HousekeepingTask1?.setHotel)
                {
                    await
                    HousekeepingTask1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const HousekeepingTask2 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HousekeepingTask2?.setHotel)
                {
                    await
                    HousekeepingTask2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateHousekeepingTaskWithRoom() {
            
                const relatedRoom0 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const HousekeepingTask0 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HousekeepingTask0?.setRoom)
                {
                    await
                    HousekeepingTask0.
                    setRoom(relatedRoom0);
                }
            
                const relatedRoom1 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const HousekeepingTask1 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HousekeepingTask1?.setRoom)
                {
                    await
                    HousekeepingTask1.
                    setRoom(relatedRoom1);
                }
            
                const relatedRoom2 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const HousekeepingTask2 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HousekeepingTask2?.setRoom)
                {
                    await
                    HousekeepingTask2.
                    setRoom(relatedRoom2);
                }
            
        }
        
    
        
            
            async function associateHousekeepingTaskWithAssigned_staff_profile() {
            
                const relatedAssigned_staff_profile0 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const HousekeepingTask0 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HousekeepingTask0?.setAssigned_staff_profile)
                {
                    await
                    HousekeepingTask0.
                    setAssigned_staff_profile(relatedAssigned_staff_profile0);
                }
            
                const relatedAssigned_staff_profile1 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const HousekeepingTask1 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HousekeepingTask1?.setAssigned_staff_profile)
                {
                    await
                    HousekeepingTask1.
                    setAssigned_staff_profile(relatedAssigned_staff_profile1);
                }
            
                const relatedAssigned_staff_profile2 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const HousekeepingTask2 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HousekeepingTask2?.setAssigned_staff_profile)
                {
                    await
                    HousekeepingTask2.
                    setAssigned_staff_profile(relatedAssigned_staff_profile2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateHousekeepingTaskWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HousekeepingTask0 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HousekeepingTask0?.setOrganization)
                {
                    await
                    HousekeepingTask0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HousekeepingTask1 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HousekeepingTask1?.setOrganization)
                {
                    await
                    HousekeepingTask1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HousekeepingTask2 = await HousekeepingTasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HousekeepingTask2?.setOrganization)
                {
                    await
                    HousekeepingTask2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMaintenanceTicketWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const MaintenanceTicket0 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MaintenanceTicket0?.setHotel)
                {
                    await
                    MaintenanceTicket0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const MaintenanceTicket1 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MaintenanceTicket1?.setHotel)
                {
                    await
                    MaintenanceTicket1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const MaintenanceTicket2 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MaintenanceTicket2?.setHotel)
                {
                    await
                    MaintenanceTicket2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateMaintenanceTicketWithRoom() {
            
                const relatedRoom0 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const MaintenanceTicket0 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MaintenanceTicket0?.setRoom)
                {
                    await
                    MaintenanceTicket0.
                    setRoom(relatedRoom0);
                }
            
                const relatedRoom1 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const MaintenanceTicket1 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MaintenanceTicket1?.setRoom)
                {
                    await
                    MaintenanceTicket1.
                    setRoom(relatedRoom1);
                }
            
                const relatedRoom2 = await Rooms.findOne({
                    offset: Math.floor(Math.random() * (await Rooms.count())),
                });
                const MaintenanceTicket2 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MaintenanceTicket2?.setRoom)
                {
                    await
                    MaintenanceTicket2.
                    setRoom(relatedRoom2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMaintenanceTicketWithAssigned_staff_profile() {
            
                const relatedAssigned_staff_profile0 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const MaintenanceTicket0 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MaintenanceTicket0?.setAssigned_staff_profile)
                {
                    await
                    MaintenanceTicket0.
                    setAssigned_staff_profile(relatedAssigned_staff_profile0);
                }
            
                const relatedAssigned_staff_profile1 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const MaintenanceTicket1 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MaintenanceTicket1?.setAssigned_staff_profile)
                {
                    await
                    MaintenanceTicket1.
                    setAssigned_staff_profile(relatedAssigned_staff_profile1);
                }
            
                const relatedAssigned_staff_profile2 = await StaffProfiles.findOne({
                    offset: Math.floor(Math.random() * (await StaffProfiles.count())),
                });
                const MaintenanceTicket2 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MaintenanceTicket2?.setAssigned_staff_profile)
                {
                    await
                    MaintenanceTicket2.
                    setAssigned_staff_profile(relatedAssigned_staff_profile2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMaintenanceTicketWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MaintenanceTicket0 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MaintenanceTicket0?.setOrganization)
                {
                    await
                    MaintenanceTicket0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MaintenanceTicket1 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MaintenanceTicket1?.setOrganization)
                {
                    await
                    MaintenanceTicket1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MaintenanceTicket2 = await MaintenanceTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MaintenanceTicket2?.setOrganization)
                {
                    await
                    MaintenanceTicket2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateNotificationWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setHotel)
                {
                    await
                    Notification0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setHotel)
                {
                    await
                    Notification1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setHotel)
                {
                    await
                    Notification2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateNotificationWithReservation() {
            
                const relatedReservation0 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setReservation)
                {
                    await
                    Notification0.
                    setReservation(relatedReservation0);
                }
            
                const relatedReservation1 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setReservation)
                {
                    await
                    Notification1.
                    setReservation(relatedReservation1);
                }
            
                const relatedReservation2 = await Reservations.findOne({
                    offset: Math.floor(Math.random() * (await Reservations.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setReservation)
                {
                    await
                    Notification2.
                    setReservation(relatedReservation2);
                }
            
        }
        
    
        
            
            async function associateNotificationWithGuest() {
            
                const relatedGuest0 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setGuest)
                {
                    await
                    Notification0.
                    setGuest(relatedGuest0);
                }
            
                const relatedGuest1 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setGuest)
                {
                    await
                    Notification1.
                    setGuest(relatedGuest1);
                }
            
                const relatedGuest2 = await Guests.findOne({
                    offset: Math.floor(Math.random() * (await Guests.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setGuest)
                {
                    await
                    Notification2.
                    setGuest(relatedGuest2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateNotificationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setOrganization)
                {
                    await
                    Notification0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setOrganization)
                {
                    await
                    Notification1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setOrganization)
                {
                    await
                    Notification2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateBookingWidgetWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const BookingWidget0 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (BookingWidget0?.setHotel)
                {
                    await
                    BookingWidget0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const BookingWidget1 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (BookingWidget1?.setHotel)
                {
                    await
                    BookingWidget1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const BookingWidget2 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (BookingWidget2?.setHotel)
                {
                    await
                    BookingWidget2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateBookingWidgetWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const BookingWidget0 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (BookingWidget0?.setOrganization)
                {
                    await
                    BookingWidget0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const BookingWidget1 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (BookingWidget1?.setOrganization)
                {
                    await
                    BookingWidget1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const BookingWidget2 = await BookingWidgets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (BookingWidget2?.setOrganization)
                {
                    await
                    BookingWidget2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSubscriptionWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Subscription0 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Subscription0?.setHotel)
                {
                    await
                    Subscription0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Subscription1 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Subscription1?.setHotel)
                {
                    await
                    Subscription1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const Subscription2 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Subscription2?.setHotel)
                {
                    await
                    Subscription2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSubscriptionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subscription0 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Subscription0?.setOrganization)
                {
                    await
                    Subscription0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subscription1 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Subscription1?.setOrganization)
                {
                    await
                    Subscription1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subscription2 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Subscription2?.setOrganization)
                {
                    await
                    Subscription2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateAuditLogWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setHotel)
                {
                    await
                    AuditLog0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setHotel)
                {
                    await
                    AuditLog1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setHotel)
                {
                    await
                    AuditLog2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
            
            async function associateAuditLogWithActor_user() {
            
                const relatedActor_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setActor_user)
                {
                    await
                    AuditLog0.
                    setActor_user(relatedActor_user0);
                }
            
                const relatedActor_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setActor_user)
                {
                    await
                    AuditLog1.
                    setActor_user(relatedActor_user1);
                }
            
                const relatedActor_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setActor_user)
                {
                    await
                    AuditLog2.
                    setActor_user(relatedActor_user2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAuditLogWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setOrganization)
                {
                    await
                    AuditLog0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setOrganization)
                {
                    await
                    AuditLog1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setOrganization)
                {
                    await
                    AuditLog2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDailySnapshotWithHotel() {
            
                const relatedHotel0 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DailySnapshot0 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DailySnapshot0?.setHotel)
                {
                    await
                    DailySnapshot0.
                    setHotel(relatedHotel0);
                }
            
                const relatedHotel1 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DailySnapshot1 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DailySnapshot1?.setHotel)
                {
                    await
                    DailySnapshot1.
                    setHotel(relatedHotel1);
                }
            
                const relatedHotel2 = await Hotels.findOne({
                    offset: Math.floor(Math.random() * (await Hotels.count())),
                });
                const DailySnapshot2 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DailySnapshot2?.setHotel)
                {
                    await
                    DailySnapshot2.
                    setHotel(relatedHotel2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDailySnapshotWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DailySnapshot0 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DailySnapshot0?.setOrganization)
                {
                    await
                    DailySnapshot0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DailySnapshot1 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DailySnapshot1?.setOrganization)
                {
                    await
                    DailySnapshot1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DailySnapshot2 = await DailySnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DailySnapshot2?.setOrganization)
                {
                    await
                    DailySnapshot2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Hotels.bulkCreate(HotelsData);
                
            
            
                
                await Departments.bulkCreate(DepartmentsData);
                
            
            
                
                await StaffProfiles.bulkCreate(StaffProfilesData);
                
            
            
                
                await Shifts.bulkCreate(ShiftsData);
                
            
            
                
                await RoomTypes.bulkCreate(RoomTypesData);
                
            
            
                
                await Rooms.bulkCreate(RoomsData);
                
            
            
                
                await Guests.bulkCreate(GuestsData);
                
            
            
                
                await GuestDocuments.bulkCreate(GuestDocumentsData);
                
            
            
                
                await RatePlans.bulkCreate(RatePlansData);
                
            
            
                
                await SeasonalRates.bulkCreate(SeasonalRatesData);
                
            
            
                
                await DynamicPricingRules.bulkCreate(DynamicPricingRulesData);
                
            
            
                
                await SalesChannels.bulkCreate(SalesChannelsData);
                
            
            
                
                await OtaConnections.bulkCreate(OtaConnectionsData);
                
            
            
                
                await Reservations.bulkCreate(ReservationsData);
                
            
            
                
                await ReservationGuests.bulkCreate(ReservationGuestsData);
                
            
            
                
                await StayFolios.bulkCreate(StayFoliosData);
                
            
            
                
                await FolioItems.bulkCreate(FolioItemsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await Refunds.bulkCreate(RefundsData);
                
            
            
                
                await Invoices.bulkCreate(InvoicesData);
                
            
            
                
                await HousekeepingTasks.bulkCreate(HousekeepingTasksData);
                
            
            
                
                await MaintenanceTickets.bulkCreate(MaintenanceTicketsData);
                
            
            
                
                await Notifications.bulkCreate(NotificationsData);
                
            
            
                
                await BookingWidgets.bulkCreate(BookingWidgetsData);
                
            
            
                
                await Subscriptions.bulkCreate(SubscriptionsData);
                
            
            
                
                await AuditLogs.bulkCreate(AuditLogsData);
                
            
            
                
                await DailySnapshots.bulkCreate(DailySnapshotsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateHotelWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDepartmentWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDepartmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStaffProfileWithHotel(),
                    
                
                    
                        
                        await associateStaffProfileWithUser(),
                    
                
                    
                        
                        await associateStaffProfileWithDepartment(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStaffProfileWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateShiftWithHotel(),
                    
                
                    
                        
                        await associateShiftWithStaff_profile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateShiftWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateRoomTypeWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateRoomTypeWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateRoomWithHotel(),
                    
                
                    
                        
                        await associateRoomWithRoom_type(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateRoomWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGuestWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGuestWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateGuestDocumentWithHotel(),
                    
                
                    
                        
                        await associateGuestDocumentWithGuest(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGuestDocumentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateRatePlanWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateRatePlanWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSeasonalRateWithHotel(),
                    
                
                    
                        
                        await associateSeasonalRateWithRoom_type(),
                    
                
                    
                        
                        await associateSeasonalRateWithRate_plan(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSeasonalRateWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDynamicPricingRuleWithHotel(),
                    
                
                    
                
                    
                        
                        await associateDynamicPricingRuleWithRoom_type(),
                    
                
                    
                        
                        await associateDynamicPricingRuleWithRate_plan(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDynamicPricingRuleWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSalesChannelWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSalesChannelWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateOtaConnectionWithHotel(),
                    
                
                    
                        
                        await associateOtaConnectionWithSales_channel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOtaConnectionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateReservationWithHotel(),
                    
                
                    
                
                    
                        
                        await associateReservationWithGuest(),
                    
                
                    
                        
                        await associateReservationWithRoom(),
                    
                
                    
                        
                        await associateReservationWithRoom_type(),
                    
                
                    
                        
                        await associateReservationWithRate_plan(),
                    
                
                    
                        
                        await associateReservationWithSales_channel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateReservationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateReservationGuestWithHotel(),
                    
                
                    
                        
                        await associateReservationGuestWithReservation(),
                    
                
                    
                        
                        await associateReservationGuestWithGuest(),
                    
                
                    
                
                    
                
                    
                        
                        await associateReservationGuestWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStayFolioWithHotel(),
                    
                
                    
                        
                        await associateStayFolioWithReservation(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStayFolioWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFolioItemWithHotel(),
                    
                
                    
                        
                        await associateFolioItemWithStay_folio(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFolioItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentWithHotel(),
                    
                
                    
                        
                        await associatePaymentWithStay_folio(),
                    
                
                    
                        
                        await associatePaymentWithReservation(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateRefundWithHotel(),
                    
                
                    
                        
                        await associateRefundWithPayment(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateRefundWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInvoiceWithHotel(),
                    
                
                    
                        
                        await associateInvoiceWithStay_folio(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInvoiceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateHousekeepingTaskWithHotel(),
                    
                
                    
                        
                        await associateHousekeepingTaskWithRoom(),
                    
                
                    
                        
                        await associateHousekeepingTaskWithAssigned_staff_profile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateHousekeepingTaskWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMaintenanceTicketWithHotel(),
                    
                
                    
                        
                        await associateMaintenanceTicketWithRoom(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMaintenanceTicketWithAssigned_staff_profile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMaintenanceTicketWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateNotificationWithHotel(),
                    
                
                    
                        
                        await associateNotificationWithReservation(),
                    
                
                    
                        
                        await associateNotificationWithGuest(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateNotificationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateBookingWidgetWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateBookingWidgetWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSubscriptionWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSubscriptionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAuditLogWithHotel(),
                    
                
                    
                        
                        await associateAuditLogWithActor_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAuditLogWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDailySnapshotWithHotel(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDailySnapshotWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('hotels', null, {});
            
            
            await queryInterface.bulkDelete('departments', null, {});
            
            
            await queryInterface.bulkDelete('staff_profiles', null, {});
            
            
            await queryInterface.bulkDelete('shifts', null, {});
            
            
            await queryInterface.bulkDelete('room_types', null, {});
            
            
            await queryInterface.bulkDelete('rooms', null, {});
            
            
            await queryInterface.bulkDelete('guests', null, {});
            
            
            await queryInterface.bulkDelete('guest_documents', null, {});
            
            
            await queryInterface.bulkDelete('rate_plans', null, {});
            
            
            await queryInterface.bulkDelete('seasonal_rates', null, {});
            
            
            await queryInterface.bulkDelete('dynamic_pricing_rules', null, {});
            
            
            await queryInterface.bulkDelete('sales_channels', null, {});
            
            
            await queryInterface.bulkDelete('ota_connections', null, {});
            
            
            await queryInterface.bulkDelete('reservations', null, {});
            
            
            await queryInterface.bulkDelete('reservation_guests', null, {});
            
            
            await queryInterface.bulkDelete('stay_folios', null, {});
            
            
            await queryInterface.bulkDelete('folio_items', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('refunds', null, {});
            
            
            await queryInterface.bulkDelete('invoices', null, {});
            
            
            await queryInterface.bulkDelete('housekeeping_tasks', null, {});
            
            
            await queryInterface.bulkDelete('maintenance_tickets', null, {});
            
            
            await queryInterface.bulkDelete('notifications', null, {});
            
            
            await queryInterface.bulkDelete('booking_widgets', null, {});
            
            
            await queryInterface.bulkDelete('subscriptions', null, {});
            
            
            await queryInterface.bulkDelete('audit_logs', null, {});
            
            
            await queryInterface.bulkDelete('daily_snapshots', null, {});
            
        
    },
};