





















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






const Organizations = db.organizations;

const Tenants = db.tenants;

const ServiceLines = db.service_lines;

const Services = db.services;

const Companies = db.companies;

const Contacts = db.contacts;

const Tags = db.tags;

const Pipelines = db.pipelines;

const DealStages = db.deal_stages;

const Leads = db.leads;

const Deals = db.deals;

const ProjectTemplates = db.project_templates;

const Projects = db.projects;

const Milestones = db.milestones;

const Tasks = db.tasks;

const TaskDependencies = db.task_dependencies;

const Deliverables = db.deliverables;

const ProjectRisks = db.project_risks;

const ProjectStatusReports = db.project_status_reports;

const Skills = db.skills;

const TeamMembers = db.team_members;

const TeamMemberSkills = db.team_member_skills;

const ResourceAllocations = db.resource_allocations;

const LeaveRequests = db.leave_requests;

const PublicHolidays = db.public_holidays;

const Timesheets = db.timesheets;

const TimeEntries = db.time_entries;

const Products = db.products;

const Contracts = db.contracts;

const Invoices = db.invoices;

const InvoiceLineItems = db.invoice_line_items;

const Payments = db.payments;

const SupportSlas = db.support_slas;

const SupportTickets = db.support_tickets;

const TicketComments = db.ticket_comments;

const CsatSurveys = db.csat_surveys;

const EmailTemplates = db.email_templates;

const Notifications = db.notifications;

const AuditLogs = db.audit_logs;

const Imports = db.imports;







const OrganizationsData = [
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Marie Curie",
            
        
    
    },
    
];



const TenantsData = [
    
    {
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "subdomain": "Alan Turing",
            
        
    
        
        
            
                "tagline": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color": "Alan Turing",
            
        
    
        
        
            
                "default_language": "en",
            
        
    
        
        
            
                "timezone": "Alan Turing",
            
        
    
        
        
            
                "primary_currency": "XOF",
            
        
    
        
        
            
                "secondary_currencies": "Alan Turing",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "phone": "Marie Curie",
            
        
    
        
        
            
                "billing_email": "Grace Hopper",
            
        
    
        
        
            
                "support_email": "Ada Lovelace",
            
        
    
        
        
            
                "two_factor_required_for_admins": true,
            
        
    
        
        
            
                "ip_whitelist_enabled": false,
            
        
    
        
        
            
                "ip_whitelist": "Grace Hopper",
            
        
    
        
        
            
                "business_hours": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "subdomain": "Grace Hopper",
            
        
    
        
        
            
                "tagline": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color": "Alan Turing",
            
        
    
        
        
            
                "default_language": "fr",
            
        
    
        
        
            
                "timezone": "Ada Lovelace",
            
        
    
        
        
            
                "primary_currency": "XOF",
            
        
    
        
        
            
                "secondary_currencies": "Alan Turing",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "billing_email": "Alan Turing",
            
        
    
        
        
            
                "support_email": "Alan Turing",
            
        
    
        
        
            
                "two_factor_required_for_admins": false,
            
        
    
        
        
            
                "ip_whitelist_enabled": false,
            
        
    
        
        
            
                "ip_whitelist": "Grace Hopper",
            
        
    
        
        
            
                "business_hours": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "subdomain": "Marie Curie",
            
        
    
        
        
            
                "tagline": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color": "Ada Lovelace",
            
        
    
        
        
            
                "default_language": "en",
            
        
    
        
        
            
                "timezone": "Ada Lovelace",
            
        
    
        
        
            
                "primary_currency": "EUR",
            
        
    
        
        
            
                "secondary_currencies": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Alan Turing",
            
        
    
        
        
            
                "billing_email": "Alan Turing",
            
        
    
        
        
            
                "support_email": "Grace Hopper",
            
        
    
        
        
            
                "two_factor_required_for_admins": true,
            
        
    
        
        
            
                "ip_whitelist_enabled": false,
            
        
    
        
        
            
                "ip_whitelist": "Alan Turing",
            
        
    
        
        
            
                "business_hours": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ServiceLinesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Alan Turing",
            
        
    
        
        
            
                "name_en": "Alan Turing",
            
        
    
        
        
            
                "description_fr": "Marie Curie",
            
        
    
        
        
            
                "description_en": "Marie Curie",
            
        
    
        
        
            
                "category": "hardware",
            
        
    
        
        
            
                "pricing_model": "time_material",
            
        
    
        
        
            
                "min_price": 1.51,
            
        
    
        
        
            
                "max_price": 0.09,
            
        
    
        
        
            
                "typical_timeline": "Alan Turing",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Alan Turing",
            
        
    
        
        
            
                "name_en": "Ada Lovelace",
            
        
    
        
        
            
                "description_fr": "Ada Lovelace",
            
        
    
        
        
            
                "description_en": "Marie Curie",
            
        
    
        
        
            
                "category": "database",
            
        
    
        
        
            
                "pricing_model": "recurring",
            
        
    
        
        
            
                "min_price": 0.82,
            
        
    
        
        
            
                "max_price": 9.27,
            
        
    
        
        
            
                "typical_timeline": "Ada Lovelace",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Marie Curie",
            
        
    
        
        
            
                "name_en": "Alan Turing",
            
        
    
        
        
            
                "description_fr": "Grace Hopper",
            
        
    
        
        
            
                "description_en": "Grace Hopper",
            
        
    
        
        
            
                "category": "hardware",
            
        
    
        
        
            
                "pricing_model": "hybrid",
            
        
    
        
        
            
                "min_price": 7.79,
            
        
    
        
        
            
                "max_price": 7.83,
            
        
    
        
        
            
                "typical_timeline": "Alan Turing",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ServicesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Marie Curie",
            
        
    
        
        
            
                "name_en": "Alan Turing",
            
        
    
        
        
            
                "description_fr": "Alan Turing",
            
        
    
        
        
            
                "description_en": "Marie Curie",
            
        
    
        
        
            
                "deliverables": "Marie Curie",
            
        
    
        
        
            
                "pricing_model": "hybrid",
            
        
    
        
        
            
                "min_price": 7.08,
            
        
    
        
        
            
                "max_price": 3.31,
            
        
    
        
        
            
                "typical_duration_weeks": 3,
            
        
    
        
        
            
                "required_skills": "Ada Lovelace",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Marie Curie",
            
        
    
        
        
            
                "name_en": "Marie Curie",
            
        
    
        
        
            
                "description_fr": "Grace Hopper",
            
        
    
        
        
            
                "description_en": "Alan Turing",
            
        
    
        
        
            
                "deliverables": "Ada Lovelace",
            
        
    
        
        
            
                "pricing_model": "hybrid",
            
        
    
        
        
            
                "min_price": 5.37,
            
        
    
        
        
            
                "max_price": 6.28,
            
        
    
        
        
            
                "typical_duration_weeks": 9,
            
        
    
        
        
            
                "required_skills": "Ada Lovelace",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name_fr": "Alan Turing",
            
        
    
        
        
            
                "name_en": "Marie Curie",
            
        
    
        
        
            
                "description_fr": "Alan Turing",
            
        
    
        
        
            
                "description_en": "Ada Lovelace",
            
        
    
        
        
            
                "deliverables": "Grace Hopper",
            
        
    
        
        
            
                "pricing_model": "hybrid",
            
        
    
        
        
            
                "min_price": 9.38,
            
        
    
        
        
            
                "max_price": 0.42,
            
        
    
        
        
            
                "typical_duration_weeks": 2,
            
        
    
        
        
            
                "required_skills": "Alan Turing",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CompaniesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "legal_name": "Alan Turing",
            
        
    
        
        
            
                "trade_name": "Ada Lovelace",
            
        
    
        
        
            
                "rccm": "Grace Hopper",
            
        
    
        
        
            
                "tax_id": "Alan Turing",
            
        
    
        
        
            
                "industry": "Marie Curie",
            
        
    
        
        
            
                "size_band": "51_200",
            
        
    
        
        
            
                "annual_revenue": 0.58,
            
        
    
        
        
            
                "website": "Alan Turing",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                "lifecycle_stage": "customer",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "legal_name": "Ada Lovelace",
            
        
    
        
        
            
                "trade_name": "Grace Hopper",
            
        
    
        
        
            
                "rccm": "Alan Turing",
            
        
    
        
        
            
                "tax_id": "Alan Turing",
            
        
    
        
        
            
                "industry": "Ada Lovelace",
            
        
    
        
        
            
                "size_band": "1_10",
            
        
    
        
        
            
                "annual_revenue": 6.68,
            
        
    
        
        
            
                "website": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Alan Turing",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "lifecycle_stage": "lead",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "legal_name": "Alan Turing",
            
        
    
        
        
            
                "trade_name": "Marie Curie",
            
        
    
        
        
            
                "rccm": "Grace Hopper",
            
        
    
        
        
            
                "tax_id": "Marie Curie",
            
        
    
        
        
            
                "industry": "Ada Lovelace",
            
        
    
        
        
            
                "size_band": "501_1000",
            
        
    
        
        
            
                "annual_revenue": 2.82,
            
        
    
        
        
            
                "website": "Marie Curie",
            
        
    
        
        
            
                "address": "Grace Hopper",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                "lifecycle_stage": "lead",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ContactsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Marie Curie",
            
        
    
        
        
            
                "last_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "job_title": "Alan Turing",
            
        
    
        
        
            
                "whatsapp": "Alan Turing",
            
        
    
        
        
            
                "linkedin_url": "Ada Lovelace",
            
        
    
        
        
            
                "preferred_channel": "Grace Hopper",
            
        
    
        
        
            
                "allow_email": false,
            
        
    
        
        
            
                "allow_sms": true,
            
        
    
        
        
            
                "allow_whatsapp": true,
            
        
    
        
        
            
                "lifecycle_stage": "champion",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Marie Curie",
            
        
    
        
        
            
                "last_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "job_title": "Marie Curie",
            
        
    
        
        
            
                "whatsapp": "Marie Curie",
            
        
    
        
        
            
                "linkedin_url": "Ada Lovelace",
            
        
    
        
        
            
                "preferred_channel": "Ada Lovelace",
            
        
    
        
        
            
                "allow_email": true,
            
        
    
        
        
            
                "allow_sms": false,
            
        
    
        
        
            
                "allow_whatsapp": false,
            
        
    
        
        
            
                "lifecycle_stage": "inactive",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Alan Turing",
            
        
    
        
        
            
                "last_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Marie Curie",
            
        
    
        
        
            
                "job_title": "Marie Curie",
            
        
    
        
        
            
                "whatsapp": "Ada Lovelace",
            
        
    
        
        
            
                "linkedin_url": "Ada Lovelace",
            
        
    
        
        
            
                "preferred_channel": "Marie Curie",
            
        
    
        
        
            
                "allow_email": true,
            
        
    
        
        
            
                "allow_sms": true,
            
        
    
        
        
            
                "allow_whatsapp": false,
            
        
    
        
        
            
                "lifecycle_stage": "prospect",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TagsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "color": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "color": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PipelinesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "pipeline_type": "upsell",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "pipeline_type": "renewals",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "sort_order": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "pipeline_type": "sales",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DealStagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "probability_percent": 7,
            
        
    
        
        
            
                "sort_order": 4,
            
        
    
        
        
            
                "is_closed_won": true,
            
        
    
        
        
            
                "is_closed_lost": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "probability_percent": 5,
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                "is_closed_won": false,
            
        
    
        
        
            
                "is_closed_lost": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "probability_percent": 3,
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                "is_closed_won": false,
            
        
    
        
        
            
                "is_closed_lost": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeadsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "full_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Grace Hopper",
            
        
    
        
        
            
                "phone": "Alan Turing",
            
        
    
        
        
            
                "company_name": "Marie Curie",
            
        
    
        
        
            
                "message": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source": "outbound",
            
        
    
        
        
            
                "score": 5,
            
        
    
        
        
            
                "status": "new",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "full_name": "Alan Turing",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "company_name": "Marie Curie",
            
        
    
        
        
            
                "message": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source": "partner",
            
        
    
        
        
            
                "score": 1,
            
        
    
        
        
            
                "status": "converted",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "full_name": "Marie Curie",
            
        
    
        
        
            
                "email": "Grace Hopper",
            
        
    
        
        
            
                "phone": "Alan Turing",
            
        
    
        
        
            
                "company_name": "Marie Curie",
            
        
    
        
        
            
                "message": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source": "other",
            
        
    
        
        
            
                "score": 9,
            
        
    
        
        
            
                "status": "disqualified",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DealsData = [
    
    {
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "amount": 4.15,
            
        
    
        
        
            
                "currency": "CDF",
            
        
    
        
        
            
                "expected_close_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "lost",
            
        
    
        
        
            
                "loss_reason": "Grace Hopper",
            
        
    
        
        
            
                "won_at": new Date(Date.now()),
            
        
    
        
        
            
                "lost_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "amount": 1.24,
            
        
    
        
        
            
                "currency": "XOF",
            
        
    
        
        
            
                "expected_close_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "loss_reason": "Ada Lovelace",
            
        
    
        
        
            
                "won_at": new Date(Date.now()),
            
        
    
        
        
            
                "lost_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "amount": 9.51,
            
        
    
        
        
            
                "currency": "CDF",
            
        
    
        
        
            
                "expected_close_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "won",
            
        
    
        
        
            
                "loss_reason": "Marie Curie",
            
        
    
        
        
            
                "won_at": new Date(Date.now()),
            
        
    
        
        
            
                "lost_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProjectTemplatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "default_duration_weeks": 8,
            
        
    
        
        
            
                "default_budget": 5.95,
            
        
    
        
        
            
                "billing_model": "recurring",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "default_duration_weeks": 3,
            
        
    
        
        
            
                "default_budget": 0.02,
            
        
    
        
        
            
                "billing_model": "fixed_price",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "default_duration_weeks": 9,
            
        
    
        
        
            
                "default_budget": 5.76,
            
        
    
        
        
            
                "billing_model": "recurring",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProjectsData = [
    
    {
    
        
        
            
                // 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
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "code": "Grace Hopper",
            
        
    
        
        
            
                "status": "on_hold",
            
        
    
        
        
            
                "delivery_method": "agile",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "budget_amount": 2.68,
            
        
    
        
        
            
                "budget_currency": "XAF",
            
        
    
        
        
            
                "external_costs": 7.09,
            
        
    
        
        
            
                "estimated_hours": 6.45,
            
        
    
        
        
            
                "actual_hours": 5.43,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "risk_level": "medium",
            
        
    
        
        
            
                "summary": "Grace Hopper",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "code": "Grace Hopper",
            
        
    
        
        
            
                "status": "on_hold",
            
        
    
        
        
            
                "delivery_method": "agile",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "budget_amount": 9.03,
            
        
    
        
        
            
                "budget_currency": "EUR",
            
        
    
        
        
            
                "external_costs": 0.23,
            
        
    
        
        
            
                "estimated_hours": 7.61,
            
        
    
        
        
            
                "actual_hours": 6.71,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "risk_level": "high",
            
        
    
        
        
            
                "summary": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "code": "Grace Hopper",
            
        
    
        
        
            
                "status": "on_hold",
            
        
    
        
        
            
                "delivery_method": "waterfall",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "budget_amount": 9.02,
            
        
    
        
        
            
                "budget_currency": "XAF",
            
        
    
        
        
            
                "external_costs": 4.84,
            
        
    
        
        
            
                "estimated_hours": 4.45,
            
        
    
        
        
            
                "actual_hours": 1.73,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "risk_level": "medium",
            
        
    
        
        
            
                "summary": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MilestonesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "blocked",
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "done",
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "not_started",
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TasksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "status": "blocked",
            
        
    
        
        
            
                "priority": "medium",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_hours": 7.8,
            
        
    
        
        
            
                "actual_hours": 9.27,
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "status": "blocked",
            
        
    
        
        
            
                "priority": "low",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_hours": 4.49,
            
        
    
        
        
            
                "actual_hours": 1.11,
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "status": "done",
            
        
    
        
        
            
                "priority": "medium",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_hours": 8.12,
            
        
    
        
        
            
                "actual_hours": 3.9,
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TaskDependenciesData = [
    
    {
    
        
        
            
                // 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
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DeliverablesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "status": "accepted",
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "client_feedback": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "client_feedback": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "client_feedback": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProjectRisksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "impact": "low",
            
        
    
        
        
            
                "likelihood": "medium",
            
        
    
        
        
            
                "status": "mitigating",
            
        
    
        
        
            
                "mitigation_plan": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "impact": "low",
            
        
    
        
        
            
                "likelihood": "low",
            
        
    
        
        
            
                "status": "mitigating",
            
        
    
        
        
            
                "mitigation_plan": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "impact": "low",
            
        
    
        
        
            
                "likelihood": "low",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "mitigation_plan": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProjectStatusReportsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reporting_week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "reporting_week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_status": "amber",
            
        
    
        
        
            
                "accomplishments": "Marie Curie",
            
        
    
        
        
            
                "next_steps": "Ada Lovelace",
            
        
    
        
        
            
                "risks_issues": "Ada Lovelace",
            
        
    
        
        
            
                "client_notes": "Marie Curie",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "reporting_week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "reporting_week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_status": "red",
            
        
    
        
        
            
                "accomplishments": "Grace Hopper",
            
        
    
        
        
            
                "next_steps": "Grace Hopper",
            
        
    
        
        
            
                "risks_issues": "Marie Curie",
            
        
    
        
        
            
                "client_notes": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "reporting_week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "reporting_week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_status": "red",
            
        
    
        
        
            
                "accomplishments": "Marie Curie",
            
        
    
        
        
            
                "next_steps": "Marie Curie",
            
        
    
        
        
            
                "risks_issues": "Ada Lovelace",
            
        
    
        
        
            
                "client_notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SkillsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "domain": "cloud",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "domain": "cloud",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "domain": "hardware",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TeamMembersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "employment_type": "contractor",
            
        
    
        
        
            
                "seniority": "junior",
            
        
    
        
        
            
                "hourly_rate": 6.86,
            
        
    
        
        
            
                "rate_currency": "USD",
            
        
    
        
        
            
                "weekly_capacity_hours": 9,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "employment_type": "freelancer",
            
        
    
        
        
            
                "seniority": "junior",
            
        
    
        
        
            
                "hourly_rate": 5.76,
            
        
    
        
        
            
                "rate_currency": "CDF",
            
        
    
        
        
            
                "weekly_capacity_hours": 4,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "employment_type": "freelancer",
            
        
    
        
        
            
                "seniority": "mid",
            
        
    
        
        
            
                "hourly_rate": 0.77,
            
        
    
        
        
            
                "rate_currency": "CDF",
            
        
    
        
        
            
                "weekly_capacity_hours": 7,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TeamMemberSkillsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "proficiency": "expert",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "proficiency": "beginner",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "proficiency": "intermediate",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ResourceAllocationsData = [
    
    {
    
        
        
            
                // 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(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "allocated_hours": 4.37,
            
        
    
        
        
            
                "allocation_type": "billable",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // 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_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "allocated_hours": 9.18,
            
        
    
        
        
            
                "allocation_type": "billable",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // 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_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "allocated_hours": 0.23,
            
        
    
        
        
            
                "allocation_type": "billable",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LeaveRequestsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "leave_type": "public_holiday",
            
        
    
        
        
            
                "status": "rejected",
            
        
    
        
        
            
                "reason": "Grace Hopper",
            
        
    
        
        
            
                // 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_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "leave_type": "public_holiday",
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "reason": "Grace Hopper",
            
        
    
        
        
            
                // 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_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "leave_type": "vacation",
            
        
    
        
        
            
                "status": "approved",
            
        
    
        
        
            
                "reason": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PublicHolidaysData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "is_recurring_yearly": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                "is_recurring_yearly": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "is_recurring_yearly": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TimesheetsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "approved_at": new Date(Date.now()),
            
        
    
        
        
            
                "approval_notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "approved_at": new Date(Date.now()),
            
        
    
        
        
            
                "approval_notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "week_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "week_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "approved_at": new Date(Date.now()),
            
        
    
        
        
            
                "approval_notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TimeEntriesData = [
    
    {
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_hours": 0.08,
            
        
    
        
        
            
                "billable": false,
            
        
    
        
        
            
                "work_type": "support",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "offline_recorded": 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
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_hours": 6.3,
            
        
    
        
        
            
                "billable": false,
            
        
    
        
        
            
                "work_type": "delivery",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "offline_recorded": 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
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_hours": 4.63,
            
        
    
        
        
            
                "billable": true,
            
        
    
        
        
            
                "work_type": "support",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "offline_recorded": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProductsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "unit_price": 0.34,
            
        
    
        
        
            
                "currency": "EUR",
            
        
    
        
        
            
                "unit": "week",
            
        
    
        
        
            
                "taxable": false,
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "unit_price": 9.39,
            
        
    
        
        
            
                "currency": "XAF",
            
        
    
        
        
            
                "unit": "month",
            
        
    
        
        
            
                "taxable": false,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "sku": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "unit_price": 0.96,
            
        
    
        
        
            
                "currency": "EUR",
            
        
    
        
        
            
                "unit": "month",
            
        
    
        
        
            
                "taxable": false,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ContractsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "contract_type": "hosting",
            
        
    
        
        
            
                "billing_model": "time_material",
            
        
    
        
        
            
                "amount": 0.76,
            
        
    
        
        
            
                "currency": "XAF",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_renew": true,
            
        
    
        
        
            
                "renewal_notice_days": 7,
            
        
    
        
        
            
                "status": "expired",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "contract_type": "nda",
            
        
    
        
        
            
                "billing_model": "time_material",
            
        
    
        
        
            
                "amount": 8.73,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_renew": true,
            
        
    
        
        
            
                "renewal_notice_days": 9,
            
        
    
        
        
            
                "status": "expired",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "contract_type": "nda",
            
        
    
        
        
            
                "billing_model": "time_material",
            
        
    
        
        
            
                "amount": 6.65,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_renew": false,
            
        
    
        
        
            
                "renewal_notice_days": 6,
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InvoicesData = [
    
    {
    
        
        
            
                // 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
            
        
    
        
        
            
                "invoice_number": "Ada Lovelace",
            
        
    
        
        
            
                "type": "credit_note",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "issue_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "subtotal": 7.75,
            
        
    
        
        
            
                "tax_rate_percent": 1.8,
            
        
    
        
        
            
                "tax_amount": 5.14,
            
        
    
        
        
            
                "total": 8.73,
            
        
    
        
        
            
                "amount_paid": 2.71,
            
        
    
        
        
            
                "public_notes": "Alan Turing",
            
        
    
        
        
            
                "internal_notes": "Alan Turing",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Marie Curie",
            
        
    
        
        
            
                "type": "credit_note",
            
        
    
        
        
            
                "status": "partial",
            
        
    
        
        
            
                "issue_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "currency": "XOF",
            
        
    
        
        
            
                "subtotal": 9.81,
            
        
    
        
        
            
                "tax_rate_percent": 2.36,
            
        
    
        
        
            
                "tax_amount": 9.69,
            
        
    
        
        
            
                "total": 0.79,
            
        
    
        
        
            
                "amount_paid": 6.39,
            
        
    
        
        
            
                "public_notes": "Marie Curie",
            
        
    
        
        
            
                "internal_notes": "Ada Lovelace",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "invoice_number": "Ada Lovelace",
            
        
    
        
        
            
                "type": "fixed_price",
            
        
    
        
        
            
                "status": "void",
            
        
    
        
        
            
                "issue_at": new Date(Date.now()),
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "currency": "CDF",
            
        
    
        
        
            
                "subtotal": 5.75,
            
        
    
        
        
            
                "tax_rate_percent": 1.97,
            
        
    
        
        
            
                "tax_amount": 1.72,
            
        
    
        
        
            
                "total": 9.88,
            
        
    
        
        
            
                "amount_paid": 3.36,
            
        
    
        
        
            
                "public_notes": "Marie Curie",
            
        
    
        
        
            
                "internal_notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InvoiceLineItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "quantity": 4.98,
            
        
    
        
        
            
                "unit_price": 0.97,
            
        
    
        
        
            
                "line_total": 4.81,
            
        
    
        
        
            
                "taxable": 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
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "quantity": 3.79,
            
        
    
        
        
            
                "unit_price": 4.36,
            
        
    
        
        
            
                "line_total": 8.86,
            
        
    
        
        
            
                "taxable": false,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "quantity": 4.03,
            
        
    
        
        
            
                "unit_price": 4.6,
            
        
    
        
        
            
                "line_total": 7.87,
            
        
    
        
        
            
                "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
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 6.78,
            
        
    
        
        
            
                "currency": "XAF",
            
        
    
        
        
            
                "provider": "other",
            
        
    
        
        
            
                "provider_reference": "Ada Lovelace",
            
        
    
        
        
            
                "status": "refunded",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 8.31,
            
        
    
        
        
            
                "currency": "EUR",
            
        
    
        
        
            
                "provider": "cash",
            
        
    
        
        
            
                "provider_reference": "Alan Turing",
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "amount": 3.49,
            
        
    
        
        
            
                "currency": "EUR",
            
        
    
        
        
            
                "provider": "mobile_money",
            
        
    
        
        
            
                "provider_reference": "Ada Lovelace",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SupportSlasData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "priority": "p4",
            
        
    
        
        
            
                "first_response_minutes": 7,
            
        
    
        
        
            
                "resolution_minutes": 1,
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "priority": "p3",
            
        
    
        
        
            
                "first_response_minutes": 2,
            
        
    
        
        
            
                "resolution_minutes": 6,
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "priority": "p4",
            
        
    
        
        
            
                "first_response_minutes": 7,
            
        
    
        
        
            
                "resolution_minutes": 9,
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SupportTicketsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ticket_number": "Ada Lovelace",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "subject": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "priority": "p1",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_response_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolution_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "first_response_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "sla_breached": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ticket_number": "Marie Curie",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "subject": "Grace Hopper",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "channel": "internal",
            
        
    
        
        
            
                "priority": "p4",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_response_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolution_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "first_response_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "sla_breached": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ticket_number": "Marie Curie",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "subject": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "channel": "whatsapp",
            
        
    
        
        
            
                "priority": "p1",
            
        
    
        
        
            
                "status": "waiting",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_response_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolution_due_at": new Date(Date.now()),
            
        
    
        
        
            
                "first_response_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                "sla_breached": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TicketCommentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "visibility": "public",
            
        
    
        
        
            
                "body": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "posted_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "visibility": "public",
            
        
    
        
        
            
                "body": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "posted_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "visibility": "internal",
            
        
    
        
        
            
                "body": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "posted_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CsatSurveysData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "score": 3,
            
        
    
        
        
            
                "feedback": "Grace Hopper",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "score": 5,
            
        
    
        
        
            
                "feedback": "Ada Lovelace",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "score": 7,
            
        
    
        
        
            
                "feedback": "Alan Turing",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "responded_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const EmailTemplatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "template_key": "invoice_sent",
            
        
    
        
        
            
                "subject_fr": "Marie Curie",
            
        
    
        
        
            
                "subject_en": "Marie Curie",
            
        
    
        
        
            
                "body_fr": "Alan Turing",
            
        
    
        
        
            
                "body_en": "Grace Hopper",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "template_key": "ticket_resolution_survey",
            
        
    
        
        
            
                "subject_fr": "Marie Curie",
            
        
    
        
        
            
                "subject_en": "Marie Curie",
            
        
    
        
        
            
                "body_fr": "Marie Curie",
            
        
    
        
        
            
                "body_en": "Grace Hopper",
            
        
    
        
        
            
                "active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "template_key": "invoice_sent",
            
        
    
        
        
            
                "subject_fr": "Ada Lovelace",
            
        
    
        
        
            
                "subject_en": "Alan Turing",
            
        
    
        
        
            
                "body_fr": "Grace Hopper",
            
        
    
        
        
            
                "body_en": "Marie Curie",
            
        
    
        
        
            
                "active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const NotificationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "event_type": "timesheet_missing",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "body": "Marie Curie",
            
        
    
        
        
            
                "link_url": "Alan Turing",
            
        
    
        
        
            
                "read": true,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "event_type": "deal_stage_changed",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "body": "Alan Turing",
            
        
    
        
        
            
                "link_url": "Grace Hopper",
            
        
    
        
        
            
                "read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "in_app",
            
        
    
        
        
            
                "event_type": "ticket_sla_breached",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "body": "Ada Lovelace",
            
        
    
        
        
            
                "link_url": "Grace Hopper",
            
        
    
        
        
            
                "read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AuditLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "impersonate",
            
        
    
        
        
            
                "entity": "Alan Turing",
            
        
    
        
        
            
                "entity_key": "Grace Hopper",
            
        
    
        
        
            
                "ip_address": "Grace Hopper",
            
        
    
        
        
            
                "user_agent": "Ada Lovelace",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "details": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "access_denied",
            
        
    
        
        
            
                "entity": "Ada Lovelace",
            
        
    
        
        
            
                "entity_key": "Ada Lovelace",
            
        
    
        
        
            
                "ip_address": "Ada Lovelace",
            
        
    
        
        
            
                "user_agent": "Marie Curie",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "details": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "update",
            
        
    
        
        
            
                "entity": "Marie Curie",
            
        
    
        
        
            
                "entity_key": "Marie Curie",
            
        
    
        
        
            
                "ip_address": "Alan Turing",
            
        
    
        
        
            
                "user_agent": "Grace Hopper",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "details": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ImportsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "entity_type": "support_tickets",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 6,
            
        
    
        
        
            
                "success_rows": 3,
            
        
    
        
        
            
                "failed_rows": 3,
            
        
    
        
        
            
                "error_report": "Alan Turing",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "entity_type": "support_tickets",
            
        
    
        
        
            
                "status": "processing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 4,
            
        
    
        
        
            
                "success_rows": 2,
            
        
    
        
        
            
                "failed_rows": 1,
            
        
    
        
        
            
                "error_report": "Alan Turing",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "entity_type": "time_entries",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 5,
            
        
    
        
        
            
                "success_rows": 5,
            
        
    
        
        
            
                "failed_rows": 4,
            
        
    
        
        
            
                "error_report": "Ada Lovelace",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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 associateTenantWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant0 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Tenant0?.setOrganization)
                {
                    await
                    Tenant0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant1 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Tenant1?.setOrganization)
                {
                    await
                    Tenant1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant2 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Tenant2?.setOrganization)
                {
                    await
                    Tenant2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateServiceLineWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ServiceLine0 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ServiceLine0?.setTenant)
                {
                    await
                    ServiceLine0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ServiceLine1 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ServiceLine1?.setTenant)
                {
                    await
                    ServiceLine1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ServiceLine2 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ServiceLine2?.setTenant)
                {
                    await
                    ServiceLine2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateServiceLineWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ServiceLine0 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ServiceLine0?.setOrganization)
                {
                    await
                    ServiceLine0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ServiceLine1 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ServiceLine1?.setOrganization)
                {
                    await
                    ServiceLine1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ServiceLine2 = await ServiceLines.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ServiceLine2?.setOrganization)
                {
                    await
                    ServiceLine2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateServiceWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Service0 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Service0?.setTenant)
                {
                    await
                    Service0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Service1 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Service1?.setTenant)
                {
                    await
                    Service1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Service2 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Service2?.setTenant)
                {
                    await
                    Service2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateServiceWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Service0 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Service0?.setService_line)
                {
                    await
                    Service0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Service1 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Service1?.setService_line)
                {
                    await
                    Service1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Service2 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Service2?.setService_line)
                {
                    await
                    Service2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateServiceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Service0 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Service0?.setOrganization)
                {
                    await
                    Service0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Service1 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Service1?.setOrganization)
                {
                    await
                    Service1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Service2 = await Services.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Service2?.setOrganization)
                {
                    await
                    Service2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCompanyWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Company0 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Company0?.setTenant)
                {
                    await
                    Company0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Company1 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Company1?.setTenant)
                {
                    await
                    Company1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Company2 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Company2?.setTenant)
                {
                    await
                    Company2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCompanyWithParent_company() {
            
                const relatedParent_company0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Company0 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Company0?.setParent_company)
                {
                    await
                    Company0.
                    setParent_company(relatedParent_company0);
                }
            
                const relatedParent_company1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Company1 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Company1?.setParent_company)
                {
                    await
                    Company1.
                    setParent_company(relatedParent_company1);
                }
            
                const relatedParent_company2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Company2 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Company2?.setParent_company)
                {
                    await
                    Company2.
                    setParent_company(relatedParent_company2);
                }
            
        }
        
    
        
            
            async function associateCompanyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Company0 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Company0?.setOrganization)
                {
                    await
                    Company0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Company1 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Company1?.setOrganization)
                {
                    await
                    Company1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Company2 = await Companies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Company2?.setOrganization)
                {
                    await
                    Company2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateContactWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contact0 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contact0?.setTenant)
                {
                    await
                    Contact0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contact1 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contact1?.setTenant)
                {
                    await
                    Contact1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contact2 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contact2?.setTenant)
                {
                    await
                    Contact2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateContactWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contact0 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contact0?.setCompany)
                {
                    await
                    Contact0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contact1 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contact1?.setCompany)
                {
                    await
                    Contact1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contact2 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contact2?.setCompany)
                {
                    await
                    Contact2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateContactWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contact0 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contact0?.setOrganization)
                {
                    await
                    Contact0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contact1 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contact1?.setOrganization)
                {
                    await
                    Contact1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contact2 = await Contacts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contact2?.setOrganization)
                {
                    await
                    Contact2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTagWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Tag0 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Tag0?.setTenant)
                {
                    await
                    Tag0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Tag1 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Tag1?.setTenant)
                {
                    await
                    Tag1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Tag2 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Tag2?.setTenant)
                {
                    await
                    Tag2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateTagWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tag0 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Tag0?.setOrganization)
                {
                    await
                    Tag0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tag1 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Tag1?.setOrganization)
                {
                    await
                    Tag1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tag2 = await Tags.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Tag2?.setOrganization)
                {
                    await
                    Tag2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePipelineWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pipeline0 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Pipeline0?.setTenant)
                {
                    await
                    Pipeline0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pipeline1 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Pipeline1?.setTenant)
                {
                    await
                    Pipeline1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pipeline2 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Pipeline2?.setTenant)
                {
                    await
                    Pipeline2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePipelineWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pipeline0 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Pipeline0?.setOrganization)
                {
                    await
                    Pipeline0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pipeline1 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Pipeline1?.setOrganization)
                {
                    await
                    Pipeline1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pipeline2 = await Pipelines.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Pipeline2?.setOrganization)
                {
                    await
                    Pipeline2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDealStageWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const DealStage0 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DealStage0?.setTenant)
                {
                    await
                    DealStage0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const DealStage1 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DealStage1?.setTenant)
                {
                    await
                    DealStage1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const DealStage2 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DealStage2?.setTenant)
                {
                    await
                    DealStage2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateDealStageWithPipeline() {
            
                const relatedPipeline0 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const DealStage0 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DealStage0?.setPipeline)
                {
                    await
                    DealStage0.
                    setPipeline(relatedPipeline0);
                }
            
                const relatedPipeline1 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const DealStage1 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DealStage1?.setPipeline)
                {
                    await
                    DealStage1.
                    setPipeline(relatedPipeline1);
                }
            
                const relatedPipeline2 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const DealStage2 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DealStage2?.setPipeline)
                {
                    await
                    DealStage2.
                    setPipeline(relatedPipeline2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDealStageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DealStage0 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DealStage0?.setOrganization)
                {
                    await
                    DealStage0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DealStage1 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DealStage1?.setOrganization)
                {
                    await
                    DealStage1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DealStage2 = await DealStages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DealStage2?.setOrganization)
                {
                    await
                    DealStage2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeadWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Lead0 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Lead0?.setTenant)
                {
                    await
                    Lead0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Lead1 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Lead1?.setTenant)
                {
                    await
                    Lead1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Lead2 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Lead2?.setTenant)
                {
                    await
                    Lead2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLeadWithService_interest() {
            
                const relatedService_interest0 = await Services.findOne({
                    offset: Math.floor(Math.random() * (await Services.count())),
                });
                const Lead0 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Lead0?.setService_interest)
                {
                    await
                    Lead0.
                    setService_interest(relatedService_interest0);
                }
            
                const relatedService_interest1 = await Services.findOne({
                    offset: Math.floor(Math.random() * (await Services.count())),
                });
                const Lead1 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Lead1?.setService_interest)
                {
                    await
                    Lead1.
                    setService_interest(relatedService_interest1);
                }
            
                const relatedService_interest2 = await Services.findOne({
                    offset: Math.floor(Math.random() * (await Services.count())),
                });
                const Lead2 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Lead2?.setService_interest)
                {
                    await
                    Lead2.
                    setService_interest(relatedService_interest2);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateLeadWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Lead0 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Lead0?.setOwner)
                {
                    await
                    Lead0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Lead1 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Lead1?.setOwner)
                {
                    await
                    Lead1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Lead2 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Lead2?.setOwner)
                {
                    await
                    Lead2.
                    setOwner(relatedOwner2);
                }
            
        }
        
    
        
    
        
            
            async function associateLeadWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Lead0 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Lead0?.setOrganization)
                {
                    await
                    Lead0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Lead1 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Lead1?.setOrganization)
                {
                    await
                    Lead1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Lead2 = await Leads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Lead2?.setOrganization)
                {
                    await
                    Lead2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDealWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setTenant)
                {
                    await
                    Deal0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setTenant)
                {
                    await
                    Deal1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setTenant)
                {
                    await
                    Deal2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateDealWithPipeline() {
            
                const relatedPipeline0 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setPipeline)
                {
                    await
                    Deal0.
                    setPipeline(relatedPipeline0);
                }
            
                const relatedPipeline1 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setPipeline)
                {
                    await
                    Deal1.
                    setPipeline(relatedPipeline1);
                }
            
                const relatedPipeline2 = await Pipelines.findOne({
                    offset: Math.floor(Math.random() * (await Pipelines.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setPipeline)
                {
                    await
                    Deal2.
                    setPipeline(relatedPipeline2);
                }
            
        }
        
    
        
            
            async function associateDealWithStage() {
            
                const relatedStage0 = await DealStages.findOne({
                    offset: Math.floor(Math.random() * (await DealStages.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setStage)
                {
                    await
                    Deal0.
                    setStage(relatedStage0);
                }
            
                const relatedStage1 = await DealStages.findOne({
                    offset: Math.floor(Math.random() * (await DealStages.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setStage)
                {
                    await
                    Deal1.
                    setStage(relatedStage1);
                }
            
                const relatedStage2 = await DealStages.findOne({
                    offset: Math.floor(Math.random() * (await DealStages.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setStage)
                {
                    await
                    Deal2.
                    setStage(relatedStage2);
                }
            
        }
        
    
        
            
            async function associateDealWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setCompany)
                {
                    await
                    Deal0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setCompany)
                {
                    await
                    Deal1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setCompany)
                {
                    await
                    Deal2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateDealWithPrimary_contact() {
            
                const relatedPrimary_contact0 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setPrimary_contact)
                {
                    await
                    Deal0.
                    setPrimary_contact(relatedPrimary_contact0);
                }
            
                const relatedPrimary_contact1 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setPrimary_contact)
                {
                    await
                    Deal1.
                    setPrimary_contact(relatedPrimary_contact1);
                }
            
                const relatedPrimary_contact2 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setPrimary_contact)
                {
                    await
                    Deal2.
                    setPrimary_contact(relatedPrimary_contact2);
                }
            
        }
        
    
        
            
            async function associateDealWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setService_line)
                {
                    await
                    Deal0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setService_line)
                {
                    await
                    Deal1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setService_line)
                {
                    await
                    Deal2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDealWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setOwner)
                {
                    await
                    Deal0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setOwner)
                {
                    await
                    Deal1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setOwner)
                {
                    await
                    Deal2.
                    setOwner(relatedOwner2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDealWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deal0 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deal0?.setOrganization)
                {
                    await
                    Deal0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deal1 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deal1?.setOrganization)
                {
                    await
                    Deal1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deal2 = await Deals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deal2?.setOrganization)
                {
                    await
                    Deal2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProjectTemplateWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectTemplate0 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectTemplate0?.setTenant)
                {
                    await
                    ProjectTemplate0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectTemplate1 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectTemplate1?.setTenant)
                {
                    await
                    ProjectTemplate1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectTemplate2 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectTemplate2?.setTenant)
                {
                    await
                    ProjectTemplate2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateProjectTemplateWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const ProjectTemplate0 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectTemplate0?.setService_line)
                {
                    await
                    ProjectTemplate0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const ProjectTemplate1 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectTemplate1?.setService_line)
                {
                    await
                    ProjectTemplate1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const ProjectTemplate2 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectTemplate2?.setService_line)
                {
                    await
                    ProjectTemplate2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProjectTemplateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectTemplate0 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectTemplate0?.setOrganization)
                {
                    await
                    ProjectTemplate0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectTemplate1 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectTemplate1?.setOrganization)
                {
                    await
                    ProjectTemplate1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectTemplate2 = await ProjectTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectTemplate2?.setOrganization)
                {
                    await
                    ProjectTemplate2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProjectWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setTenant)
                {
                    await
                    Project0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setTenant)
                {
                    await
                    Project1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setTenant)
                {
                    await
                    Project2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateProjectWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setCompany)
                {
                    await
                    Project0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setCompany)
                {
                    await
                    Project1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setCompany)
                {
                    await
                    Project2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateProjectWithDeal() {
            
                const relatedDeal0 = await Deals.findOne({
                    offset: Math.floor(Math.random() * (await Deals.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setDeal)
                {
                    await
                    Project0.
                    setDeal(relatedDeal0);
                }
            
                const relatedDeal1 = await Deals.findOne({
                    offset: Math.floor(Math.random() * (await Deals.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setDeal)
                {
                    await
                    Project1.
                    setDeal(relatedDeal1);
                }
            
                const relatedDeal2 = await Deals.findOne({
                    offset: Math.floor(Math.random() * (await Deals.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setDeal)
                {
                    await
                    Project2.
                    setDeal(relatedDeal2);
                }
            
        }
        
    
        
            
            async function associateProjectWithTemplate() {
            
                const relatedTemplate0 = await ProjectTemplates.findOne({
                    offset: Math.floor(Math.random() * (await ProjectTemplates.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setTemplate)
                {
                    await
                    Project0.
                    setTemplate(relatedTemplate0);
                }
            
                const relatedTemplate1 = await ProjectTemplates.findOne({
                    offset: Math.floor(Math.random() * (await ProjectTemplates.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setTemplate)
                {
                    await
                    Project1.
                    setTemplate(relatedTemplate1);
                }
            
                const relatedTemplate2 = await ProjectTemplates.findOne({
                    offset: Math.floor(Math.random() * (await ProjectTemplates.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setTemplate)
                {
                    await
                    Project2.
                    setTemplate(relatedTemplate2);
                }
            
        }
        
    
        
            
            async function associateProjectWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setService_line)
                {
                    await
                    Project0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setService_line)
                {
                    await
                    Project1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setService_line)
                {
                    await
                    Project2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProjectWithProject_manager() {
            
                const relatedProject_manager0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setProject_manager)
                {
                    await
                    Project0.
                    setProject_manager(relatedProject_manager0);
                }
            
                const relatedProject_manager1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setProject_manager)
                {
                    await
                    Project1.
                    setProject_manager(relatedProject_manager1);
                }
            
                const relatedProject_manager2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setProject_manager)
                {
                    await
                    Project2.
                    setProject_manager(relatedProject_manager2);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateProjectWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Project0 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Project0?.setOrganization)
                {
                    await
                    Project0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Project1 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Project1?.setOrganization)
                {
                    await
                    Project1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Project2 = await Projects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Project2?.setOrganization)
                {
                    await
                    Project2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMilestoneWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Milestone0 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Milestone0?.setTenant)
                {
                    await
                    Milestone0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Milestone1 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Milestone1?.setTenant)
                {
                    await
                    Milestone1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Milestone2 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Milestone2?.setTenant)
                {
                    await
                    Milestone2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateMilestoneWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Milestone0 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Milestone0?.setProject)
                {
                    await
                    Milestone0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Milestone1 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Milestone1?.setProject)
                {
                    await
                    Milestone1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Milestone2 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Milestone2?.setProject)
                {
                    await
                    Milestone2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMilestoneWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Milestone0 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Milestone0?.setOrganization)
                {
                    await
                    Milestone0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Milestone1 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Milestone1?.setOrganization)
                {
                    await
                    Milestone1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Milestone2 = await Milestones.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Milestone2?.setOrganization)
                {
                    await
                    Milestone2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTaskWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Task0 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Task0?.setTenant)
                {
                    await
                    Task0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Task1 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Task1?.setTenant)
                {
                    await
                    Task1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Task2 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Task2?.setTenant)
                {
                    await
                    Task2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTaskWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Task0 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Task0?.setProject)
                {
                    await
                    Task0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Task1 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Task1?.setProject)
                {
                    await
                    Task1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Task2 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Task2?.setProject)
                {
                    await
                    Task2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
            
            async function associateTaskWithMilestone() {
            
                const relatedMilestone0 = await Milestones.findOne({
                    offset: Math.floor(Math.random() * (await Milestones.count())),
                });
                const Task0 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Task0?.setMilestone)
                {
                    await
                    Task0.
                    setMilestone(relatedMilestone0);
                }
            
                const relatedMilestone1 = await Milestones.findOne({
                    offset: Math.floor(Math.random() * (await Milestones.count())),
                });
                const Task1 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Task1?.setMilestone)
                {
                    await
                    Task1.
                    setMilestone(relatedMilestone1);
                }
            
                const relatedMilestone2 = await Milestones.findOne({
                    offset: Math.floor(Math.random() * (await Milestones.count())),
                });
                const Task2 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Task2?.setMilestone)
                {
                    await
                    Task2.
                    setMilestone(relatedMilestone2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTaskWithAssignee() {
            
                const relatedAssignee0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Task0 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Task0?.setAssignee)
                {
                    await
                    Task0.
                    setAssignee(relatedAssignee0);
                }
            
                const relatedAssignee1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Task1 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Task1?.setAssignee)
                {
                    await
                    Task1.
                    setAssignee(relatedAssignee1);
                }
            
                const relatedAssignee2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Task2 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Task2?.setAssignee)
                {
                    await
                    Task2.
                    setAssignee(relatedAssignee2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTaskWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Task0 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Task0?.setOrganization)
                {
                    await
                    Task0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Task1 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Task1?.setOrganization)
                {
                    await
                    Task1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Task2 = await Tasks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Task2?.setOrganization)
                {
                    await
                    Task2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTaskDependencyWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TaskDependency0 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TaskDependency0?.setTenant)
                {
                    await
                    TaskDependency0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TaskDependency1 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TaskDependency1?.setTenant)
                {
                    await
                    TaskDependency1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TaskDependency2 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TaskDependency2?.setTenant)
                {
                    await
                    TaskDependency2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTaskDependencyWithTask() {
            
                const relatedTask0 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency0 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TaskDependency0?.setTask)
                {
                    await
                    TaskDependency0.
                    setTask(relatedTask0);
                }
            
                const relatedTask1 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency1 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TaskDependency1?.setTask)
                {
                    await
                    TaskDependency1.
                    setTask(relatedTask1);
                }
            
                const relatedTask2 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency2 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TaskDependency2?.setTask)
                {
                    await
                    TaskDependency2.
                    setTask(relatedTask2);
                }
            
        }
        
    
        
            
            async function associateTaskDependencyWithDepends_on_task() {
            
                const relatedDepends_on_task0 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency0 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TaskDependency0?.setDepends_on_task)
                {
                    await
                    TaskDependency0.
                    setDepends_on_task(relatedDepends_on_task0);
                }
            
                const relatedDepends_on_task1 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency1 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TaskDependency1?.setDepends_on_task)
                {
                    await
                    TaskDependency1.
                    setDepends_on_task(relatedDepends_on_task1);
                }
            
                const relatedDepends_on_task2 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TaskDependency2 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TaskDependency2?.setDepends_on_task)
                {
                    await
                    TaskDependency2.
                    setDepends_on_task(relatedDepends_on_task2);
                }
            
        }
        
    
        
            
            async function associateTaskDependencyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaskDependency0 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TaskDependency0?.setOrganization)
                {
                    await
                    TaskDependency0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaskDependency1 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TaskDependency1?.setOrganization)
                {
                    await
                    TaskDependency1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TaskDependency2 = await TaskDependencies.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TaskDependency2?.setOrganization)
                {
                    await
                    TaskDependency2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDeliverableWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deliverable0 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deliverable0?.setTenant)
                {
                    await
                    Deliverable0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deliverable1 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deliverable1?.setTenant)
                {
                    await
                    Deliverable1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Deliverable2 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deliverable2?.setTenant)
                {
                    await
                    Deliverable2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateDeliverableWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Deliverable0 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deliverable0?.setProject)
                {
                    await
                    Deliverable0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Deliverable1 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deliverable1?.setProject)
                {
                    await
                    Deliverable1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Deliverable2 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deliverable2?.setProject)
                {
                    await
                    Deliverable2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDeliverableWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deliverable0 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Deliverable0?.setOrganization)
                {
                    await
                    Deliverable0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deliverable1 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Deliverable1?.setOrganization)
                {
                    await
                    Deliverable1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Deliverable2 = await Deliverables.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Deliverable2?.setOrganization)
                {
                    await
                    Deliverable2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProjectRiskWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectRisk0 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectRisk0?.setTenant)
                {
                    await
                    ProjectRisk0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectRisk1 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectRisk1?.setTenant)
                {
                    await
                    ProjectRisk1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectRisk2 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectRisk2?.setTenant)
                {
                    await
                    ProjectRisk2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateProjectRiskWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectRisk0 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectRisk0?.setProject)
                {
                    await
                    ProjectRisk0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectRisk1 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectRisk1?.setProject)
                {
                    await
                    ProjectRisk1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectRisk2 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectRisk2?.setProject)
                {
                    await
                    ProjectRisk2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProjectRiskWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectRisk0 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectRisk0?.setOwner)
                {
                    await
                    ProjectRisk0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectRisk1 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectRisk1?.setOwner)
                {
                    await
                    ProjectRisk1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectRisk2 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectRisk2?.setOwner)
                {
                    await
                    ProjectRisk2.
                    setOwner(relatedOwner2);
                }
            
        }
        
    
        
            
            async function associateProjectRiskWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectRisk0 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectRisk0?.setOrganization)
                {
                    await
                    ProjectRisk0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectRisk1 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectRisk1?.setOrganization)
                {
                    await
                    ProjectRisk1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectRisk2 = await ProjectRisks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectRisk2?.setOrganization)
                {
                    await
                    ProjectRisk2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProjectStatusReportWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectStatusReport0 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectStatusReport0?.setTenant)
                {
                    await
                    ProjectStatusReport0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectStatusReport1 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectStatusReport1?.setTenant)
                {
                    await
                    ProjectStatusReport1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ProjectStatusReport2 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectStatusReport2?.setTenant)
                {
                    await
                    ProjectStatusReport2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateProjectStatusReportWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectStatusReport0 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectStatusReport0?.setProject)
                {
                    await
                    ProjectStatusReport0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectStatusReport1 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectStatusReport1?.setProject)
                {
                    await
                    ProjectStatusReport1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ProjectStatusReport2 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectStatusReport2?.setProject)
                {
                    await
                    ProjectStatusReport2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProjectStatusReportWithAuthor() {
            
                const relatedAuthor0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectStatusReport0 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectStatusReport0?.setAuthor)
                {
                    await
                    ProjectStatusReport0.
                    setAuthor(relatedAuthor0);
                }
            
                const relatedAuthor1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectStatusReport1 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectStatusReport1?.setAuthor)
                {
                    await
                    ProjectStatusReport1.
                    setAuthor(relatedAuthor1);
                }
            
                const relatedAuthor2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProjectStatusReport2 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectStatusReport2?.setAuthor)
                {
                    await
                    ProjectStatusReport2.
                    setAuthor(relatedAuthor2);
                }
            
        }
        
    
        
            
            async function associateProjectStatusReportWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectStatusReport0 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProjectStatusReport0?.setOrganization)
                {
                    await
                    ProjectStatusReport0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectStatusReport1 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProjectStatusReport1?.setOrganization)
                {
                    await
                    ProjectStatusReport1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProjectStatusReport2 = await ProjectStatusReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProjectStatusReport2?.setOrganization)
                {
                    await
                    ProjectStatusReport2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSkillWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Skill0 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Skill0?.setTenant)
                {
                    await
                    Skill0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Skill1 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Skill1?.setTenant)
                {
                    await
                    Skill1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Skill2 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Skill2?.setTenant)
                {
                    await
                    Skill2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateSkillWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Skill0 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Skill0?.setOrganization)
                {
                    await
                    Skill0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Skill1 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Skill1?.setOrganization)
                {
                    await
                    Skill1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Skill2 = await Skills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Skill2?.setOrganization)
                {
                    await
                    Skill2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTeamMemberWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMember0 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMember0?.setTenant)
                {
                    await
                    TeamMember0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMember1 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMember1?.setTenant)
                {
                    await
                    TeamMember1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMember2 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMember2?.setTenant)
                {
                    await
                    TeamMember2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTeamMemberWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TeamMember0 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMember0?.setUser)
                {
                    await
                    TeamMember0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TeamMember1 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMember1?.setUser)
                {
                    await
                    TeamMember1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TeamMember2 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMember2?.setUser)
                {
                    await
                    TeamMember2.
                    setUser(relatedUser2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTeamMemberWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMember0 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMember0?.setOrganization)
                {
                    await
                    TeamMember0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMember1 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMember1?.setOrganization)
                {
                    await
                    TeamMember1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMember2 = await TeamMembers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMember2?.setOrganization)
                {
                    await
                    TeamMember2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTeamMemberSkillWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMemberSkill0 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMemberSkill0?.setTenant)
                {
                    await
                    TeamMemberSkill0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMemberSkill1 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMemberSkill1?.setTenant)
                {
                    await
                    TeamMemberSkill1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TeamMemberSkill2 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMemberSkill2?.setTenant)
                {
                    await
                    TeamMemberSkill2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTeamMemberSkillWithTeam_member() {
            
                const relatedTeam_member0 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const TeamMemberSkill0 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMemberSkill0?.setTeam_member)
                {
                    await
                    TeamMemberSkill0.
                    setTeam_member(relatedTeam_member0);
                }
            
                const relatedTeam_member1 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const TeamMemberSkill1 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMemberSkill1?.setTeam_member)
                {
                    await
                    TeamMemberSkill1.
                    setTeam_member(relatedTeam_member1);
                }
            
                const relatedTeam_member2 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const TeamMemberSkill2 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMemberSkill2?.setTeam_member)
                {
                    await
                    TeamMemberSkill2.
                    setTeam_member(relatedTeam_member2);
                }
            
        }
        
    
        
            
            async function associateTeamMemberSkillWithSkill() {
            
                const relatedSkill0 = await Skills.findOne({
                    offset: Math.floor(Math.random() * (await Skills.count())),
                });
                const TeamMemberSkill0 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMemberSkill0?.setSkill)
                {
                    await
                    TeamMemberSkill0.
                    setSkill(relatedSkill0);
                }
            
                const relatedSkill1 = await Skills.findOne({
                    offset: Math.floor(Math.random() * (await Skills.count())),
                });
                const TeamMemberSkill1 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMemberSkill1?.setSkill)
                {
                    await
                    TeamMemberSkill1.
                    setSkill(relatedSkill1);
                }
            
                const relatedSkill2 = await Skills.findOne({
                    offset: Math.floor(Math.random() * (await Skills.count())),
                });
                const TeamMemberSkill2 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMemberSkill2?.setSkill)
                {
                    await
                    TeamMemberSkill2.
                    setSkill(relatedSkill2);
                }
            
        }
        
    
        
    
        
            
            async function associateTeamMemberSkillWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMemberSkill0 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TeamMemberSkill0?.setOrganization)
                {
                    await
                    TeamMemberSkill0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMemberSkill1 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TeamMemberSkill1?.setOrganization)
                {
                    await
                    TeamMemberSkill1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TeamMemberSkill2 = await TeamMemberSkills.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TeamMemberSkill2?.setOrganization)
                {
                    await
                    TeamMemberSkill2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateResourceAllocationWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ResourceAllocation0 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResourceAllocation0?.setTenant)
                {
                    await
                    ResourceAllocation0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ResourceAllocation1 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResourceAllocation1?.setTenant)
                {
                    await
                    ResourceAllocation1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ResourceAllocation2 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResourceAllocation2?.setTenant)
                {
                    await
                    ResourceAllocation2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateResourceAllocationWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ResourceAllocation0 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResourceAllocation0?.setProject)
                {
                    await
                    ResourceAllocation0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ResourceAllocation1 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResourceAllocation1?.setProject)
                {
                    await
                    ResourceAllocation1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const ResourceAllocation2 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResourceAllocation2?.setProject)
                {
                    await
                    ResourceAllocation2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
            
            async function associateResourceAllocationWithTeam_member() {
            
                const relatedTeam_member0 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const ResourceAllocation0 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResourceAllocation0?.setTeam_member)
                {
                    await
                    ResourceAllocation0.
                    setTeam_member(relatedTeam_member0);
                }
            
                const relatedTeam_member1 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const ResourceAllocation1 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResourceAllocation1?.setTeam_member)
                {
                    await
                    ResourceAllocation1.
                    setTeam_member(relatedTeam_member1);
                }
            
                const relatedTeam_member2 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const ResourceAllocation2 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResourceAllocation2?.setTeam_member)
                {
                    await
                    ResourceAllocation2.
                    setTeam_member(relatedTeam_member2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateResourceAllocationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ResourceAllocation0 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResourceAllocation0?.setOrganization)
                {
                    await
                    ResourceAllocation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ResourceAllocation1 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResourceAllocation1?.setOrganization)
                {
                    await
                    ResourceAllocation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ResourceAllocation2 = await ResourceAllocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResourceAllocation2?.setOrganization)
                {
                    await
                    ResourceAllocation2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateLeaveRequestWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const LeaveRequest0 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaveRequest0?.setTenant)
                {
                    await
                    LeaveRequest0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const LeaveRequest1 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaveRequest1?.setTenant)
                {
                    await
                    LeaveRequest1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const LeaveRequest2 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaveRequest2?.setTenant)
                {
                    await
                    LeaveRequest2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateLeaveRequestWithTeam_member() {
            
                const relatedTeam_member0 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const LeaveRequest0 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaveRequest0?.setTeam_member)
                {
                    await
                    LeaveRequest0.
                    setTeam_member(relatedTeam_member0);
                }
            
                const relatedTeam_member1 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const LeaveRequest1 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaveRequest1?.setTeam_member)
                {
                    await
                    LeaveRequest1.
                    setTeam_member(relatedTeam_member1);
                }
            
                const relatedTeam_member2 = await TeamMembers.findOne({
                    offset: Math.floor(Math.random() * (await TeamMembers.count())),
                });
                const LeaveRequest2 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaveRequest2?.setTeam_member)
                {
                    await
                    LeaveRequest2.
                    setTeam_member(relatedTeam_member2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLeaveRequestWithApprover() {
            
                const relatedApprover0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LeaveRequest0 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaveRequest0?.setApprover)
                {
                    await
                    LeaveRequest0.
                    setApprover(relatedApprover0);
                }
            
                const relatedApprover1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LeaveRequest1 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaveRequest1?.setApprover)
                {
                    await
                    LeaveRequest1.
                    setApprover(relatedApprover1);
                }
            
                const relatedApprover2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LeaveRequest2 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaveRequest2?.setApprover)
                {
                    await
                    LeaveRequest2.
                    setApprover(relatedApprover2);
                }
            
        }
        
    
        
            
            async function associateLeaveRequestWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaveRequest0 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LeaveRequest0?.setOrganization)
                {
                    await
                    LeaveRequest0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaveRequest1 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LeaveRequest1?.setOrganization)
                {
                    await
                    LeaveRequest1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const LeaveRequest2 = await LeaveRequests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LeaveRequest2?.setOrganization)
                {
                    await
                    LeaveRequest2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePublicHolidayWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PublicHoliday0 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PublicHoliday0?.setTenant)
                {
                    await
                    PublicHoliday0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PublicHoliday1 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PublicHoliday1?.setTenant)
                {
                    await
                    PublicHoliday1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PublicHoliday2 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PublicHoliday2?.setTenant)
                {
                    await
                    PublicHoliday2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePublicHolidayWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PublicHoliday0 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PublicHoliday0?.setOrganization)
                {
                    await
                    PublicHoliday0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PublicHoliday1 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PublicHoliday1?.setOrganization)
                {
                    await
                    PublicHoliday1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PublicHoliday2 = await PublicHolidays.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PublicHoliday2?.setOrganization)
                {
                    await
                    PublicHoliday2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTimesheetWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Timesheet0 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Timesheet0?.setTenant)
                {
                    await
                    Timesheet0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Timesheet1 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Timesheet1?.setTenant)
                {
                    await
                    Timesheet1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Timesheet2 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Timesheet2?.setTenant)
                {
                    await
                    Timesheet2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTimesheetWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet0 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Timesheet0?.setUser)
                {
                    await
                    Timesheet0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet1 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Timesheet1?.setUser)
                {
                    await
                    Timesheet1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet2 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Timesheet2?.setUser)
                {
                    await
                    Timesheet2.
                    setUser(relatedUser2);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateTimesheetWithApprover() {
            
                const relatedApprover0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet0 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Timesheet0?.setApprover)
                {
                    await
                    Timesheet0.
                    setApprover(relatedApprover0);
                }
            
                const relatedApprover1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet1 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Timesheet1?.setApprover)
                {
                    await
                    Timesheet1.
                    setApprover(relatedApprover1);
                }
            
                const relatedApprover2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Timesheet2 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Timesheet2?.setApprover)
                {
                    await
                    Timesheet2.
                    setApprover(relatedApprover2);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateTimesheetWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Timesheet0 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Timesheet0?.setOrganization)
                {
                    await
                    Timesheet0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Timesheet1 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Timesheet1?.setOrganization)
                {
                    await
                    Timesheet1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Timesheet2 = await Timesheets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Timesheet2?.setOrganization)
                {
                    await
                    Timesheet2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTimeEntryWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setTenant)
                {
                    await
                    TimeEntry0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setTenant)
                {
                    await
                    TimeEntry1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setTenant)
                {
                    await
                    TimeEntry2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setUser)
                {
                    await
                    TimeEntry0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setUser)
                {
                    await
                    TimeEntry1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setUser)
                {
                    await
                    TimeEntry2.
                    setUser(relatedUser2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithTimesheet() {
            
                const relatedTimesheet0 = await Timesheets.findOne({
                    offset: Math.floor(Math.random() * (await Timesheets.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setTimesheet)
                {
                    await
                    TimeEntry0.
                    setTimesheet(relatedTimesheet0);
                }
            
                const relatedTimesheet1 = await Timesheets.findOne({
                    offset: Math.floor(Math.random() * (await Timesheets.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setTimesheet)
                {
                    await
                    TimeEntry1.
                    setTimesheet(relatedTimesheet1);
                }
            
                const relatedTimesheet2 = await Timesheets.findOne({
                    offset: Math.floor(Math.random() * (await Timesheets.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setTimesheet)
                {
                    await
                    TimeEntry2.
                    setTimesheet(relatedTimesheet2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setCompany)
                {
                    await
                    TimeEntry0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setCompany)
                {
                    await
                    TimeEntry1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setCompany)
                {
                    await
                    TimeEntry2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setProject)
                {
                    await
                    TimeEntry0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setProject)
                {
                    await
                    TimeEntry1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setProject)
                {
                    await
                    TimeEntry2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithTask() {
            
                const relatedTask0 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setTask)
                {
                    await
                    TimeEntry0.
                    setTask(relatedTask0);
                }
            
                const relatedTask1 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setTask)
                {
                    await
                    TimeEntry1.
                    setTask(relatedTask1);
                }
            
                const relatedTask2 = await Tasks.findOne({
                    offset: Math.floor(Math.random() * (await Tasks.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setTask)
                {
                    await
                    TimeEntry2.
                    setTask(relatedTask2);
                }
            
        }
        
    
        
            
            async function associateTimeEntryWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setService_line)
                {
                    await
                    TimeEntry0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setService_line)
                {
                    await
                    TimeEntry1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setService_line)
                {
                    await
                    TimeEntry2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTimeEntryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TimeEntry0 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TimeEntry0?.setOrganization)
                {
                    await
                    TimeEntry0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TimeEntry1 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TimeEntry1?.setOrganization)
                {
                    await
                    TimeEntry1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TimeEntry2 = await TimeEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TimeEntry2?.setOrganization)
                {
                    await
                    TimeEntry2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProductWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setTenant)
                {
                    await
                    Product0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setTenant)
                {
                    await
                    Product1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setTenant)
                {
                    await
                    Product2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProductWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setOrganization)
                {
                    await
                    Product0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setOrganization)
                {
                    await
                    Product1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setOrganization)
                {
                    await
                    Product2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateContractWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contract0 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contract0?.setTenant)
                {
                    await
                    Contract0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contract1 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contract1?.setTenant)
                {
                    await
                    Contract1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Contract2 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contract2?.setTenant)
                {
                    await
                    Contract2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateContractWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contract0 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contract0?.setCompany)
                {
                    await
                    Contract0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contract1 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contract1?.setCompany)
                {
                    await
                    Contract1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Contract2 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contract2?.setCompany)
                {
                    await
                    Contract2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateContractWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Contract0 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contract0?.setService_line)
                {
                    await
                    Contract0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Contract1 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contract1?.setService_line)
                {
                    await
                    Contract1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const Contract2 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contract2?.setService_line)
                {
                    await
                    Contract2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateContractWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contract0 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Contract0?.setOrganization)
                {
                    await
                    Contract0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contract1 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Contract1?.setOrganization)
                {
                    await
                    Contract1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Contract2 = await Contracts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Contract2?.setOrganization)
                {
                    await
                    Contract2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInvoiceWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setTenant)
                {
                    await
                    Invoice0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setTenant)
                {
                    await
                    Invoice1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setTenant)
                {
                    await
                    Invoice2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setCompany)
                {
                    await
                    Invoice0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setCompany)
                {
                    await
                    Invoice1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setCompany)
                {
                    await
                    Invoice2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setProject)
                {
                    await
                    Invoice0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setProject)
                {
                    await
                    Invoice1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setProject)
                {
                    await
                    Invoice2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
            
            async function associateInvoiceWithContract() {
            
                const relatedContract0 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const Invoice0 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Invoice0?.setContract)
                {
                    await
                    Invoice0.
                    setContract(relatedContract0);
                }
            
                const relatedContract1 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const Invoice1 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Invoice1?.setContract)
                {
                    await
                    Invoice1.
                    setContract(relatedContract1);
                }
            
                const relatedContract2 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const Invoice2 = await Invoices.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Invoice2?.setContract)
                {
                    await
                    Invoice2.
                    setContract(relatedContract2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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 associateInvoiceLineItemWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InvoiceLineItem0 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceLineItem0?.setTenant)
                {
                    await
                    InvoiceLineItem0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InvoiceLineItem1 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceLineItem1?.setTenant)
                {
                    await
                    InvoiceLineItem1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InvoiceLineItem2 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceLineItem2?.setTenant)
                {
                    await
                    InvoiceLineItem2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateInvoiceLineItemWithInvoice() {
            
                const relatedInvoice0 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceLineItem0 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceLineItem0?.setInvoice)
                {
                    await
                    InvoiceLineItem0.
                    setInvoice(relatedInvoice0);
                }
            
                const relatedInvoice1 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceLineItem1 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceLineItem1?.setInvoice)
                {
                    await
                    InvoiceLineItem1.
                    setInvoice(relatedInvoice1);
                }
            
                const relatedInvoice2 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const InvoiceLineItem2 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceLineItem2?.setInvoice)
                {
                    await
                    InvoiceLineItem2.
                    setInvoice(relatedInvoice2);
                }
            
        }
        
    
        
            
            async function associateInvoiceLineItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceLineItem0 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceLineItem0?.setProduct)
                {
                    await
                    InvoiceLineItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceLineItem1 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceLineItem1?.setProduct)
                {
                    await
                    InvoiceLineItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InvoiceLineItem2 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceLineItem2?.setProduct)
                {
                    await
                    InvoiceLineItem2.
                    setProduct(relatedProduct2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInvoiceLineItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceLineItem0 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InvoiceLineItem0?.setOrganization)
                {
                    await
                    InvoiceLineItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceLineItem1 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InvoiceLineItem1?.setOrganization)
                {
                    await
                    InvoiceLineItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InvoiceLineItem2 = await InvoiceLineItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InvoiceLineItem2?.setOrganization)
                {
                    await
                    InvoiceLineItem2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePaymentWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setTenant)
                {
                    await
                    Payment0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setTenant)
                {
                    await
                    Payment1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setTenant)
                {
                    await
                    Payment2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associatePaymentWithInvoice() {
            
                const relatedInvoice0 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setInvoice)
                {
                    await
                    Payment0.
                    setInvoice(relatedInvoice0);
                }
            
                const relatedInvoice1 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setInvoice)
                {
                    await
                    Payment1.
                    setInvoice(relatedInvoice1);
                }
            
                const relatedInvoice2 = await Invoices.findOne({
                    offset: Math.floor(Math.random() * (await Invoices.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setInvoice)
                {
                    await
                    Payment2.
                    setInvoice(relatedInvoice2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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 associateSupportSlaWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportSla0 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportSla0?.setTenant)
                {
                    await
                    SupportSla0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportSla1 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportSla1?.setTenant)
                {
                    await
                    SupportSla1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportSla2 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportSla2?.setTenant)
                {
                    await
                    SupportSla2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSupportSlaWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportSla0 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportSla0?.setOrganization)
                {
                    await
                    SupportSla0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportSla1 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportSla1?.setOrganization)
                {
                    await
                    SupportSla1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportSla2 = await SupportSlas.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportSla2?.setOrganization)
                {
                    await
                    SupportSla2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSupportTicketWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setTenant)
                {
                    await
                    SupportTicket0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setTenant)
                {
                    await
                    SupportTicket1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setTenant)
                {
                    await
                    SupportTicket2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
            
            async function associateSupportTicketWithCompany() {
            
                const relatedCompany0 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setCompany)
                {
                    await
                    SupportTicket0.
                    setCompany(relatedCompany0);
                }
            
                const relatedCompany1 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setCompany)
                {
                    await
                    SupportTicket1.
                    setCompany(relatedCompany1);
                }
            
                const relatedCompany2 = await Companies.findOne({
                    offset: Math.floor(Math.random() * (await Companies.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setCompany)
                {
                    await
                    SupportTicket2.
                    setCompany(relatedCompany2);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithContact() {
            
                const relatedContact0 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setContact)
                {
                    await
                    SupportTicket0.
                    setContact(relatedContact0);
                }
            
                const relatedContact1 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setContact)
                {
                    await
                    SupportTicket1.
                    setContact(relatedContact1);
                }
            
                const relatedContact2 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setContact)
                {
                    await
                    SupportTicket2.
                    setContact(relatedContact2);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithProject() {
            
                const relatedProject0 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setProject)
                {
                    await
                    SupportTicket0.
                    setProject(relatedProject0);
                }
            
                const relatedProject1 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setProject)
                {
                    await
                    SupportTicket1.
                    setProject(relatedProject1);
                }
            
                const relatedProject2 = await Projects.findOne({
                    offset: Math.floor(Math.random() * (await Projects.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setProject)
                {
                    await
                    SupportTicket2.
                    setProject(relatedProject2);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithContract() {
            
                const relatedContract0 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setContract)
                {
                    await
                    SupportTicket0.
                    setContract(relatedContract0);
                }
            
                const relatedContract1 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setContract)
                {
                    await
                    SupportTicket1.
                    setContract(relatedContract1);
                }
            
                const relatedContract2 = await Contracts.findOne({
                    offset: Math.floor(Math.random() * (await Contracts.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setContract)
                {
                    await
                    SupportTicket2.
                    setContract(relatedContract2);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithService_line() {
            
                const relatedService_line0 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setService_line)
                {
                    await
                    SupportTicket0.
                    setService_line(relatedService_line0);
                }
            
                const relatedService_line1 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setService_line)
                {
                    await
                    SupportTicket1.
                    setService_line(relatedService_line1);
                }
            
                const relatedService_line2 = await ServiceLines.findOne({
                    offset: Math.floor(Math.random() * (await ServiceLines.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setService_line)
                {
                    await
                    SupportTicket2.
                    setService_line(relatedService_line2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSupportTicketWithSla() {
            
                const relatedSla0 = await SupportSlas.findOne({
                    offset: Math.floor(Math.random() * (await SupportSlas.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setSla)
                {
                    await
                    SupportTicket0.
                    setSla(relatedSla0);
                }
            
                const relatedSla1 = await SupportSlas.findOne({
                    offset: Math.floor(Math.random() * (await SupportSlas.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setSla)
                {
                    await
                    SupportTicket1.
                    setSla(relatedSla1);
                }
            
                const relatedSla2 = await SupportSlas.findOne({
                    offset: Math.floor(Math.random() * (await SupportSlas.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setSla)
                {
                    await
                    SupportTicket2.
                    setSla(relatedSla2);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithAssignee() {
            
                const relatedAssignee0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setAssignee)
                {
                    await
                    SupportTicket0.
                    setAssignee(relatedAssignee0);
                }
            
                const relatedAssignee1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setAssignee)
                {
                    await
                    SupportTicket1.
                    setAssignee(relatedAssignee1);
                }
            
                const relatedAssignee2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setAssignee)
                {
                    await
                    SupportTicket2.
                    setAssignee(relatedAssignee2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSupportTicketWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setOrganization)
                {
                    await
                    SupportTicket0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setOrganization)
                {
                    await
                    SupportTicket1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setOrganization)
                {
                    await
                    SupportTicket2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTicketCommentWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TicketComment0 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TicketComment0?.setTenant)
                {
                    await
                    TicketComment0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TicketComment1 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TicketComment1?.setTenant)
                {
                    await
                    TicketComment1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TicketComment2 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TicketComment2?.setTenant)
                {
                    await
                    TicketComment2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateTicketCommentWithTicket() {
            
                const relatedTicket0 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const TicketComment0 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TicketComment0?.setTicket)
                {
                    await
                    TicketComment0.
                    setTicket(relatedTicket0);
                }
            
                const relatedTicket1 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const TicketComment1 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TicketComment1?.setTicket)
                {
                    await
                    TicketComment1.
                    setTicket(relatedTicket1);
                }
            
                const relatedTicket2 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const TicketComment2 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TicketComment2?.setTicket)
                {
                    await
                    TicketComment2.
                    setTicket(relatedTicket2);
                }
            
        }
        
    
        
            
            async function associateTicketCommentWithAuthor() {
            
                const relatedAuthor0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TicketComment0 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TicketComment0?.setAuthor)
                {
                    await
                    TicketComment0.
                    setAuthor(relatedAuthor0);
                }
            
                const relatedAuthor1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TicketComment1 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TicketComment1?.setAuthor)
                {
                    await
                    TicketComment1.
                    setAuthor(relatedAuthor1);
                }
            
                const relatedAuthor2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TicketComment2 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TicketComment2?.setAuthor)
                {
                    await
                    TicketComment2.
                    setAuthor(relatedAuthor2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTicketCommentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TicketComment0 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TicketComment0?.setOrganization)
                {
                    await
                    TicketComment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TicketComment1 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TicketComment1?.setOrganization)
                {
                    await
                    TicketComment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TicketComment2 = await TicketComments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TicketComment2?.setOrganization)
                {
                    await
                    TicketComment2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCsatSurveyWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsatSurvey0 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsatSurvey0?.setTenant)
                {
                    await
                    CsatSurvey0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsatSurvey1 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsatSurvey1?.setTenant)
                {
                    await
                    CsatSurvey1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsatSurvey2 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsatSurvey2?.setTenant)
                {
                    await
                    CsatSurvey2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateCsatSurveyWithTicket() {
            
                const relatedTicket0 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const CsatSurvey0 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsatSurvey0?.setTicket)
                {
                    await
                    CsatSurvey0.
                    setTicket(relatedTicket0);
                }
            
                const relatedTicket1 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const CsatSurvey1 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsatSurvey1?.setTicket)
                {
                    await
                    CsatSurvey1.
                    setTicket(relatedTicket1);
                }
            
                const relatedTicket2 = await SupportTickets.findOne({
                    offset: Math.floor(Math.random() * (await SupportTickets.count())),
                });
                const CsatSurvey2 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsatSurvey2?.setTicket)
                {
                    await
                    CsatSurvey2.
                    setTicket(relatedTicket2);
                }
            
        }
        
    
        
            
            async function associateCsatSurveyWithContact() {
            
                const relatedContact0 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const CsatSurvey0 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsatSurvey0?.setContact)
                {
                    await
                    CsatSurvey0.
                    setContact(relatedContact0);
                }
            
                const relatedContact1 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const CsatSurvey1 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsatSurvey1?.setContact)
                {
                    await
                    CsatSurvey1.
                    setContact(relatedContact1);
                }
            
                const relatedContact2 = await Contacts.findOne({
                    offset: Math.floor(Math.random() * (await Contacts.count())),
                });
                const CsatSurvey2 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsatSurvey2?.setContact)
                {
                    await
                    CsatSurvey2.
                    setContact(relatedContact2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCsatSurveyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsatSurvey0 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsatSurvey0?.setOrganization)
                {
                    await
                    CsatSurvey0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsatSurvey1 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsatSurvey1?.setOrganization)
                {
                    await
                    CsatSurvey1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsatSurvey2 = await CsatSurveys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsatSurvey2?.setOrganization)
                {
                    await
                    CsatSurvey2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateEmailTemplateWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailTemplate0 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (EmailTemplate0?.setTenant)
                {
                    await
                    EmailTemplate0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailTemplate1 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (EmailTemplate1?.setTenant)
                {
                    await
                    EmailTemplate1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailTemplate2 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (EmailTemplate2?.setTenant)
                {
                    await
                    EmailTemplate2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateEmailTemplateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailTemplate0 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (EmailTemplate0?.setOrganization)
                {
                    await
                    EmailTemplate0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailTemplate1 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (EmailTemplate1?.setOrganization)
                {
                    await
                    EmailTemplate1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailTemplate2 = await EmailTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (EmailTemplate2?.setOrganization)
                {
                    await
                    EmailTemplate2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    

    
    
    
        
            
            async function associateNotificationWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setTenant)
                {
                    await
                    Notification0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setTenant)
                {
                    await
                    Notification1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setTenant)
                {
                    await
                    Notification2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateNotificationWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setUser)
                {
                    await
                    Notification0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setUser)
                {
                    await
                    Notification1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setUser)
                {
                    await
                    Notification2.
                    setUser(relatedUser2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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 associateAuditLogWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setTenant)
                {
                    await
                    AuditLog0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setTenant)
                {
                    await
                    AuditLog1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setTenant)
                {
                    await
                    AuditLog2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateAuditLogWithActor() {
            
                const relatedActor0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setActor)
                {
                    await
                    AuditLog0.
                    setActor(relatedActor0);
                }
            
                const relatedActor1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setActor)
                {
                    await
                    AuditLog1.
                    setActor(relatedActor1);
                }
            
                const relatedActor2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setActor)
                {
                    await
                    AuditLog2.
                    setActor(relatedActor2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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 associateImportWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Import0 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Import0?.setTenant)
                {
                    await
                    Import0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Import1 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Import1?.setTenant)
                {
                    await
                    Import1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Import2 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Import2?.setTenant)
                {
                    await
                    Import2.
                    setTenant(relatedTenant2);
                }
            
        }
        
    
        
            
            async function associateImportWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Import0 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Import0?.setRequested_by)
                {
                    await
                    Import0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Import1 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Import1?.setRequested_by)
                {
                    await
                    Import1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Import2 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Import2?.setRequested_by)
                {
                    await
                    Import2.
                    setRequested_by(relatedRequested_by2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateImportWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Import0 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Import0?.setOrganization)
                {
                    await
                    Import0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Import1 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Import1?.setOrganization)
                {
                    await
                    Import1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Import2 = await Imports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Import2?.setOrganization)
                {
                    await
                    Import2.
                    setOrganization(relatedOrganization2);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Tenants.bulkCreate(TenantsData);
                
            
            
                
                await ServiceLines.bulkCreate(ServiceLinesData);
                
            
            
                
                await Services.bulkCreate(ServicesData);
                
            
            
                
                await Companies.bulkCreate(CompaniesData);
                
            
            
                
                await Contacts.bulkCreate(ContactsData);
                
            
            
                
                await Tags.bulkCreate(TagsData);
                
            
            
                
                await Pipelines.bulkCreate(PipelinesData);
                
            
            
                
                await DealStages.bulkCreate(DealStagesData);
                
            
            
                
                await Leads.bulkCreate(LeadsData);
                
            
            
                
                await Deals.bulkCreate(DealsData);
                
            
            
                
                await ProjectTemplates.bulkCreate(ProjectTemplatesData);
                
            
            
                
                await Projects.bulkCreate(ProjectsData);
                
            
            
                
                await Milestones.bulkCreate(MilestonesData);
                
            
            
                
                await Tasks.bulkCreate(TasksData);
                
            
            
                
                await TaskDependencies.bulkCreate(TaskDependenciesData);
                
            
            
                
                await Deliverables.bulkCreate(DeliverablesData);
                
            
            
                
                await ProjectRisks.bulkCreate(ProjectRisksData);
                
            
            
                
                await ProjectStatusReports.bulkCreate(ProjectStatusReportsData);
                
            
            
                
                await Skills.bulkCreate(SkillsData);
                
            
            
                
                await TeamMembers.bulkCreate(TeamMembersData);
                
            
            
                
                await TeamMemberSkills.bulkCreate(TeamMemberSkillsData);
                
            
            
                
                await ResourceAllocations.bulkCreate(ResourceAllocationsData);
                
            
            
                
                await LeaveRequests.bulkCreate(LeaveRequestsData);
                
            
            
                
                await PublicHolidays.bulkCreate(PublicHolidaysData);
                
            
            
                
                await Timesheets.bulkCreate(TimesheetsData);
                
            
            
                
                await TimeEntries.bulkCreate(TimeEntriesData);
                
            
            
                
                await Products.bulkCreate(ProductsData);
                
            
            
                
                await Contracts.bulkCreate(ContractsData);
                
            
            
                
                await Invoices.bulkCreate(InvoicesData);
                
            
            
                
                await InvoiceLineItems.bulkCreate(InvoiceLineItemsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await SupportSlas.bulkCreate(SupportSlasData);
                
            
            
                
                await SupportTickets.bulkCreate(SupportTicketsData);
                
            
            
                
                await TicketComments.bulkCreate(TicketCommentsData);
                
            
            
                
                await CsatSurveys.bulkCreate(CsatSurveysData);
                
            
            
                
                await EmailTemplates.bulkCreate(EmailTemplatesData);
                
            
            
                
                await Notifications.bulkCreate(NotificationsData);
                
            
            
                
                await AuditLogs.bulkCreate(AuditLogsData);
                
            
            
                
                await Imports.bulkCreate(ImportsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTenantWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateServiceLineWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateServiceLineWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateServiceWithTenant(),
                    
                
                    
                        
                        await associateServiceWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateServiceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCompanyWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCompanyWithParent_company(),
                    
                
                    
                        
                        await associateCompanyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateContactWithTenant(),
                    
                
                    
                        
                        await associateContactWithCompany(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateContactWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTagWithTenant(),
                    
                
                    
                
                    
                
                    
                        
                        await associateTagWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePipelineWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePipelineWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDealStageWithTenant(),
                    
                
                    
                        
                        await associateDealStageWithPipeline(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDealStageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeadWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeadWithService_interest(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeadWithOwner(),
                    
                
                    
                
                    
                        
                        await associateLeadWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDealWithTenant(),
                    
                
                    
                        
                        await associateDealWithPipeline(),
                    
                
                    
                        
                        await associateDealWithStage(),
                    
                
                    
                        
                        await associateDealWithCompany(),
                    
                
                    
                        
                        await associateDealWithPrimary_contact(),
                    
                
                    
                        
                        await associateDealWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDealWithOwner(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDealWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProjectTemplateWithTenant(),
                    
                
                    
                        
                        await associateProjectTemplateWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProjectTemplateWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProjectWithTenant(),
                    
                
                    
                        
                        await associateProjectWithCompany(),
                    
                
                    
                        
                        await associateProjectWithDeal(),
                    
                
                    
                        
                        await associateProjectWithTemplate(),
                    
                
                    
                        
                        await associateProjectWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProjectWithProject_manager(),
                    
                
                    
                
                    
                
                    
                        
                        await associateProjectWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMilestoneWithTenant(),
                    
                
                    
                        
                        await associateMilestoneWithProject(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMilestoneWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTaskWithTenant(),
                    
                
                    
                        
                        await associateTaskWithProject(),
                    
                
                    
                        
                        await associateTaskWithMilestone(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTaskWithAssignee(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTaskWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTaskDependencyWithTenant(),
                    
                
                    
                        
                        await associateTaskDependencyWithTask(),
                    
                
                    
                        
                        await associateTaskDependencyWithDepends_on_task(),
                    
                
                    
                        
                        await associateTaskDependencyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDeliverableWithTenant(),
                    
                
                    
                        
                        await associateDeliverableWithProject(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDeliverableWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProjectRiskWithTenant(),
                    
                
                    
                        
                        await associateProjectRiskWithProject(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProjectRiskWithOwner(),
                    
                
                    
                        
                        await associateProjectRiskWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProjectStatusReportWithTenant(),
                    
                
                    
                        
                        await associateProjectStatusReportWithProject(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProjectStatusReportWithAuthor(),
                    
                
                    
                        
                        await associateProjectStatusReportWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSkillWithTenant(),
                    
                
                    
                
                    
                
                    
                        
                        await associateSkillWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTeamMemberWithTenant(),
                    
                
                    
                        
                        await associateTeamMemberWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTeamMemberWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTeamMemberSkillWithTenant(),
                    
                
                    
                        
                        await associateTeamMemberSkillWithTeam_member(),
                    
                
                    
                        
                        await associateTeamMemberSkillWithSkill(),
                    
                
                    
                
                    
                        
                        await associateTeamMemberSkillWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateResourceAllocationWithTenant(),
                    
                
                    
                        
                        await associateResourceAllocationWithProject(),
                    
                
                    
                        
                        await associateResourceAllocationWithTeam_member(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateResourceAllocationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateLeaveRequestWithTenant(),
                    
                
                    
                        
                        await associateLeaveRequestWithTeam_member(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLeaveRequestWithApprover(),
                    
                
                    
                        
                        await associateLeaveRequestWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePublicHolidayWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePublicHolidayWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTimesheetWithTenant(),
                    
                
                    
                        
                        await associateTimesheetWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTimesheetWithApprover(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTimesheetWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTimeEntryWithTenant(),
                    
                
                    
                        
                        await associateTimeEntryWithUser(),
                    
                
                    
                        
                        await associateTimeEntryWithTimesheet(),
                    
                
                    
                        
                        await associateTimeEntryWithCompany(),
                    
                
                    
                        
                        await associateTimeEntryWithProject(),
                    
                
                    
                        
                        await associateTimeEntryWithTask(),
                    
                
                    
                        
                        await associateTimeEntryWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTimeEntryWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProductWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateContractWithTenant(),
                    
                
                    
                        
                        await associateContractWithCompany(),
                    
                
                    
                        
                        await associateContractWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateContractWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInvoiceWithTenant(),
                    
                
                    
                        
                        await associateInvoiceWithCompany(),
                    
                
                    
                        
                        await associateInvoiceWithProject(),
                    
                
                    
                        
                        await associateInvoiceWithContract(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInvoiceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInvoiceLineItemWithTenant(),
                    
                
                    
                        
                        await associateInvoiceLineItemWithInvoice(),
                    
                
                    
                        
                        await associateInvoiceLineItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInvoiceLineItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentWithTenant(),
                    
                
                    
                        
                        await associatePaymentWithInvoice(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSupportSlaWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSupportSlaWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSupportTicketWithTenant(),
                    
                
                    
                
                    
                        
                        await associateSupportTicketWithCompany(),
                    
                
                    
                        
                        await associateSupportTicketWithContact(),
                    
                
                    
                        
                        await associateSupportTicketWithProject(),
                    
                
                    
                        
                        await associateSupportTicketWithContract(),
                    
                
                    
                        
                        await associateSupportTicketWithService_line(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSupportTicketWithSla(),
                    
                
                    
                        
                        await associateSupportTicketWithAssignee(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSupportTicketWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTicketCommentWithTenant(),
                    
                
                    
                        
                        await associateTicketCommentWithTicket(),
                    
                
                    
                        
                        await associateTicketCommentWithAuthor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTicketCommentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCsatSurveyWithTenant(),
                    
                
                    
                        
                        await associateCsatSurveyWithTicket(),
                    
                
                    
                        
                        await associateCsatSurveyWithContact(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCsatSurveyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateEmailTemplateWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateEmailTemplateWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateNotificationWithTenant(),
                    
                
                    
                        
                        await associateNotificationWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateNotificationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAuditLogWithTenant(),
                    
                
                    
                        
                        await associateAuditLogWithActor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAuditLogWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateImportWithTenant(),
                    
                
                    
                        
                        await associateImportWithRequested_by(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateImportWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('tenants', null, {});
            
            
            await queryInterface.bulkDelete('service_lines', null, {});
            
            
            await queryInterface.bulkDelete('services', null, {});
            
            
            await queryInterface.bulkDelete('companies', null, {});
            
            
            await queryInterface.bulkDelete('contacts', null, {});
            
            
            await queryInterface.bulkDelete('tags', null, {});
            
            
            await queryInterface.bulkDelete('pipelines', null, {});
            
            
            await queryInterface.bulkDelete('deal_stages', null, {});
            
            
            await queryInterface.bulkDelete('leads', null, {});
            
            
            await queryInterface.bulkDelete('deals', null, {});
            
            
            await queryInterface.bulkDelete('project_templates', null, {});
            
            
            await queryInterface.bulkDelete('projects', null, {});
            
            
            await queryInterface.bulkDelete('milestones', null, {});
            
            
            await queryInterface.bulkDelete('tasks', null, {});
            
            
            await queryInterface.bulkDelete('task_dependencies', null, {});
            
            
            await queryInterface.bulkDelete('deliverables', null, {});
            
            
            await queryInterface.bulkDelete('project_risks', null, {});
            
            
            await queryInterface.bulkDelete('project_status_reports', null, {});
            
            
            await queryInterface.bulkDelete('skills', null, {});
            
            
            await queryInterface.bulkDelete('team_members', null, {});
            
            
            await queryInterface.bulkDelete('team_member_skills', null, {});
            
            
            await queryInterface.bulkDelete('resource_allocations', null, {});
            
            
            await queryInterface.bulkDelete('leave_requests', null, {});
            
            
            await queryInterface.bulkDelete('public_holidays', null, {});
            
            
            await queryInterface.bulkDelete('timesheets', null, {});
            
            
            await queryInterface.bulkDelete('time_entries', null, {});
            
            
            await queryInterface.bulkDelete('products', null, {});
            
            
            await queryInterface.bulkDelete('contracts', null, {});
            
            
            await queryInterface.bulkDelete('invoices', null, {});
            
            
            await queryInterface.bulkDelete('invoice_line_items', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('support_slas', null, {});
            
            
            await queryInterface.bulkDelete('support_tickets', null, {});
            
            
            await queryInterface.bulkDelete('ticket_comments', null, {});
            
            
            await queryInterface.bulkDelete('csat_surveys', null, {});
            
            
            await queryInterface.bulkDelete('email_templates', null, {});
            
            
            await queryInterface.bulkDelete('notifications', null, {});
            
            
            await queryInterface.bulkDelete('audit_logs', null, {});
            
            
            await queryInterface.bulkDelete('imports', null, {});
            
        
    },
};