





















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






const Subscriptions = db.subscriptions;

const FeatureFlags = db.feature_flags;

const Matters = db.matters;

const MatterParties = db.matter_parties;

const Files = db.files;

const FileExtractions = db.file_extractions;

const AssistantThreads = db.assistant_threads;

const AssistantMessages = db.assistant_messages;

const AiJobs = db.ai_jobs;

const LegalTemplates = db.legal_templates;

const TemplateFields = db.template_fields;

const GeneratedDocuments = db.generated_documents;

const DocumentVersions = db.document_versions;

const ResearchQueries = db.research_queries;

const LegalSources = db.legal_sources;

const ResearchResults = db.research_results;

const CitatorChecks = db.citator_checks;

const MockTrials = db.mock_trials;

const MockTrialRoles = db.mock_trial_roles;

const MockTrialTurns = db.mock_trial_turns;

const TranscriptionJobs = db.transcription_jobs;

const MedicalChronologyReports = db.medical_chronology_reports;

const MedicalEvents = db.medical_events;

const CausationAnalyses = db.causation_analyses;

const AuditEvents = db.audit_events;







const SubscriptionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "expired",
            
        
    
        
        
            
                "billing_period": "yearly",
            
        
    
        
        
            
                "price_amount": 3.63,
            
        
    
        
        
            
                "currency": "Grace Hopper",
            
        
    
        
        
            
                "current_period_start": new Date(Date.now()),
            
        
    
        
        
            
                "current_period_end": new Date(Date.now()),
            
        
    
        
        
            
                "canceled_at": new Date(Date.now()),
            
        
    
        
        
            
                "payment_provider": "Grace Hopper",
            
        
    
        
        
            
                "provider_customer_ref": "Marie Curie",
            
        
    
        
        
            
                "provider_subscription_ref": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "past_due",
            
        
    
        
        
            
                "billing_period": "yearly",
            
        
    
        
        
            
                "price_amount": 9.98,
            
        
    
        
        
            
                "currency": "Marie Curie",
            
        
    
        
        
            
                "current_period_start": new Date(Date.now()),
            
        
    
        
        
            
                "current_period_end": new Date(Date.now()),
            
        
    
        
        
            
                "canceled_at": new Date(Date.now()),
            
        
    
        
        
            
                "payment_provider": "Marie Curie",
            
        
    
        
        
            
                "provider_customer_ref": "Alan Turing",
            
        
    
        
        
            
                "provider_subscription_ref": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "past_due",
            
        
    
        
        
            
                "billing_period": "yearly",
            
        
    
        
        
            
                "price_amount": 4.57,
            
        
    
        
        
            
                "currency": "Alan Turing",
            
        
    
        
        
            
                "current_period_start": new Date(Date.now()),
            
        
    
        
        
            
                "current_period_end": new Date(Date.now()),
            
        
    
        
        
            
                "canceled_at": new Date(Date.now()),
            
        
    
        
        
            
                "payment_provider": "Grace Hopper",
            
        
    
        
        
            
                "provider_customer_ref": "Grace Hopper",
            
        
    
        
        
            
                "provider_subscription_ref": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "trialing",
            
        
    
        
        
            
                "billing_period": "yearly",
            
        
    
        
        
            
                "price_amount": 5.85,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "current_period_start": new Date(Date.now()),
            
        
    
        
        
            
                "current_period_end": new Date(Date.now()),
            
        
    
        
        
            
                "canceled_at": new Date(Date.now()),
            
        
    
        
        
            
                "payment_provider": "Alan Turing",
            
        
    
        
        
            
                "provider_customer_ref": "Marie Curie",
            
        
    
        
        
            
                "provider_subscription_ref": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "billing_period": "yearly",
            
        
    
        
        
            
                "price_amount": 0.15,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "current_period_start": new Date(Date.now()),
            
        
    
        
        
            
                "current_period_end": new Date(Date.now()),
            
        
    
        
        
            
                "canceled_at": new Date(Date.now()),
            
        
    
        
        
            
                "payment_provider": "Ada Lovelace",
            
        
    
        
        
            
                "provider_customer_ref": "Ada Lovelace",
            
        
    
        
        
            
                "provider_subscription_ref": "Alan Turing",
            
        
    
    },
    
];



const FeatureFlagsData = [
    
    {
    
        
        
            
                "key": "Grace Hopper",
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "default_plan_access": "free",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
    },
    
    {
    
        
        
            
                "key": "Ada Lovelace",
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "default_plan_access": "disabled",
            
        
    
        
        
            
                "is_enabled": false,
            
        
    
    },
    
    {
    
        
        
            
                "key": "Grace Hopper",
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "default_plan_access": "free",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
    },
    
    {
    
        
        
            
                "key": "Marie Curie",
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "default_plan_access": "premium",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
    },
    
    {
    
        
        
            
                "key": "Grace Hopper",
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "default_plan_access": "free",
            
        
    
        
        
            
                "is_enabled": false,
            
        
    
    },
    
];



const MattersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "matter_type": "housing",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "jurisdiction": "Alan Turing",
            
        
    
        
        
            
                "court_name": "Alan Turing",
            
        
    
        
        
            
                "case_number": "Alan Turing",
            
        
    
        
        
            
                "filed_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_hearing_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "matter_type": "housing",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "jurisdiction": "Ada Lovelace",
            
        
    
        
        
            
                "court_name": "Grace Hopper",
            
        
    
        
        
            
                "case_number": "Alan Turing",
            
        
    
        
        
            
                "filed_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_hearing_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "matter_type": "administrative",
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "jurisdiction": "Ada Lovelace",
            
        
    
        
        
            
                "court_name": "Grace Hopper",
            
        
    
        
        
            
                "case_number": "Ada Lovelace",
            
        
    
        
        
            
                "filed_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_hearing_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "matter_type": "contract",
            
        
    
        
        
            
                "status": "stayed",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "court_name": "Alan Turing",
            
        
    
        
        
            
                "case_number": "Ada Lovelace",
            
        
    
        
        
            
                "filed_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_hearing_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "matter_type": "employment",
            
        
    
        
        
            
                "status": "intake",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "court_name": "Ada Lovelace",
            
        
    
        
        
            
                "case_number": "Alan Turing",
            
        
    
        
        
            
                "filed_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_hearing_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
];



const MatterPartiesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "party_role": "expert",
            
        
    
        
        
            
                "display_name": "Grace Hopper",
            
        
    
        
        
            
                "organization_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Alan Turing",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "party_role": "defendant",
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "organization_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Alan Turing",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Marie Curie",
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "party_role": "provider",
            
        
    
        
        
            
                "display_name": "Marie Curie",
            
        
    
        
        
            
                "organization_name": "Ada Lovelace",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Ada Lovelace",
            
        
    
        
        
            
                "address": "Alan Turing",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "party_role": "plaintiff",
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "organization_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Ada Lovelace",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "party_role": "defendant",
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "organization_name": "Grace Hopper",
            
        
    
        
        
            
                "email": "Marie Curie",
            
        
    
        
        
            
                "phone": "Grace Hopper",
            
        
    
        
        
            
                "address": "Ada Lovelace",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
    },
    
];



const FilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "file_name": "Alan Turing",
            
        
    
        
        
            
                "content_type": "Ada Lovelace",
            
        
    
        
        
            
                "file_extension": "Marie Curie",
            
        
    
        
        
            
                "size_bytes": 3,
            
        
    
        
        
            
                "storage_provider": "Grace Hopper",
            
        
    
        
        
            
                "storage_key": "Alan Turing",
            
        
    
        
        
            
                "checksum_sha256": "Grace Hopper",
            
        
    
        
        
            
                "is_ocr_required": false,
            
        
    
        
        
            
                "processing_status": "completed",
            
        
    
        
        
            
                "uploaded_at": new Date(Date.now()),
            
        
    
        
        
            
                "tags": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "file_name": "Alan Turing",
            
        
    
        
        
            
                "content_type": "Marie Curie",
            
        
    
        
        
            
                "file_extension": "Alan Turing",
            
        
    
        
        
            
                "size_bytes": 6,
            
        
    
        
        
            
                "storage_provider": "Marie Curie",
            
        
    
        
        
            
                "storage_key": "Alan Turing",
            
        
    
        
        
            
                "checksum_sha256": "Grace Hopper",
            
        
    
        
        
            
                "is_ocr_required": true,
            
        
    
        
        
            
                "processing_status": "processing",
            
        
    
        
        
            
                "uploaded_at": new Date(Date.now()),
            
        
    
        
        
            
                "tags": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "file_name": "Alan Turing",
            
        
    
        
        
            
                "content_type": "Grace Hopper",
            
        
    
        
        
            
                "file_extension": "Ada Lovelace",
            
        
    
        
        
            
                "size_bytes": 2,
            
        
    
        
        
            
                "storage_provider": "Marie Curie",
            
        
    
        
        
            
                "storage_key": "Grace Hopper",
            
        
    
        
        
            
                "checksum_sha256": "Marie Curie",
            
        
    
        
        
            
                "is_ocr_required": true,
            
        
    
        
        
            
                "processing_status": "queued",
            
        
    
        
        
            
                "uploaded_at": new Date(Date.now()),
            
        
    
        
        
            
                "tags": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "file_name": "Marie Curie",
            
        
    
        
        
            
                "content_type": "Alan Turing",
            
        
    
        
        
            
                "file_extension": "Alan Turing",
            
        
    
        
        
            
                "size_bytes": 1,
            
        
    
        
        
            
                "storage_provider": "Alan Turing",
            
        
    
        
        
            
                "storage_key": "Alan Turing",
            
        
    
        
        
            
                "checksum_sha256": "Grace Hopper",
            
        
    
        
        
            
                "is_ocr_required": false,
            
        
    
        
        
            
                "processing_status": "failed",
            
        
    
        
        
            
                "uploaded_at": new Date(Date.now()),
            
        
    
        
        
            
                "tags": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "file_name": "Grace Hopper",
            
        
    
        
        
            
                "content_type": "Ada Lovelace",
            
        
    
        
        
            
                "file_extension": "Alan Turing",
            
        
    
        
        
            
                "size_bytes": 7,
            
        
    
        
        
            
                "storage_provider": "Ada Lovelace",
            
        
    
        
        
            
                "storage_key": "Marie Curie",
            
        
    
        
        
            
                "checksum_sha256": "Grace Hopper",
            
        
    
        
        
            
                "is_ocr_required": true,
            
        
    
        
        
            
                "processing_status": "processing",
            
        
    
        
        
            
                "uploaded_at": new Date(Date.now()),
            
        
    
        
        
            
                "tags": "Marie Curie",
            
        
    
    },
    
];



const FileExtractionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "extraction_type": "text",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "language": "Ada Lovelace",
            
        
    
        
        
            
                "page_count": 1,
            
        
    
        
        
            
                "result_text": "Grace Hopper",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "extraction_type": "summary",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "language": "Alan Turing",
            
        
    
        
        
            
                "page_count": 9,
            
        
    
        
        
            
                "result_text": "Ada Lovelace",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "extraction_type": "ocr_text",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "language": "Alan Turing",
            
        
    
        
        
            
                "page_count": 8,
            
        
    
        
        
            
                "result_text": "Ada Lovelace",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "extraction_type": "issues",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "language": "Ada Lovelace",
            
        
    
        
        
            
                "page_count": 4,
            
        
    
        
        
            
                "result_text": "Marie Curie",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "extraction_type": "clauses",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "language": "Marie Curie",
            
        
    
        
        
            
                "page_count": 9,
            
        
    
        
        
            
                "result_text": "Marie Curie",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Grace Hopper",
            
        
    
    },
    
];



const AssistantThreadsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "thread_scope": "matter",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "thread_scope": "matter",
            
        
    
        
        
            
                "is_pinned": false,
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "thread_scope": "general",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "thread_scope": "matter",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "thread_scope": "general",
            
        
    
        
        
            
                "is_pinned": false,
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
    },
    
];



const AssistantMessagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "system",
            
        
    
        
        
            
                "content": "Marie Curie",
            
        
    
        
        
            
                "model_name": "Marie Curie",
            
        
    
        
        
            
                "prompt_tokens": 7,
            
        
    
        
        
            
                "completion_tokens": 3,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "assistant",
            
        
    
        
        
            
                "content": "Marie Curie",
            
        
    
        
        
            
                "model_name": "Alan Turing",
            
        
    
        
        
            
                "prompt_tokens": 7,
            
        
    
        
        
            
                "completion_tokens": 7,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "assistant",
            
        
    
        
        
            
                "content": "Marie Curie",
            
        
    
        
        
            
                "model_name": "Ada Lovelace",
            
        
    
        
        
            
                "prompt_tokens": 6,
            
        
    
        
        
            
                "completion_tokens": 4,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "user",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                "model_name": "Grace Hopper",
            
        
    
        
        
            
                "prompt_tokens": 4,
            
        
    
        
        
            
                "completion_tokens": 6,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "user",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                "model_name": "Ada Lovelace",
            
        
    
        
        
            
                "prompt_tokens": 7,
            
        
    
        
        
            
                "completion_tokens": 1,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
    },
    
];



const AiJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "translation",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "input_summary": "Grace Hopper",
            
        
    
        
        
            
                "output_summary": "Grace Hopper",
            
        
    
        
        
            
                "cost_usd": 2.39,
            
        
    
        
        
            
                "queued_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "completed_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "file_analysis",
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "input_summary": "Marie Curie",
            
        
    
        
        
            
                "output_summary": "Grace Hopper",
            
        
    
        
        
            
                "cost_usd": 2.68,
            
        
    
        
        
            
                "queued_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "completed_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "ocr",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "input_summary": "Alan Turing",
            
        
    
        
        
            
                "output_summary": "Grace Hopper",
            
        
    
        
        
            
                "cost_usd": 2.3,
            
        
    
        
        
            
                "queued_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "completed_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "drafting",
            
        
    
        
        
            
                "status": "running",
            
        
    
        
        
            
                "input_summary": "Marie Curie",
            
        
    
        
        
            
                "output_summary": "Marie Curie",
            
        
    
        
        
            
                "cost_usd": 8.81,
            
        
    
        
        
            
                "queued_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "completed_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "transcription",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "input_summary": "Marie Curie",
            
        
    
        
        
            
                "output_summary": "Alan Turing",
            
        
    
        
        
            
                "cost_usd": 2.98,
            
        
    
        
        
            
                "queued_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "completed_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Marie Curie",
            
        
    
    },
    
];



const LegalTemplatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "template_name": "Alan Turing",
            
        
    
        
        
            
                "template_category": "letter",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "template_body": "Grace Hopper",
            
        
    
        
        
            
                "is_public": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "template_name": "Ada Lovelace",
            
        
    
        
        
            
                "template_category": "other",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "template_body": "Alan Turing",
            
        
    
        
        
            
                "is_public": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "template_name": "Ada Lovelace",
            
        
    
        
        
            
                "template_category": "form",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "template_body": "Grace Hopper",
            
        
    
        
        
            
                "is_public": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "template_name": "Marie Curie",
            
        
    
        
        
            
                "template_category": "memo",
            
        
    
        
        
            
                "jurisdiction": "Marie Curie",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "template_body": "Alan Turing",
            
        
    
        
        
            
                "is_public": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "template_name": "Marie Curie",
            
        
    
        
        
            
                "template_category": "letter",
            
        
    
        
        
            
                "jurisdiction": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "template_body": "Grace Hopper",
            
        
    
        
        
            
                "is_public": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TemplateFieldsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "field_key": "Grace Hopper",
            
        
    
        
        
            
                "label": "Grace Hopper",
            
        
    
        
        
            
                "value_type": "date",
            
        
    
        
        
            
                "is_required": true,
            
        
    
        
        
            
                "default_value": "Alan Turing",
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                "help_text": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "field_key": "Alan Turing",
            
        
    
        
        
            
                "label": "Grace Hopper",
            
        
    
        
        
            
                "value_type": "party",
            
        
    
        
        
            
                "is_required": false,
            
        
    
        
        
            
                "default_value": "Ada Lovelace",
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                "help_text": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "field_key": "Ada Lovelace",
            
        
    
        
        
            
                "label": "Ada Lovelace",
            
        
    
        
        
            
                "value_type": "citation",
            
        
    
        
        
            
                "is_required": true,
            
        
    
        
        
            
                "default_value": "Ada Lovelace",
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                "help_text": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "field_key": "Marie Curie",
            
        
    
        
        
            
                "label": "Grace Hopper",
            
        
    
        
        
            
                "value_type": "date",
            
        
    
        
        
            
                "is_required": true,
            
        
    
        
        
            
                "default_value": "Ada Lovelace",
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                "help_text": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "field_key": "Alan Turing",
            
        
    
        
        
            
                "label": "Marie Curie",
            
        
    
        
        
            
                "value_type": "party",
            
        
    
        
        
            
                "is_required": false,
            
        
    
        
        
            
                "default_value": "Marie Curie",
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                "help_text": "Marie Curie",
            
        
    
    },
    
];



const GeneratedDocumentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_title": "Grace Hopper",
            
        
    
        
        
            
                "document_type": "draft",
            
        
    
        
        
            
                "format": "docx",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "last_edited_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
            
        
    
        
        
            
                "document_title": "Ada Lovelace",
            
        
    
        
        
            
                "document_type": "exported",
            
        
    
        
        
            
                "format": "txt",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "last_edited_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
            
        
    
        
        
            
                "document_title": "Ada Lovelace",
            
        
    
        
        
            
                "document_type": "final",
            
        
    
        
        
            
                "format": "docx",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "last_edited_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
            
        
    
        
        
            
                "document_title": "Grace Hopper",
            
        
    
        
        
            
                "document_type": "exported",
            
        
    
        
        
            
                "format": "pdf",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "last_edited_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
            
        
    
        
        
            
                "document_title": "Grace Hopper",
            
        
    
        
        
            
                "document_type": "draft",
            
        
    
        
        
            
                "format": "canvas",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
    },
    
];



const DocumentVersionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "version_number": 8,
            
        
    
        
        
            
                "change_source": "user_edit",
            
        
    
        
        
            
                "content_snapshot": "Marie Curie",
            
        
    
        
        
            
                "saved_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "version_number": 1,
            
        
    
        
        
            
                "change_source": "ai_regeneration",
            
        
    
        
        
            
                "content_snapshot": "Marie Curie",
            
        
    
        
        
            
                "saved_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "version_number": 1,
            
        
    
        
        
            
                "change_source": "import",
            
        
    
        
        
            
                "content_snapshot": "Grace Hopper",
            
        
    
        
        
            
                "saved_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "version_number": 3,
            
        
    
        
        
            
                "change_source": "ai_regeneration",
            
        
    
        
        
            
                "content_snapshot": "Ada Lovelace",
            
        
    
        
        
            
                "saved_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "version_number": 7,
            
        
    
        
        
            
                "change_source": "import",
            
        
    
        
        
            
                "content_snapshot": "Alan Turing",
            
        
    
        
        
            
                "saved_at": new Date(Date.now()),
            
        
    
    },
    
];



const ResearchQueriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "query_text": "Alan Turing",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "source_scope": "state",
            
        
    
        
        
            
                "searched_at": new Date(Date.now()),
            
        
    
        
        
            
                "filters_json": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "query_text": "Grace Hopper",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "source_scope": "both",
            
        
    
        
        
            
                "searched_at": new Date(Date.now()),
            
        
    
        
        
            
                "filters_json": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "query_text": "Ada Lovelace",
            
        
    
        
        
            
                "jurisdiction": "Alan Turing",
            
        
    
        
        
            
                "source_scope": "both",
            
        
    
        
        
            
                "searched_at": new Date(Date.now()),
            
        
    
        
        
            
                "filters_json": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "query_text": "Marie Curie",
            
        
    
        
        
            
                "jurisdiction": "Alan Turing",
            
        
    
        
        
            
                "source_scope": "federal",
            
        
    
        
        
            
                "searched_at": new Date(Date.now()),
            
        
    
        
        
            
                "filters_json": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "query_text": "Grace Hopper",
            
        
    
        
        
            
                "jurisdiction": "Marie Curie",
            
        
    
        
        
            
                "source_scope": "both",
            
        
    
        
        
            
                "searched_at": new Date(Date.now()),
            
        
    
        
        
            
                "filters_json": "Marie Curie",
            
        
    
    },
    
];



const LegalSourcesData = [
    
    {
    
        
        
            
                "source_type": "rule",
            
        
    
        
        
            
                "jurisdiction": "Ada Lovelace",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "citation": "Ada Lovelace",
            
        
    
        
        
            
                "decision_date": new Date(Date.now()),
            
        
    
        
        
            
                "court": "Marie Curie",
            
        
    
        
        
            
                "full_text": "Ada Lovelace",
            
        
    
        
        
            
                "summary": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Grace Hopper",
            
        
    
        
        
            
                "last_updated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "regulation",
            
        
    
        
        
            
                "jurisdiction": "Marie Curie",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "citation": "Marie Curie",
            
        
    
        
        
            
                "decision_date": new Date(Date.now()),
            
        
    
        
        
            
                "court": "Grace Hopper",
            
        
    
        
        
            
                "full_text": "Grace Hopper",
            
        
    
        
        
            
                "summary": "Alan Turing",
            
        
    
        
        
            
                "source_url": "Marie Curie",
            
        
    
        
        
            
                "last_updated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "regulation",
            
        
    
        
        
            
                "jurisdiction": "Grace Hopper",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "citation": "Ada Lovelace",
            
        
    
        
        
            
                "decision_date": new Date(Date.now()),
            
        
    
        
        
            
                "court": "Marie Curie",
            
        
    
        
        
            
                "full_text": "Marie Curie",
            
        
    
        
        
            
                "summary": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Ada Lovelace",
            
        
    
        
        
            
                "last_updated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "rule",
            
        
    
        
        
            
                "jurisdiction": "Marie Curie",
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "citation": "Grace Hopper",
            
        
    
        
        
            
                "decision_date": new Date(Date.now()),
            
        
    
        
        
            
                "court": "Marie Curie",
            
        
    
        
        
            
                "full_text": "Marie Curie",
            
        
    
        
        
            
                "summary": "Marie Curie",
            
        
    
        
        
            
                "source_url": "Marie Curie",
            
        
    
        
        
            
                "last_updated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "case",
            
        
    
        
        
            
                "jurisdiction": "Alan Turing",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "citation": "Marie Curie",
            
        
    
        
        
            
                "decision_date": new Date(Date.now()),
            
        
    
        
        
            
                "court": "Marie Curie",
            
        
    
        
        
            
                "full_text": "Grace Hopper",
            
        
    
        
        
            
                "summary": "Alan Turing",
            
        
    
        
        
            
                "source_url": "Ada Lovelace",
            
        
    
        
        
            
                "last_updated_at": new Date(Date.now()),
            
        
    
    },
    
];



const ResearchResultsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 6.86,
            
        
    
        
        
            
                "snippet": "Ada Lovelace",
            
        
    
        
        
            
                "rule_statement": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 4.22,
            
        
    
        
        
            
                "snippet": "Ada Lovelace",
            
        
    
        
        
            
                "rule_statement": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 8.99,
            
        
    
        
        
            
                "snippet": "Ada Lovelace",
            
        
    
        
        
            
                "rule_statement": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 0.01,
            
        
    
        
        
            
                "snippet": "Grace Hopper",
            
        
    
        
        
            
                "rule_statement": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 2.14,
            
        
    
        
        
            
                "snippet": "Marie Curie",
            
        
    
        
        
            
                "rule_statement": "Marie Curie",
            
        
    
    },
    
];



const CitatorChecksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "standing": "distinguished",
            
        
    
        
        
            
                "analysis": "Marie Curie",
            
        
    
        
        
            
                "conflicts_summary": "Marie Curie",
            
        
    
        
        
            
                "checked_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
            
        
    
        
        
            
                "standing": "distinguished",
            
        
    
        
        
            
                "analysis": "Ada Lovelace",
            
        
    
        
        
            
                "conflicts_summary": "Marie Curie",
            
        
    
        
        
            
                "checked_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
            
        
    
        
        
            
                "standing": "good_law",
            
        
    
        
        
            
                "analysis": "Grace Hopper",
            
        
    
        
        
            
                "conflicts_summary": "Ada Lovelace",
            
        
    
        
        
            
                "checked_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
            
        
    
        
        
            
                "standing": "good_law",
            
        
    
        
        
            
                "analysis": "Grace Hopper",
            
        
    
        
        
            
                "conflicts_summary": "Marie Curie",
            
        
    
        
        
            
                "checked_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
            
        
    
        
        
            
                "standing": "good_law",
            
        
    
        
        
            
                "analysis": "Grace Hopper",
            
        
    
        
        
            
                "conflicts_summary": "Grace Hopper",
            
        
    
        
        
            
                "checked_at": new Date(Date.now()),
            
        
    
    },
    
];



const MockTrialsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_title": "Ada Lovelace",
            
        
    
        
        
            
                "mode": "realtime",
            
        
    
        
        
            
                "input_type": "text",
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "scheduled_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "scenario_brief": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_title": "Grace Hopper",
            
        
    
        
        
            
                "mode": "realtime",
            
        
    
        
        
            
                "input_type": "text",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "scheduled_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "scenario_brief": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_title": "Grace Hopper",
            
        
    
        
        
            
                "mode": "realtime",
            
        
    
        
        
            
                "input_type": "voice",
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "scheduled_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "scenario_brief": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_title": "Ada Lovelace",
            
        
    
        
        
            
                "mode": "scripted",
            
        
    
        
        
            
                "input_type": "mixed",
            
        
    
        
        
            
                "status": "scheduled",
            
        
    
        
        
            
                "scheduled_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "scenario_brief": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_title": "Ada Lovelace",
            
        
    
        
        
            
                "mode": "scripted",
            
        
    
        
        
            
                "input_type": "text",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "scheduled_at": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "scenario_brief": "Grace Hopper",
            
        
    
    },
    
];



const MockTrialRolesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role_name": "judge",
            
        
    
        
        
            
                "actor_type": "user",
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "instructions": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role_name": "opposing_counsel",
            
        
    
        
        
            
                "actor_type": "user",
            
        
    
        
        
            
                "display_name": "Alan Turing",
            
        
    
        
        
            
                "instructions": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role_name": "witness",
            
        
    
        
        
            
                "actor_type": "user",
            
        
    
        
        
            
                "display_name": "Ada Lovelace",
            
        
    
        
        
            
                "instructions": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role_name": "clerk",
            
        
    
        
        
            
                "actor_type": "ai",
            
        
    
        
        
            
                "display_name": "Marie Curie",
            
        
    
        
        
            
                "instructions": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role_name": "opposing_counsel",
            
        
    
        
        
            
                "actor_type": "ai",
            
        
    
        
        
            
                "display_name": "Grace Hopper",
            
        
    
        
        
            
                "instructions": "Grace Hopper",
            
        
    
    },
    
];



const MockTrialTurnsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "turn_type": "sidebar",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "spoken_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "turn_type": "sidebar",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "spoken_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "turn_type": "closing",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "spoken_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "turn_type": "ruling",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "spoken_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "turn_type": "cross_exam",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "spoken_at": new Date(Date.now()),
            
        
    
    },
    
];



const TranscriptionJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "running",
            
        
    
        
        
            
                "source_language": "Alan Turing",
            
        
    
        
        
            
                "target_language": "Alan Turing",
            
        
    
        
        
            
                "speaker_diarization": false,
            
        
    
        
        
            
                "confidence_avg": 4.46,
            
        
    
        
        
            
                "transcript_text": "Alan Turing",
            
        
    
        
        
            
                "summary_text": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "source_language": "Ada Lovelace",
            
        
    
        
        
            
                "target_language": "Ada Lovelace",
            
        
    
        
        
            
                "speaker_diarization": false,
            
        
    
        
        
            
                "confidence_avg": 3.39,
            
        
    
        
        
            
                "transcript_text": "Marie Curie",
            
        
    
        
        
            
                "summary_text": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "source_language": "Alan Turing",
            
        
    
        
        
            
                "target_language": "Ada Lovelace",
            
        
    
        
        
            
                "speaker_diarization": false,
            
        
    
        
        
            
                "confidence_avg": 4.21,
            
        
    
        
        
            
                "transcript_text": "Marie Curie",
            
        
    
        
        
            
                "summary_text": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "source_language": "Ada Lovelace",
            
        
    
        
        
            
                "target_language": "Ada Lovelace",
            
        
    
        
        
            
                "speaker_diarization": true,
            
        
    
        
        
            
                "confidence_avg": 8.92,
            
        
    
        
        
            
                "transcript_text": "Marie Curie",
            
        
    
        
        
            
                "summary_text": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "source_language": "Ada Lovelace",
            
        
    
        
        
            
                "target_language": "Grace Hopper",
            
        
    
        
        
            
                "speaker_diarization": true,
            
        
    
        
        
            
                "confidence_avg": 8.44,
            
        
    
        
        
            
                "transcript_text": "Grace Hopper",
            
        
    
        
        
            
                "summary_text": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
    },
    
];



const MedicalChronologyReportsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_title": "Grace Hopper",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "overview": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_title": "Grace Hopper",
            
        
    
        
        
            
                "status": "generated",
            
        
    
        
        
            
                "overview": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_title": "Marie Curie",
            
        
    
        
        
            
                "status": "exported",
            
        
    
        
        
            
                "overview": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_title": "Ada Lovelace",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "overview": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_title": "Ada Lovelace",
            
        
    
        
        
            
                "status": "generated",
            
        
    
        
        
            
                "overview": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
];



const MedicalEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "provider_name": "Marie Curie",
            
        
    
        
        
            
                "facility_name": "Ada Lovelace",
            
        
    
        
        
            
                "diagnoses": "Ada Lovelace",
            
        
    
        
        
            
                "icd10_codes": "Ada Lovelace",
            
        
    
        
        
            
                "procedures": "Marie Curie",
            
        
    
        
        
            
                "medications": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "provider_name": "Marie Curie",
            
        
    
        
        
            
                "facility_name": "Marie Curie",
            
        
    
        
        
            
                "diagnoses": "Ada Lovelace",
            
        
    
        
        
            
                "icd10_codes": "Marie Curie",
            
        
    
        
        
            
                "procedures": "Grace Hopper",
            
        
    
        
        
            
                "medications": "Alan Turing",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "provider_name": "Marie Curie",
            
        
    
        
        
            
                "facility_name": "Grace Hopper",
            
        
    
        
        
            
                "diagnoses": "Grace Hopper",
            
        
    
        
        
            
                "icd10_codes": "Alan Turing",
            
        
    
        
        
            
                "procedures": "Marie Curie",
            
        
    
        
        
            
                "medications": "Grace Hopper",
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "provider_name": "Marie Curie",
            
        
    
        
        
            
                "facility_name": "Alan Turing",
            
        
    
        
        
            
                "diagnoses": "Alan Turing",
            
        
    
        
        
            
                "icd10_codes": "Grace Hopper",
            
        
    
        
        
            
                "procedures": "Ada Lovelace",
            
        
    
        
        
            
                "medications": "Marie Curie",
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                "provider_name": "Alan Turing",
            
        
    
        
        
            
                "facility_name": "Grace Hopper",
            
        
    
        
        
            
                "diagnoses": "Ada Lovelace",
            
        
    
        
        
            
                "icd10_codes": "Grace Hopper",
            
        
    
        
        
            
                "procedures": "Ada Lovelace",
            
        
    
        
        
            
                "medications": "Marie Curie",
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CausationAnalysesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "analysis_title": "Grace Hopper",
            
        
    
        
        
            
                "status": "exported",
            
        
    
        
        
            
                "theory_of_causation": "Grace Hopper",
            
        
    
        
        
            
                "supporting_facts": "Ada Lovelace",
            
        
    
        
        
            
                "weaknesses_and_gaps": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "analysis_title": "Ada Lovelace",
            
        
    
        
        
            
                "status": "exported",
            
        
    
        
        
            
                "theory_of_causation": "Ada Lovelace",
            
        
    
        
        
            
                "supporting_facts": "Grace Hopper",
            
        
    
        
        
            
                "weaknesses_and_gaps": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "analysis_title": "Marie Curie",
            
        
    
        
        
            
                "status": "exported",
            
        
    
        
        
            
                "theory_of_causation": "Alan Turing",
            
        
    
        
        
            
                "supporting_facts": "Alan Turing",
            
        
    
        
        
            
                "weaknesses_and_gaps": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "analysis_title": "Alan Turing",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "theory_of_causation": "Grace Hopper",
            
        
    
        
        
            
                "supporting_facts": "Alan Turing",
            
        
    
        
        
            
                "weaknesses_and_gaps": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "analysis_title": "Marie Curie",
            
        
    
        
        
            
                "status": "exported",
            
        
    
        
        
            
                "theory_of_causation": "Marie Curie",
            
        
    
        
        
            
                "supporting_facts": "Alan Turing",
            
        
    
        
        
            
                "weaknesses_and_gaps": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
    },
    
];



const AuditEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_name": "Alan Turing",
            
        
    
        
        
            
                "event_category": "template",
            
        
    
        
        
            
                "event_details": "Alan Turing",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "ip_address": "Alan Turing",
            
        
    
        
        
            
                "user_agent": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_name": "Ada Lovelace",
            
        
    
        
        
            
                "event_category": "auth",
            
        
    
        
        
            
                "event_details": "Grace Hopper",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "ip_address": "Grace Hopper",
            
        
    
        
        
            
                "user_agent": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_name": "Alan Turing",
            
        
    
        
        
            
                "event_category": "medical",
            
        
    
        
        
            
                "event_details": "Marie Curie",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "ip_address": "Alan Turing",
            
        
    
        
        
            
                "user_agent": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_name": "Grace Hopper",
            
        
    
        
        
            
                "event_category": "file",
            
        
    
        
        
            
                "event_details": "Grace Hopper",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "ip_address": "Ada Lovelace",
            
        
    
        
        
            
                "user_agent": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_name": "Ada Lovelace",
            
        
    
        
        
            
                "event_category": "file",
            
        
    
        
        
            
                "event_details": "Ada Lovelace",
            
        
    
        
        
            
                "occurred_at": new Date(Date.now()),
            
        
    
        
        
            
                "ip_address": "Grace Hopper",
            
        
    
        
        
            
                "user_agent": "Alan Turing",
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
    
    
        
            
            async function associateSubscriptionWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Subscription0 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Subscription0?.setUser)
                {
                    await
                    Subscription0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Subscription1 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Subscription1?.setUser)
                {
                    await
                    Subscription1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Subscription2 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Subscription2?.setUser)
                {
                    await
                    Subscription2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Subscription3 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Subscription3?.setUser)
                {
                    await
                    Subscription3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Subscription4 = await Subscriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Subscription4?.setUser)
                {
                    await
                    Subscription4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMatterWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Matter0 = await Matters.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Matter0?.setOwner)
                {
                    await
                    Matter0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Matter1 = await Matters.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Matter1?.setOwner)
                {
                    await
                    Matter1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Matter2 = await Matters.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Matter2?.setOwner)
                {
                    await
                    Matter2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Matter3 = await Matters.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Matter3?.setOwner)
                {
                    await
                    Matter3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Matter4 = await Matters.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Matter4?.setOwner)
                {
                    await
                    Matter4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMatterPartyWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MatterParty0 = await MatterParties.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MatterParty0?.setMatter)
                {
                    await
                    MatterParty0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MatterParty1 = await MatterParties.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MatterParty1?.setMatter)
                {
                    await
                    MatterParty1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MatterParty2 = await MatterParties.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MatterParty2?.setMatter)
                {
                    await
                    MatterParty2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MatterParty3 = await MatterParties.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MatterParty3?.setMatter)
                {
                    await
                    MatterParty3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MatterParty4 = await MatterParties.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MatterParty4?.setMatter)
                {
                    await
                    MatterParty4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateFileWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const File0 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (File0?.setOwner)
                {
                    await
                    File0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const File1 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (File1?.setOwner)
                {
                    await
                    File1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const File2 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (File2?.setOwner)
                {
                    await
                    File2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const File3 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (File3?.setOwner)
                {
                    await
                    File3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const File4 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (File4?.setOwner)
                {
                    await
                    File4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
            
            async function associateFileWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const File0 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (File0?.setMatter)
                {
                    await
                    File0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const File1 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (File1?.setMatter)
                {
                    await
                    File1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const File2 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (File2?.setMatter)
                {
                    await
                    File2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const File3 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (File3?.setMatter)
                {
                    await
                    File3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const File4 = await Files.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (File4?.setMatter)
                {
                    await
                    File4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateFileExtractionWithFile() {
            
                const relatedFile0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const FileExtraction0 = await FileExtractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FileExtraction0?.setFile)
                {
                    await
                    FileExtraction0.
                    setFile(relatedFile0);
                }
            
                const relatedFile1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const FileExtraction1 = await FileExtractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FileExtraction1?.setFile)
                {
                    await
                    FileExtraction1.
                    setFile(relatedFile1);
                }
            
                const relatedFile2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const FileExtraction2 = await FileExtractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FileExtraction2?.setFile)
                {
                    await
                    FileExtraction2.
                    setFile(relatedFile2);
                }
            
                const relatedFile3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const FileExtraction3 = await FileExtractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FileExtraction3?.setFile)
                {
                    await
                    FileExtraction3.
                    setFile(relatedFile3);
                }
            
                const relatedFile4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const FileExtraction4 = await FileExtractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FileExtraction4?.setFile)
                {
                    await
                    FileExtraction4.
                    setFile(relatedFile4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAssistantThreadWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AssistantThread0 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AssistantThread0?.setOwner)
                {
                    await
                    AssistantThread0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AssistantThread1 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AssistantThread1?.setOwner)
                {
                    await
                    AssistantThread1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AssistantThread2 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AssistantThread2?.setOwner)
                {
                    await
                    AssistantThread2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AssistantThread3 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AssistantThread3?.setOwner)
                {
                    await
                    AssistantThread3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AssistantThread4 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AssistantThread4?.setOwner)
                {
                    await
                    AssistantThread4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
            
            async function associateAssistantThreadWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AssistantThread0 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AssistantThread0?.setMatter)
                {
                    await
                    AssistantThread0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AssistantThread1 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AssistantThread1?.setMatter)
                {
                    await
                    AssistantThread1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AssistantThread2 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AssistantThread2?.setMatter)
                {
                    await
                    AssistantThread2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AssistantThread3 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AssistantThread3?.setMatter)
                {
                    await
                    AssistantThread3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AssistantThread4 = await AssistantThreads.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AssistantThread4?.setMatter)
                {
                    await
                    AssistantThread4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAssistantMessageWithThread() {
            
                const relatedThread0 = await AssistantThreads.findOne({
                    offset: Math.floor(Math.random() * (await AssistantThreads.count())),
                });
                const AssistantMessage0 = await AssistantMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AssistantMessage0?.setThread)
                {
                    await
                    AssistantMessage0.
                    setThread(relatedThread0);
                }
            
                const relatedThread1 = await AssistantThreads.findOne({
                    offset: Math.floor(Math.random() * (await AssistantThreads.count())),
                });
                const AssistantMessage1 = await AssistantMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AssistantMessage1?.setThread)
                {
                    await
                    AssistantMessage1.
                    setThread(relatedThread1);
                }
            
                const relatedThread2 = await AssistantThreads.findOne({
                    offset: Math.floor(Math.random() * (await AssistantThreads.count())),
                });
                const AssistantMessage2 = await AssistantMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AssistantMessage2?.setThread)
                {
                    await
                    AssistantMessage2.
                    setThread(relatedThread2);
                }
            
                const relatedThread3 = await AssistantThreads.findOne({
                    offset: Math.floor(Math.random() * (await AssistantThreads.count())),
                });
                const AssistantMessage3 = await AssistantMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AssistantMessage3?.setThread)
                {
                    await
                    AssistantMessage3.
                    setThread(relatedThread3);
                }
            
                const relatedThread4 = await AssistantThreads.findOne({
                    offset: Math.floor(Math.random() * (await AssistantThreads.count())),
                });
                const AssistantMessage4 = await AssistantMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AssistantMessage4?.setThread)
                {
                    await
                    AssistantMessage4.
                    setThread(relatedThread4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAiJobWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setRequested_by)
                {
                    await
                    AiJob0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setRequested_by)
                {
                    await
                    AiJob1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setRequested_by)
                {
                    await
                    AiJob2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setRequested_by)
                {
                    await
                    AiJob3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setRequested_by)
                {
                    await
                    AiJob4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateAiJobWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setMatter)
                {
                    await
                    AiJob0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setMatter)
                {
                    await
                    AiJob1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setMatter)
                {
                    await
                    AiJob2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setMatter)
                {
                    await
                    AiJob3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setMatter)
                {
                    await
                    AiJob4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
            
            async function associateAiJobWithFile() {
            
                const relatedFile0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setFile)
                {
                    await
                    AiJob0.
                    setFile(relatedFile0);
                }
            
                const relatedFile1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setFile)
                {
                    await
                    AiJob1.
                    setFile(relatedFile1);
                }
            
                const relatedFile2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setFile)
                {
                    await
                    AiJob2.
                    setFile(relatedFile2);
                }
            
                const relatedFile3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setFile)
                {
                    await
                    AiJob3.
                    setFile(relatedFile3);
                }
            
                const relatedFile4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setFile)
                {
                    await
                    AiJob4.
                    setFile(relatedFile4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateLegalTemplateWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LegalTemplate0 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LegalTemplate0?.setOwner)
                {
                    await
                    LegalTemplate0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LegalTemplate1 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LegalTemplate1?.setOwner)
                {
                    await
                    LegalTemplate1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LegalTemplate2 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LegalTemplate2?.setOwner)
                {
                    await
                    LegalTemplate2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LegalTemplate3 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LegalTemplate3?.setOwner)
                {
                    await
                    LegalTemplate3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const LegalTemplate4 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (LegalTemplate4?.setOwner)
                {
                    await
                    LegalTemplate4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateLegalTemplateWithSource_file() {
            
                const relatedSource_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const LegalTemplate0 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LegalTemplate0?.setSource_file)
                {
                    await
                    LegalTemplate0.
                    setSource_file(relatedSource_file0);
                }
            
                const relatedSource_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const LegalTemplate1 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LegalTemplate1?.setSource_file)
                {
                    await
                    LegalTemplate1.
                    setSource_file(relatedSource_file1);
                }
            
                const relatedSource_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const LegalTemplate2 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LegalTemplate2?.setSource_file)
                {
                    await
                    LegalTemplate2.
                    setSource_file(relatedSource_file2);
                }
            
                const relatedSource_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const LegalTemplate3 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (LegalTemplate3?.setSource_file)
                {
                    await
                    LegalTemplate3.
                    setSource_file(relatedSource_file3);
                }
            
                const relatedSource_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const LegalTemplate4 = await LegalTemplates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (LegalTemplate4?.setSource_file)
                {
                    await
                    LegalTemplate4.
                    setSource_file(relatedSource_file4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTemplateFieldWithTemplate() {
            
                const relatedTemplate0 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const TemplateField0 = await TemplateFields.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TemplateField0?.setTemplate)
                {
                    await
                    TemplateField0.
                    setTemplate(relatedTemplate0);
                }
            
                const relatedTemplate1 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const TemplateField1 = await TemplateFields.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TemplateField1?.setTemplate)
                {
                    await
                    TemplateField1.
                    setTemplate(relatedTemplate1);
                }
            
                const relatedTemplate2 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const TemplateField2 = await TemplateFields.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TemplateField2?.setTemplate)
                {
                    await
                    TemplateField2.
                    setTemplate(relatedTemplate2);
                }
            
                const relatedTemplate3 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const TemplateField3 = await TemplateFields.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TemplateField3?.setTemplate)
                {
                    await
                    TemplateField3.
                    setTemplate(relatedTemplate3);
                }
            
                const relatedTemplate4 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const TemplateField4 = await TemplateFields.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TemplateField4?.setTemplate)
                {
                    await
                    TemplateField4.
                    setTemplate(relatedTemplate4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateGeneratedDocumentWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GeneratedDocument0 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GeneratedDocument0?.setOwner)
                {
                    await
                    GeneratedDocument0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GeneratedDocument1 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GeneratedDocument1?.setOwner)
                {
                    await
                    GeneratedDocument1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GeneratedDocument2 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GeneratedDocument2?.setOwner)
                {
                    await
                    GeneratedDocument2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GeneratedDocument3 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GeneratedDocument3?.setOwner)
                {
                    await
                    GeneratedDocument3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GeneratedDocument4 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (GeneratedDocument4?.setOwner)
                {
                    await
                    GeneratedDocument4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
            
            async function associateGeneratedDocumentWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const GeneratedDocument0 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GeneratedDocument0?.setMatter)
                {
                    await
                    GeneratedDocument0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const GeneratedDocument1 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GeneratedDocument1?.setMatter)
                {
                    await
                    GeneratedDocument1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const GeneratedDocument2 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GeneratedDocument2?.setMatter)
                {
                    await
                    GeneratedDocument2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const GeneratedDocument3 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GeneratedDocument3?.setMatter)
                {
                    await
                    GeneratedDocument3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const GeneratedDocument4 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (GeneratedDocument4?.setMatter)
                {
                    await
                    GeneratedDocument4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
            
            async function associateGeneratedDocumentWithTemplate() {
            
                const relatedTemplate0 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const GeneratedDocument0 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GeneratedDocument0?.setTemplate)
                {
                    await
                    GeneratedDocument0.
                    setTemplate(relatedTemplate0);
                }
            
                const relatedTemplate1 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const GeneratedDocument1 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GeneratedDocument1?.setTemplate)
                {
                    await
                    GeneratedDocument1.
                    setTemplate(relatedTemplate1);
                }
            
                const relatedTemplate2 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const GeneratedDocument2 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GeneratedDocument2?.setTemplate)
                {
                    await
                    GeneratedDocument2.
                    setTemplate(relatedTemplate2);
                }
            
                const relatedTemplate3 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const GeneratedDocument3 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GeneratedDocument3?.setTemplate)
                {
                    await
                    GeneratedDocument3.
                    setTemplate(relatedTemplate3);
                }
            
                const relatedTemplate4 = await LegalTemplates.findOne({
                    offset: Math.floor(Math.random() * (await LegalTemplates.count())),
                });
                const GeneratedDocument4 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (GeneratedDocument4?.setTemplate)
                {
                    await
                    GeneratedDocument4.
                    setTemplate(relatedTemplate4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateGeneratedDocumentWithExport_file() {
            
                const relatedExport_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const GeneratedDocument0 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GeneratedDocument0?.setExport_file)
                {
                    await
                    GeneratedDocument0.
                    setExport_file(relatedExport_file0);
                }
            
                const relatedExport_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const GeneratedDocument1 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GeneratedDocument1?.setExport_file)
                {
                    await
                    GeneratedDocument1.
                    setExport_file(relatedExport_file1);
                }
            
                const relatedExport_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const GeneratedDocument2 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GeneratedDocument2?.setExport_file)
                {
                    await
                    GeneratedDocument2.
                    setExport_file(relatedExport_file2);
                }
            
                const relatedExport_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const GeneratedDocument3 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (GeneratedDocument3?.setExport_file)
                {
                    await
                    GeneratedDocument3.
                    setExport_file(relatedExport_file3);
                }
            
                const relatedExport_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const GeneratedDocument4 = await GeneratedDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (GeneratedDocument4?.setExport_file)
                {
                    await
                    GeneratedDocument4.
                    setExport_file(relatedExport_file4);
                }
            
        }
        
    
        
    

    
    
    
        
            
            async function associateDocumentVersionWithDocument() {
            
                const relatedDocument0 = await GeneratedDocuments.findOne({
                    offset: Math.floor(Math.random() * (await GeneratedDocuments.count())),
                });
                const DocumentVersion0 = await DocumentVersions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DocumentVersion0?.setDocument)
                {
                    await
                    DocumentVersion0.
                    setDocument(relatedDocument0);
                }
            
                const relatedDocument1 = await GeneratedDocuments.findOne({
                    offset: Math.floor(Math.random() * (await GeneratedDocuments.count())),
                });
                const DocumentVersion1 = await DocumentVersions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DocumentVersion1?.setDocument)
                {
                    await
                    DocumentVersion1.
                    setDocument(relatedDocument1);
                }
            
                const relatedDocument2 = await GeneratedDocuments.findOne({
                    offset: Math.floor(Math.random() * (await GeneratedDocuments.count())),
                });
                const DocumentVersion2 = await DocumentVersions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DocumentVersion2?.setDocument)
                {
                    await
                    DocumentVersion2.
                    setDocument(relatedDocument2);
                }
            
                const relatedDocument3 = await GeneratedDocuments.findOne({
                    offset: Math.floor(Math.random() * (await GeneratedDocuments.count())),
                });
                const DocumentVersion3 = await DocumentVersions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DocumentVersion3?.setDocument)
                {
                    await
                    DocumentVersion3.
                    setDocument(relatedDocument3);
                }
            
                const relatedDocument4 = await GeneratedDocuments.findOne({
                    offset: Math.floor(Math.random() * (await GeneratedDocuments.count())),
                });
                const DocumentVersion4 = await DocumentVersions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DocumentVersion4?.setDocument)
                {
                    await
                    DocumentVersion4.
                    setDocument(relatedDocument4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateResearchQueryWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ResearchQuery0 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResearchQuery0?.setRequested_by)
                {
                    await
                    ResearchQuery0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ResearchQuery1 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResearchQuery1?.setRequested_by)
                {
                    await
                    ResearchQuery1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ResearchQuery2 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResearchQuery2?.setRequested_by)
                {
                    await
                    ResearchQuery2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ResearchQuery3 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ResearchQuery3?.setRequested_by)
                {
                    await
                    ResearchQuery3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ResearchQuery4 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ResearchQuery4?.setRequested_by)
                {
                    await
                    ResearchQuery4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateResearchQueryWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const ResearchQuery0 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResearchQuery0?.setMatter)
                {
                    await
                    ResearchQuery0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const ResearchQuery1 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResearchQuery1?.setMatter)
                {
                    await
                    ResearchQuery1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const ResearchQuery2 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResearchQuery2?.setMatter)
                {
                    await
                    ResearchQuery2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const ResearchQuery3 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ResearchQuery3?.setMatter)
                {
                    await
                    ResearchQuery3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const ResearchQuery4 = await ResearchQueries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ResearchQuery4?.setMatter)
                {
                    await
                    ResearchQuery4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateResearchResultWithResearch_query() {
            
                const relatedResearch_query0 = await ResearchQueries.findOne({
                    offset: Math.floor(Math.random() * (await ResearchQueries.count())),
                });
                const ResearchResult0 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResearchResult0?.setResearch_query)
                {
                    await
                    ResearchResult0.
                    setResearch_query(relatedResearch_query0);
                }
            
                const relatedResearch_query1 = await ResearchQueries.findOne({
                    offset: Math.floor(Math.random() * (await ResearchQueries.count())),
                });
                const ResearchResult1 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResearchResult1?.setResearch_query)
                {
                    await
                    ResearchResult1.
                    setResearch_query(relatedResearch_query1);
                }
            
                const relatedResearch_query2 = await ResearchQueries.findOne({
                    offset: Math.floor(Math.random() * (await ResearchQueries.count())),
                });
                const ResearchResult2 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResearchResult2?.setResearch_query)
                {
                    await
                    ResearchResult2.
                    setResearch_query(relatedResearch_query2);
                }
            
                const relatedResearch_query3 = await ResearchQueries.findOne({
                    offset: Math.floor(Math.random() * (await ResearchQueries.count())),
                });
                const ResearchResult3 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ResearchResult3?.setResearch_query)
                {
                    await
                    ResearchResult3.
                    setResearch_query(relatedResearch_query3);
                }
            
                const relatedResearch_query4 = await ResearchQueries.findOne({
                    offset: Math.floor(Math.random() * (await ResearchQueries.count())),
                });
                const ResearchResult4 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ResearchResult4?.setResearch_query)
                {
                    await
                    ResearchResult4.
                    setResearch_query(relatedResearch_query4);
                }
            
        }
        
    
        
            
            async function associateResearchResultWithLegal_source() {
            
                const relatedLegal_source0 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const ResearchResult0 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ResearchResult0?.setLegal_source)
                {
                    await
                    ResearchResult0.
                    setLegal_source(relatedLegal_source0);
                }
            
                const relatedLegal_source1 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const ResearchResult1 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ResearchResult1?.setLegal_source)
                {
                    await
                    ResearchResult1.
                    setLegal_source(relatedLegal_source1);
                }
            
                const relatedLegal_source2 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const ResearchResult2 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ResearchResult2?.setLegal_source)
                {
                    await
                    ResearchResult2.
                    setLegal_source(relatedLegal_source2);
                }
            
                const relatedLegal_source3 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const ResearchResult3 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ResearchResult3?.setLegal_source)
                {
                    await
                    ResearchResult3.
                    setLegal_source(relatedLegal_source3);
                }
            
                const relatedLegal_source4 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const ResearchResult4 = await ResearchResults.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ResearchResult4?.setLegal_source)
                {
                    await
                    ResearchResult4.
                    setLegal_source(relatedLegal_source4);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateCitatorCheckWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CitatorCheck0 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CitatorCheck0?.setRequested_by)
                {
                    await
                    CitatorCheck0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CitatorCheck1 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CitatorCheck1?.setRequested_by)
                {
                    await
                    CitatorCheck1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CitatorCheck2 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CitatorCheck2?.setRequested_by)
                {
                    await
                    CitatorCheck2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CitatorCheck3 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CitatorCheck3?.setRequested_by)
                {
                    await
                    CitatorCheck3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CitatorCheck4 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CitatorCheck4?.setRequested_by)
                {
                    await
                    CitatorCheck4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateCitatorCheckWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CitatorCheck0 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CitatorCheck0?.setMatter)
                {
                    await
                    CitatorCheck0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CitatorCheck1 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CitatorCheck1?.setMatter)
                {
                    await
                    CitatorCheck1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CitatorCheck2 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CitatorCheck2?.setMatter)
                {
                    await
                    CitatorCheck2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CitatorCheck3 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CitatorCheck3?.setMatter)
                {
                    await
                    CitatorCheck3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CitatorCheck4 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CitatorCheck4?.setMatter)
                {
                    await
                    CitatorCheck4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
            
            async function associateCitatorCheckWithLegal_source() {
            
                const relatedLegal_source0 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const CitatorCheck0 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CitatorCheck0?.setLegal_source)
                {
                    await
                    CitatorCheck0.
                    setLegal_source(relatedLegal_source0);
                }
            
                const relatedLegal_source1 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const CitatorCheck1 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CitatorCheck1?.setLegal_source)
                {
                    await
                    CitatorCheck1.
                    setLegal_source(relatedLegal_source1);
                }
            
                const relatedLegal_source2 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const CitatorCheck2 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CitatorCheck2?.setLegal_source)
                {
                    await
                    CitatorCheck2.
                    setLegal_source(relatedLegal_source2);
                }
            
                const relatedLegal_source3 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const CitatorCheck3 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CitatorCheck3?.setLegal_source)
                {
                    await
                    CitatorCheck3.
                    setLegal_source(relatedLegal_source3);
                }
            
                const relatedLegal_source4 = await LegalSources.findOne({
                    offset: Math.floor(Math.random() * (await LegalSources.count())),
                });
                const CitatorCheck4 = await CitatorChecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CitatorCheck4?.setLegal_source)
                {
                    await
                    CitatorCheck4.
                    setLegal_source(relatedLegal_source4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMockTrialWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MockTrial0 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrial0?.setOwner)
                {
                    await
                    MockTrial0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MockTrial1 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrial1?.setOwner)
                {
                    await
                    MockTrial1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MockTrial2 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrial2?.setOwner)
                {
                    await
                    MockTrial2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MockTrial3 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrial3?.setOwner)
                {
                    await
                    MockTrial3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MockTrial4 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrial4?.setOwner)
                {
                    await
                    MockTrial4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
            
            async function associateMockTrialWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MockTrial0 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrial0?.setMatter)
                {
                    await
                    MockTrial0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MockTrial1 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrial1?.setMatter)
                {
                    await
                    MockTrial1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MockTrial2 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrial2?.setMatter)
                {
                    await
                    MockTrial2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MockTrial3 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrial3?.setMatter)
                {
                    await
                    MockTrial3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MockTrial4 = await MockTrials.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrial4?.setMatter)
                {
                    await
                    MockTrial4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMockTrialRoleWithMock_trial() {
            
                const relatedMock_trial0 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialRole0 = await MockTrialRoles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrialRole0?.setMock_trial)
                {
                    await
                    MockTrialRole0.
                    setMock_trial(relatedMock_trial0);
                }
            
                const relatedMock_trial1 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialRole1 = await MockTrialRoles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrialRole1?.setMock_trial)
                {
                    await
                    MockTrialRole1.
                    setMock_trial(relatedMock_trial1);
                }
            
                const relatedMock_trial2 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialRole2 = await MockTrialRoles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrialRole2?.setMock_trial)
                {
                    await
                    MockTrialRole2.
                    setMock_trial(relatedMock_trial2);
                }
            
                const relatedMock_trial3 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialRole3 = await MockTrialRoles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrialRole3?.setMock_trial)
                {
                    await
                    MockTrialRole3.
                    setMock_trial(relatedMock_trial3);
                }
            
                const relatedMock_trial4 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialRole4 = await MockTrialRoles.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrialRole4?.setMock_trial)
                {
                    await
                    MockTrialRole4.
                    setMock_trial(relatedMock_trial4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMockTrialTurnWithMock_trial() {
            
                const relatedMock_trial0 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialTurn0 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrialTurn0?.setMock_trial)
                {
                    await
                    MockTrialTurn0.
                    setMock_trial(relatedMock_trial0);
                }
            
                const relatedMock_trial1 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialTurn1 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrialTurn1?.setMock_trial)
                {
                    await
                    MockTrialTurn1.
                    setMock_trial(relatedMock_trial1);
                }
            
                const relatedMock_trial2 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialTurn2 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrialTurn2?.setMock_trial)
                {
                    await
                    MockTrialTurn2.
                    setMock_trial(relatedMock_trial2);
                }
            
                const relatedMock_trial3 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialTurn3 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrialTurn3?.setMock_trial)
                {
                    await
                    MockTrialTurn3.
                    setMock_trial(relatedMock_trial3);
                }
            
                const relatedMock_trial4 = await MockTrials.findOne({
                    offset: Math.floor(Math.random() * (await MockTrials.count())),
                });
                const MockTrialTurn4 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrialTurn4?.setMock_trial)
                {
                    await
                    MockTrialTurn4.
                    setMock_trial(relatedMock_trial4);
                }
            
        }
        
    
        
            
            async function associateMockTrialTurnWithRole() {
            
                const relatedRole0 = await MockTrialRoles.findOne({
                    offset: Math.floor(Math.random() * (await MockTrialRoles.count())),
                });
                const MockTrialTurn0 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrialTurn0?.setRole)
                {
                    await
                    MockTrialTurn0.
                    setRole(relatedRole0);
                }
            
                const relatedRole1 = await MockTrialRoles.findOne({
                    offset: Math.floor(Math.random() * (await MockTrialRoles.count())),
                });
                const MockTrialTurn1 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrialTurn1?.setRole)
                {
                    await
                    MockTrialTurn1.
                    setRole(relatedRole1);
                }
            
                const relatedRole2 = await MockTrialRoles.findOne({
                    offset: Math.floor(Math.random() * (await MockTrialRoles.count())),
                });
                const MockTrialTurn2 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrialTurn2?.setRole)
                {
                    await
                    MockTrialTurn2.
                    setRole(relatedRole2);
                }
            
                const relatedRole3 = await MockTrialRoles.findOne({
                    offset: Math.floor(Math.random() * (await MockTrialRoles.count())),
                });
                const MockTrialTurn3 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrialTurn3?.setRole)
                {
                    await
                    MockTrialTurn3.
                    setRole(relatedRole3);
                }
            
                const relatedRole4 = await MockTrialRoles.findOne({
                    offset: Math.floor(Math.random() * (await MockTrialRoles.count())),
                });
                const MockTrialTurn4 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrialTurn4?.setRole)
                {
                    await
                    MockTrialTurn4.
                    setRole(relatedRole4);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateMockTrialTurnWithAudio_file() {
            
                const relatedAudio_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MockTrialTurn0 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MockTrialTurn0?.setAudio_file)
                {
                    await
                    MockTrialTurn0.
                    setAudio_file(relatedAudio_file0);
                }
            
                const relatedAudio_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MockTrialTurn1 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MockTrialTurn1?.setAudio_file)
                {
                    await
                    MockTrialTurn1.
                    setAudio_file(relatedAudio_file1);
                }
            
                const relatedAudio_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MockTrialTurn2 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MockTrialTurn2?.setAudio_file)
                {
                    await
                    MockTrialTurn2.
                    setAudio_file(relatedAudio_file2);
                }
            
                const relatedAudio_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MockTrialTurn3 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MockTrialTurn3?.setAudio_file)
                {
                    await
                    MockTrialTurn3.
                    setAudio_file(relatedAudio_file3);
                }
            
                const relatedAudio_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MockTrialTurn4 = await MockTrialTurns.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MockTrialTurn4?.setAudio_file)
                {
                    await
                    MockTrialTurn4.
                    setAudio_file(relatedAudio_file4);
                }
            
        }
        
    
        
    

    
    
    
        
            
            async function associateTranscriptionJobWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TranscriptionJob0 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TranscriptionJob0?.setRequested_by)
                {
                    await
                    TranscriptionJob0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TranscriptionJob1 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TranscriptionJob1?.setRequested_by)
                {
                    await
                    TranscriptionJob1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TranscriptionJob2 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TranscriptionJob2?.setRequested_by)
                {
                    await
                    TranscriptionJob2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TranscriptionJob3 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TranscriptionJob3?.setRequested_by)
                {
                    await
                    TranscriptionJob3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TranscriptionJob4 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TranscriptionJob4?.setRequested_by)
                {
                    await
                    TranscriptionJob4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateTranscriptionJobWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const TranscriptionJob0 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TranscriptionJob0?.setMatter)
                {
                    await
                    TranscriptionJob0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const TranscriptionJob1 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TranscriptionJob1?.setMatter)
                {
                    await
                    TranscriptionJob1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const TranscriptionJob2 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TranscriptionJob2?.setMatter)
                {
                    await
                    TranscriptionJob2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const TranscriptionJob3 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TranscriptionJob3?.setMatter)
                {
                    await
                    TranscriptionJob3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const TranscriptionJob4 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TranscriptionJob4?.setMatter)
                {
                    await
                    TranscriptionJob4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
            
            async function associateTranscriptionJobWithMedia_file() {
            
                const relatedMedia_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob0 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TranscriptionJob0?.setMedia_file)
                {
                    await
                    TranscriptionJob0.
                    setMedia_file(relatedMedia_file0);
                }
            
                const relatedMedia_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob1 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TranscriptionJob1?.setMedia_file)
                {
                    await
                    TranscriptionJob1.
                    setMedia_file(relatedMedia_file1);
                }
            
                const relatedMedia_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob2 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TranscriptionJob2?.setMedia_file)
                {
                    await
                    TranscriptionJob2.
                    setMedia_file(relatedMedia_file2);
                }
            
                const relatedMedia_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob3 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TranscriptionJob3?.setMedia_file)
                {
                    await
                    TranscriptionJob3.
                    setMedia_file(relatedMedia_file3);
                }
            
                const relatedMedia_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob4 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TranscriptionJob4?.setMedia_file)
                {
                    await
                    TranscriptionJob4.
                    setMedia_file(relatedMedia_file4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTranscriptionJobWithExport_file() {
            
                const relatedExport_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob0 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TranscriptionJob0?.setExport_file)
                {
                    await
                    TranscriptionJob0.
                    setExport_file(relatedExport_file0);
                }
            
                const relatedExport_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob1 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TranscriptionJob1?.setExport_file)
                {
                    await
                    TranscriptionJob1.
                    setExport_file(relatedExport_file1);
                }
            
                const relatedExport_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob2 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TranscriptionJob2?.setExport_file)
                {
                    await
                    TranscriptionJob2.
                    setExport_file(relatedExport_file2);
                }
            
                const relatedExport_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob3 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TranscriptionJob3?.setExport_file)
                {
                    await
                    TranscriptionJob3.
                    setExport_file(relatedExport_file3);
                }
            
                const relatedExport_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const TranscriptionJob4 = await TranscriptionJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TranscriptionJob4?.setExport_file)
                {
                    await
                    TranscriptionJob4.
                    setExport_file(relatedExport_file4);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateMedicalChronologyReportWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MedicalChronologyReport0 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalChronologyReport0?.setRequested_by)
                {
                    await
                    MedicalChronologyReport0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MedicalChronologyReport1 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalChronologyReport1?.setRequested_by)
                {
                    await
                    MedicalChronologyReport1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MedicalChronologyReport2 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalChronologyReport2?.setRequested_by)
                {
                    await
                    MedicalChronologyReport2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MedicalChronologyReport3 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalChronologyReport3?.setRequested_by)
                {
                    await
                    MedicalChronologyReport3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MedicalChronologyReport4 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MedicalChronologyReport4?.setRequested_by)
                {
                    await
                    MedicalChronologyReport4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateMedicalChronologyReportWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MedicalChronologyReport0 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalChronologyReport0?.setMatter)
                {
                    await
                    MedicalChronologyReport0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MedicalChronologyReport1 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalChronologyReport1?.setMatter)
                {
                    await
                    MedicalChronologyReport1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MedicalChronologyReport2 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalChronologyReport2?.setMatter)
                {
                    await
                    MedicalChronologyReport2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MedicalChronologyReport3 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalChronologyReport3?.setMatter)
                {
                    await
                    MedicalChronologyReport3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const MedicalChronologyReport4 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MedicalChronologyReport4?.setMatter)
                {
                    await
                    MedicalChronologyReport4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateMedicalChronologyReportWithExport_file() {
            
                const relatedExport_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalChronologyReport0 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalChronologyReport0?.setExport_file)
                {
                    await
                    MedicalChronologyReport0.
                    setExport_file(relatedExport_file0);
                }
            
                const relatedExport_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalChronologyReport1 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalChronologyReport1?.setExport_file)
                {
                    await
                    MedicalChronologyReport1.
                    setExport_file(relatedExport_file1);
                }
            
                const relatedExport_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalChronologyReport2 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalChronologyReport2?.setExport_file)
                {
                    await
                    MedicalChronologyReport2.
                    setExport_file(relatedExport_file2);
                }
            
                const relatedExport_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalChronologyReport3 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalChronologyReport3?.setExport_file)
                {
                    await
                    MedicalChronologyReport3.
                    setExport_file(relatedExport_file3);
                }
            
                const relatedExport_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalChronologyReport4 = await MedicalChronologyReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MedicalChronologyReport4?.setExport_file)
                {
                    await
                    MedicalChronologyReport4.
                    setExport_file(relatedExport_file4);
                }
            
        }
        
    
        
    

    
    
    
        
            
            async function associateMedicalEventWithReport() {
            
                const relatedReport0 = await MedicalChronologyReports.findOne({
                    offset: Math.floor(Math.random() * (await MedicalChronologyReports.count())),
                });
                const MedicalEvent0 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalEvent0?.setReport)
                {
                    await
                    MedicalEvent0.
                    setReport(relatedReport0);
                }
            
                const relatedReport1 = await MedicalChronologyReports.findOne({
                    offset: Math.floor(Math.random() * (await MedicalChronologyReports.count())),
                });
                const MedicalEvent1 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalEvent1?.setReport)
                {
                    await
                    MedicalEvent1.
                    setReport(relatedReport1);
                }
            
                const relatedReport2 = await MedicalChronologyReports.findOne({
                    offset: Math.floor(Math.random() * (await MedicalChronologyReports.count())),
                });
                const MedicalEvent2 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalEvent2?.setReport)
                {
                    await
                    MedicalEvent2.
                    setReport(relatedReport2);
                }
            
                const relatedReport3 = await MedicalChronologyReports.findOne({
                    offset: Math.floor(Math.random() * (await MedicalChronologyReports.count())),
                });
                const MedicalEvent3 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalEvent3?.setReport)
                {
                    await
                    MedicalEvent3.
                    setReport(relatedReport3);
                }
            
                const relatedReport4 = await MedicalChronologyReports.findOne({
                    offset: Math.floor(Math.random() * (await MedicalChronologyReports.count())),
                });
                const MedicalEvent4 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MedicalEvent4?.setReport)
                {
                    await
                    MedicalEvent4.
                    setReport(relatedReport4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMedicalEventWithLinked_file() {
            
                const relatedLinked_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalEvent0 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalEvent0?.setLinked_file)
                {
                    await
                    MedicalEvent0.
                    setLinked_file(relatedLinked_file0);
                }
            
                const relatedLinked_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalEvent1 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalEvent1?.setLinked_file)
                {
                    await
                    MedicalEvent1.
                    setLinked_file(relatedLinked_file1);
                }
            
                const relatedLinked_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalEvent2 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalEvent2?.setLinked_file)
                {
                    await
                    MedicalEvent2.
                    setLinked_file(relatedLinked_file2);
                }
            
                const relatedLinked_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalEvent3 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalEvent3?.setLinked_file)
                {
                    await
                    MedicalEvent3.
                    setLinked_file(relatedLinked_file3);
                }
            
                const relatedLinked_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const MedicalEvent4 = await MedicalEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (MedicalEvent4?.setLinked_file)
                {
                    await
                    MedicalEvent4.
                    setLinked_file(relatedLinked_file4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCausationAnalysWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CausationAnalys0 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CausationAnalys0?.setRequested_by)
                {
                    await
                    CausationAnalys0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CausationAnalys1 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CausationAnalys1?.setRequested_by)
                {
                    await
                    CausationAnalys1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CausationAnalys2 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CausationAnalys2?.setRequested_by)
                {
                    await
                    CausationAnalys2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CausationAnalys3 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CausationAnalys3?.setRequested_by)
                {
                    await
                    CausationAnalys3.
                    setRequested_by(relatedRequested_by3);
                }
            
                const relatedRequested_by4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CausationAnalys4 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CausationAnalys4?.setRequested_by)
                {
                    await
                    CausationAnalys4.
                    setRequested_by(relatedRequested_by4);
                }
            
        }
        
    
        
            
            async function associateCausationAnalysWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CausationAnalys0 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CausationAnalys0?.setMatter)
                {
                    await
                    CausationAnalys0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CausationAnalys1 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CausationAnalys1?.setMatter)
                {
                    await
                    CausationAnalys1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CausationAnalys2 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CausationAnalys2?.setMatter)
                {
                    await
                    CausationAnalys2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CausationAnalys3 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CausationAnalys3?.setMatter)
                {
                    await
                    CausationAnalys3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const CausationAnalys4 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CausationAnalys4?.setMatter)
                {
                    await
                    CausationAnalys4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateCausationAnalysWithExport_file() {
            
                const relatedExport_file0 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const CausationAnalys0 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CausationAnalys0?.setExport_file)
                {
                    await
                    CausationAnalys0.
                    setExport_file(relatedExport_file0);
                }
            
                const relatedExport_file1 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const CausationAnalys1 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CausationAnalys1?.setExport_file)
                {
                    await
                    CausationAnalys1.
                    setExport_file(relatedExport_file1);
                }
            
                const relatedExport_file2 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const CausationAnalys2 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CausationAnalys2?.setExport_file)
                {
                    await
                    CausationAnalys2.
                    setExport_file(relatedExport_file2);
                }
            
                const relatedExport_file3 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const CausationAnalys3 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CausationAnalys3?.setExport_file)
                {
                    await
                    CausationAnalys3.
                    setExport_file(relatedExport_file3);
                }
            
                const relatedExport_file4 = await Files.findOne({
                    offset: Math.floor(Math.random() * (await Files.count())),
                });
                const CausationAnalys4 = await CausationAnalyses.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (CausationAnalys4?.setExport_file)
                {
                    await
                    CausationAnalys4.
                    setExport_file(relatedExport_file4);
                }
            
        }
        
    
        
    

    
    
    
        
            
            async function associateAuditEventWithActor() {
            
                const relatedActor0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent0 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditEvent0?.setActor)
                {
                    await
                    AuditEvent0.
                    setActor(relatedActor0);
                }
            
                const relatedActor1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent1 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditEvent1?.setActor)
                {
                    await
                    AuditEvent1.
                    setActor(relatedActor1);
                }
            
                const relatedActor2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent2 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditEvent2?.setActor)
                {
                    await
                    AuditEvent2.
                    setActor(relatedActor2);
                }
            
                const relatedActor3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent3 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditEvent3?.setActor)
                {
                    await
                    AuditEvent3.
                    setActor(relatedActor3);
                }
            
                const relatedActor4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditEvent4 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AuditEvent4?.setActor)
                {
                    await
                    AuditEvent4.
                    setActor(relatedActor4);
                }
            
        }
        
    
        
            
            async function associateAuditEventWithMatter() {
            
                const relatedMatter0 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AuditEvent0 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditEvent0?.setMatter)
                {
                    await
                    AuditEvent0.
                    setMatter(relatedMatter0);
                }
            
                const relatedMatter1 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AuditEvent1 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditEvent1?.setMatter)
                {
                    await
                    AuditEvent1.
                    setMatter(relatedMatter1);
                }
            
                const relatedMatter2 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AuditEvent2 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditEvent2?.setMatter)
                {
                    await
                    AuditEvent2.
                    setMatter(relatedMatter2);
                }
            
                const relatedMatter3 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AuditEvent3 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditEvent3?.setMatter)
                {
                    await
                    AuditEvent3.
                    setMatter(relatedMatter3);
                }
            
                const relatedMatter4 = await Matters.findOne({
                    offset: Math.floor(Math.random() * (await Matters.count())),
                });
                const AuditEvent4 = await AuditEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AuditEvent4?.setMatter)
                {
                    await
                    AuditEvent4.
                    setMatter(relatedMatter4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Subscriptions.bulkCreate(SubscriptionsData);
                
            
            
                
                await FeatureFlags.bulkCreate(FeatureFlagsData);
                
            
            
                
                await Matters.bulkCreate(MattersData);
                
            
            
                
                await MatterParties.bulkCreate(MatterPartiesData);
                
            
            
                
                await Files.bulkCreate(FilesData);
                
            
            
                
                await FileExtractions.bulkCreate(FileExtractionsData);
                
            
            
                
                await AssistantThreads.bulkCreate(AssistantThreadsData);
                
            
            
                
                await AssistantMessages.bulkCreate(AssistantMessagesData);
                
            
            
                
                await AiJobs.bulkCreate(AiJobsData);
                
            
            
                
                await LegalTemplates.bulkCreate(LegalTemplatesData);
                
            
            
                
                await TemplateFields.bulkCreate(TemplateFieldsData);
                
            
            
                
                await GeneratedDocuments.bulkCreate(GeneratedDocumentsData);
                
            
            
                
                await DocumentVersions.bulkCreate(DocumentVersionsData);
                
            
            
                
                await ResearchQueries.bulkCreate(ResearchQueriesData);
                
            
            
                
                await LegalSources.bulkCreate(LegalSourcesData);
                
            
            
                
                await ResearchResults.bulkCreate(ResearchResultsData);
                
            
            
                
                await CitatorChecks.bulkCreate(CitatorChecksData);
                
            
            
                
                await MockTrials.bulkCreate(MockTrialsData);
                
            
            
                
                await MockTrialRoles.bulkCreate(MockTrialRolesData);
                
            
            
                
                await MockTrialTurns.bulkCreate(MockTrialTurnsData);
                
            
            
                
                await TranscriptionJobs.bulkCreate(TranscriptionJobsData);
                
            
            
                
                await MedicalChronologyReports.bulkCreate(MedicalChronologyReportsData);
                
            
            
                
                await MedicalEvents.bulkCreate(MedicalEventsData);
                
            
            
                
                await CausationAnalyses.bulkCreate(CausationAnalysesData);
                
            
            
                
                await AuditEvents.bulkCreate(AuditEventsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                
                
                    
                        
                        await associateSubscriptionWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMatterWithOwner(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMatterPartyWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateFileWithOwner(),
                    
                
                    
                        
                        await associateFileWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateFileExtractionWithFile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAssistantThreadWithOwner(),
                    
                
                    
                        
                        await associateAssistantThreadWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAssistantMessageWithThread(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAiJobWithRequested_by(),
                    
                
                    
                        
                        await associateAiJobWithMatter(),
                    
                
                    
                        
                        await associateAiJobWithFile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateLegalTemplateWithOwner(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLegalTemplateWithSource_file(),
                    
                
            
                
                
                    
                        
                        await associateTemplateFieldWithTemplate(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateGeneratedDocumentWithOwner(),
                    
                
                    
                        
                        await associateGeneratedDocumentWithMatter(),
                    
                
                    
                        
                        await associateGeneratedDocumentWithTemplate(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateGeneratedDocumentWithExport_file(),
                    
                
                    
                
            
                
                
                    
                        
                        await associateDocumentVersionWithDocument(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateResearchQueryWithRequested_by(),
                    
                
                    
                        
                        await associateResearchQueryWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateResearchResultWithResearch_query(),
                    
                
                    
                        
                        await associateResearchResultWithLegal_source(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCitatorCheckWithRequested_by(),
                    
                
                    
                        
                        await associateCitatorCheckWithMatter(),
                    
                
                    
                        
                        await associateCitatorCheckWithLegal_source(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMockTrialWithOwner(),
                    
                
                    
                        
                        await associateMockTrialWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMockTrialRoleWithMock_trial(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMockTrialTurnWithMock_trial(),
                    
                
                    
                        
                        await associateMockTrialTurnWithRole(),
                    
                
                    
                
                    
                
                    
                        
                        await associateMockTrialTurnWithAudio_file(),
                    
                
                    
                
            
                
                
                    
                        
                        await associateTranscriptionJobWithRequested_by(),
                    
                
                    
                        
                        await associateTranscriptionJobWithMatter(),
                    
                
                    
                        
                        await associateTranscriptionJobWithMedia_file(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTranscriptionJobWithExport_file(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateMedicalChronologyReportWithRequested_by(),
                    
                
                    
                        
                        await associateMedicalChronologyReportWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateMedicalChronologyReportWithExport_file(),
                    
                
                    
                
            
                
                
                    
                        
                        await associateMedicalEventWithReport(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMedicalEventWithLinked_file(),
                    
                
            
                
                
                    
                        
                        await associateCausationAnalysWithRequested_by(),
                    
                
                    
                        
                        await associateCausationAnalysWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateCausationAnalysWithExport_file(),
                    
                
                    
                
            
                
                
                    
                        
                        await associateAuditEventWithActor(),
                    
                
                    
                        
                        await associateAuditEventWithMatter(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('subscriptions', null, {});
            
            
            await queryInterface.bulkDelete('feature_flags', null, {});
            
            
            await queryInterface.bulkDelete('matters', null, {});
            
            
            await queryInterface.bulkDelete('matter_parties', null, {});
            
            
            await queryInterface.bulkDelete('files', null, {});
            
            
            await queryInterface.bulkDelete('file_extractions', null, {});
            
            
            await queryInterface.bulkDelete('assistant_threads', null, {});
            
            
            await queryInterface.bulkDelete('assistant_messages', null, {});
            
            
            await queryInterface.bulkDelete('ai_jobs', null, {});
            
            
            await queryInterface.bulkDelete('legal_templates', null, {});
            
            
            await queryInterface.bulkDelete('template_fields', null, {});
            
            
            await queryInterface.bulkDelete('generated_documents', null, {});
            
            
            await queryInterface.bulkDelete('document_versions', null, {});
            
            
            await queryInterface.bulkDelete('research_queries', null, {});
            
            
            await queryInterface.bulkDelete('legal_sources', null, {});
            
            
            await queryInterface.bulkDelete('research_results', null, {});
            
            
            await queryInterface.bulkDelete('citator_checks', null, {});
            
            
            await queryInterface.bulkDelete('mock_trials', null, {});
            
            
            await queryInterface.bulkDelete('mock_trial_roles', null, {});
            
            
            await queryInterface.bulkDelete('mock_trial_turns', null, {});
            
            
            await queryInterface.bulkDelete('transcription_jobs', null, {});
            
            
            await queryInterface.bulkDelete('medical_chronology_reports', null, {});
            
            
            await queryInterface.bulkDelete('medical_events', null, {});
            
            
            await queryInterface.bulkDelete('causation_analyses', null, {});
            
            
            await queryInterface.bulkDelete('audit_events', null, {});
            
        
    },
};