38276-vm/backend/src/db/seeders/20231127130745-sample-data.js
2026-02-07 20:13:29 +00:00

8795 lines
172 KiB
JavaScript

const db = require('../models');
const Users = db.users;
const ServiceCategories = db.service_categories;
const Services = db.services;
const Industries = db.industries;
const Pages = db.pages;
const Faqs = db.faqs;
const Testimonials = db.testimonials;
const Credentials = db.credentials;
const ServiceAreas = db.service_areas;
const ContactSubmissions = db.contact_submissions;
const Consultations = db.consultations;
const Cases = db.cases;
const CaseParties = db.case_parties;
const CaseUpdates = db.case_updates;
const EvidenceItems = db.evidence_items;
const SecureUploadRequests = db.secure_upload_requests;
const Documents = db.documents;
const Invoices = db.invoices;
const Payments = db.payments;
const BlogPosts = db.blog_posts;
const AuditEvents = db.audit_events;
const ServiceCategoriesData = [
{
"name": "Personal Investigations",
"description": "Discreet services for individuals involving relationship concerns, custody matters, and personal safety.",
"sort_order": 1,
"is_active": true,
},
{
"name": "Corporate Investigations",
"description": "Internal investigations, compliance support, and corporate intelligence for organizations.",
"sort_order": 2,
"is_active": true,
},
{
"name": "Fraud and Insurance",
"description": "Evidence-based investigations into suspected fraud, misrepresentation, and financial misconduct.",
"sort_order": 3,
"is_active": true,
},
{
"name": "Digital and OSINT",
"description": "Online research, identity verification, and open-source intelligence collection and analysis.",
"sort_order": 4,
"is_active": true,
},
{
"name": "Legal Support",
"description": "Litigation support and evidence development for attorneys and legal teams.",
"sort_order": 5,
"is_active": true,
},
];
const ServicesData = [
{
"name": "Background Investigations",
"slug": "background-investigations",
"summary": "Verify identity, history, and risk exposure for personal, legal, or business decisions.",
"details": "Structured background research including public records review, identity verification, employment and education validation where lawful, and risk indicators documentation.",
"seo_title": "Background Investigation Services",
"seo_description": "Confidential background investigations for attorneys, businesses, and individuals. Lawful methods and clear reporting.",
// type code here for "relation_one" field
"is_featured": true,
"is_active": true,
"sort_order": 1,
},
{
"name": "Surveillance Services",
"slug": "surveillance-services",
"summary": "Professional surveillance to document activity and verify claims within legal frameworks.",
"details": "Field observation and documentation focused on evidence integrity, detailed logs, and time-stamped reporting.",
"seo_title": "Surveillance Investigator Services",
"seo_description": "Discreet surveillance services with lawful evidence collection and professional documentation.",
// type code here for "relation_one" field
"is_featured": true,
"is_active": true,
"sort_order": 2,
},
{
"name": "Fraud Investigations",
"slug": "fraud-investigations",
"summary": "Investigate suspected insurance and corporate fraud with objective evidence collection.",
"details": "Fact-based fraud investigations including timeline reconstruction, record analysis, and corroborating evidence development.",
"seo_title": "Fraud Investigation Services",
"seo_description": "Insurance and corporate fraud investigations with evidence-focused reporting and compliance.",
// type code here for "relation_one" field
"is_featured": true,
"is_active": true,
"sort_order": 3,
},
{
"name": "Digital and OSINT Investigations",
"slug": "digital-osint-investigations",
"summary": "Online intelligence gathering, digital footprint analysis, and identity verification.",
"details": "Open-source intelligence research, social media analysis, and digital presence mapping with clear sourcing notes.",
"seo_title": "Digital OSINT Investigations",
"seo_description": "OSINT investigations for identity verification and online intelligence with discreet, lawful methods.",
// type code here for "relation_one" field
"is_featured": false,
"is_active": true,
"sort_order": 4,
},
{
"name": "Litigation Support",
"slug": "litigation-support",
"summary": "Investigation support for legal proceedings including evidence development and reporting.",
"details": "Support for attorneys through research, witness location, documentation, and court-ready reporting formats.",
"seo_title": "Litigation Support Investigations",
"seo_description": "Confidential litigation support and evidence collection for law firms and legal professionals.",
// type code here for "relation_one" field
"is_featured": false,
"is_active": true,
"sort_order": 5,
},
];
const IndustriesData = [
{
"name": "Attorneys and Law Firms",
"description": "Confidential investigative support for litigation, discovery, and trial preparation.",
"is_active": true,
},
{
"name": "Corporate Compliance",
"description": "Internal investigations and compliance-focused intelligence for organizations.",
"is_active": true,
},
{
"name": "Insurance and Claims",
"description": "Fraud and misrepresentation investigations supporting claims evaluation.",
"is_active": true,
},
{
"name": "Risk Management Teams",
"description": "Due diligence and risk exposure verification for operational decision-making.",
"is_active": true,
},
{
"name": "Individuals and Families",
"description": "Discreet personal investigations and locate services for private matters.",
"is_active": true,
},
];
const PagesData = [
{
"page_type": "about",
"title": "A.R.A Cyber Risk and Private Investigations",
"slug": "home",
"content": "Confidential, lawful investigations delivering evidence and clarity. Request a confidential case review to discuss your needs and next steps.",
"seo_title": "Licensed Private Investigation Services",
"seo_description": "Confidential investigations for attorneys, businesses, and individuals. Evidence-focused methods and clear reporting.",
"is_published": true,
},
{
"page_type": "process_overview",
"title": "About Our Firm",
"slug": "about",
"content": "We provide discreet, legally compliant investigative services using structured methods, modern tools, and clear reporting designed for decision-making.",
"seo_title": "About A.R.A Investigations",
"seo_description": "Professional private investigation firm delivering confidential, evidence-based services with strict legal compliance.",
"is_published": true,
},
{
"page_type": "about",
"title": "Investigative Services",
"slug": "services",
"content": "Explore our services including background investigations, surveillance, fraud investigations, digital OSINT, and litigation support.",
"seo_title": "Investigation Services Overview",
"seo_description": "Private investigation services delivered with discretion, evidence integrity, and timely communication.",
"is_published": true,
},
{
"page_type": "services_overview",
"title": "Frequently Asked Questions",
"slug": "faq",
"content": "Answers to common questions about confidentiality, legal compliance, process, and timelines.",
"seo_title": "Private Investigation FAQ",
"seo_description": "Learn how confidential investigations work, what to expect, and how evidence is handled within legal frameworks.",
"is_published": true,
},
{
"page_type": "home",
"title": "Privacy Policy",
"slug": "privacy-policy",
"content": "We maintain strict confidentiality and handle information and files with security practices appropriate for sensitive investigations.",
"seo_title": "Privacy Policy",
"seo_description": "Review how we handle confidential inquiries, submitted information, and secure file uploads.",
"is_published": true,
},
];
const FaqsData = [
{
"question": "Are your investigations conducted legally?",
"answer": "Yes. All services are performed within applicable laws and regulations. We do not offer illegal services or unlawful surveillance.",
"audience": "attorneys",
"sort_order": 1,
"is_active": true,
},
{
"question": "How do you protect confidentiality?",
"answer": "We limit access to case information to authorized personnel and maintain secure handling of documents, communications, and evidence.",
"audience": "individuals",
"sort_order": 2,
"is_active": true,
},
{
"question": "Do you work with attorneys and law firms?",
"answer": "Yes. We provide litigation support, evidence development, and investigative reporting for legal proceedings.",
"audience": "attorneys",
"sort_order": 3,
"is_active": true,
},
{
"question": "What information should I provide in a consultation request?",
"answer": "A brief overview of your situation, the location or jurisdiction, relevant names, and your preferred contact method. Do not send sensitive identifiers until instructed.",
"audience": "general",
"sort_order": 4,
"is_active": true,
},
{
"question": "Can you provide written reports?",
"answer": "Yes. We provide clear, structured reporting with documentation appropriate to the scope of the engagement.",
"audience": "general",
"sort_order": 5,
"is_active": true,
},
];
const TestimonialsData = [
{
"client_name": "R. H.",
"client_title": "General Counsel",
"organization": "MidAtlantic Logistics",
"quote": "Professional, discreet, and highly methodical. The reporting was clear and supported our internal decision-making.",
"rating": 5,
"is_approved": true,
"is_anonymous": true,
},
{
"client_name": "Elena Carter",
"client_title": "Partner",
"organization": "Carter and Wells LLP",
"quote": "Timely communication and strong documentation. Their work integrated well with our litigation timeline.",
"rating": 5,
"is_approved": true,
"is_anonymous": true,
},
{
"client_name": "K. M.",
"client_title": "Claims Manager",
"organization": "Harborline Insurance",
"quote": "Objective findings and organized evidence handling. Their process was straightforward and compliant.",
"rating": 5,
"is_approved": true,
"is_anonymous": true,
},
{
"client_name": "D. S.",
"client_title": "Operations Lead",
"organization": "Northbridge Manufacturing",
"quote": "Clear scope, professional approach, and consistent updates throughout the engagement.",
"rating": 4,
"is_approved": true,
"is_anonymous": true,
},
{
"client_name": "Priya Shah",
"client_title": "Client",
"organization": "Independent",
"quote": "Respectful and discreet throughout. The consultation explained what was possible and what was not, which I appreciated.",
"rating": 5,
"is_approved": true,
"is_anonymous": false,
},
];
const CredentialsData = [
{
"credential_type": "association_membership",
"name": "Private Investigator License",
"issuer": "State Licensing Authority",
"credential_number": "PI-482193",
"issued_on": new Date('2023-01-15T00:00:00Z'),
"expires_on": new Date('2026-01-15T00:00:00Z'),
"notes": "Active license on file for primary jurisdiction.",
"is_public": true,
},
{
"credential_type": "association_membership",
"name": "Certified Fraud Examiner Training",
"issuer": "Professional Training Institute",
"credential_number": "CFE-T-77421",
"issued_on": new Date('2022-06-10T00:00:00Z'),
"expires_on": new Date('2027-06-10T00:00:00Z'),
"notes": "Continuing education maintained annually.",
"is_public": true,
},
{
"credential_type": "partnership",
"name": "State Investigators Association Membership",
"issuer": "State Investigators Association",
"credential_number": "SIA-11902",
"issued_on": new Date('2024-02-01T00:00:00Z'),
"expires_on": new Date('2025-02-01T00:00:00Z'),
"notes": "Member in good standing.",
"is_public": true,
},
{
"credential_type": "association_membership",
"name": "Legal Services Referral Network",
"issuer": "Regional Bar Referral Program",
"credential_number": "LREF-33019",
"issued_on": new Date('2024-09-01T00:00:00Z'),
"expires_on": new Date('2026-09-01T00:00:00Z'),
"notes": "Referral relationship for litigation support requests.",
"is_public": true,
},
{
"credential_type": "license",
"name": "Professional Liability Coverage",
"issuer": "Trusted Risk Underwriters",
"credential_number": "PLI-905533",
"issued_on": new Date('2025-01-01T00:00:00Z'),
"expires_on": new Date('2026-01-01T00:00:00Z'),
"notes": "Proof of coverage available upon request.",
"is_public": true,
},
];
const ServiceAreasData = [
{
"name": "Washington DC Metro",
"area_type": "nationwide",
"notes": "District of Columbia and surrounding counties.",
"is_active": true,
},
{
"name": "Northern Virginia",
"area_type": "nationwide",
"notes": "Select counties and cities in Northern Virginia.",
"is_active": true,
},
{
"name": "Maryland Central",
"area_type": "region",
"notes": "Central Maryland service coverage.",
"is_active": true,
},
{
"name": "Nationwide Remote Research",
"area_type": "state",
"notes": "Digital and OSINT research available nationwide where lawful.",
"is_active": true,
},
{
"name": "Baltimore Area",
"area_type": "county",
"notes": "Baltimore City and surrounding counties.",
"is_active": true,
},
];
const ContactSubmissionsData = [
{
"submitted_on": new Date('2026-01-05T14:22:00Z'),
"full_name": "Alex Miller",
"email": "alex.miller@example.com",
"phone": "+1-703-555-0134",
"preferred_contact_method": "either",
"client_type": "attorney",
"company_name": "Stonebridge Retail Group",
// type code here for "relation_one" field
// type code here for "relation_one" field
"urgency": "urgent",
"message": "Requesting a confidential review of suspected inventory shrink and potential employee theft. We need documentation suitable for internal action.",
"consent_to_contact": true,
"confidentiality_acknowledged": true,
"status": "scheduled",
// type code here for "relation_one" field
"internal_notes": "Schedule intake call and request preliminary incident timeline.",
},
{
"submitted_on": new Date('2026-01-10T18:05:00Z'),
"full_name": "Marina Lopez",
"email": "marina.lopez@example.com",
"phone": "+1-301-555-0190",
"preferred_contact_method": "either",
"client_type": "attorney",
"company_name": "Independent",
// type code here for "relation_one" field
// type code here for "relation_one" field
"urgency": "standard",
"message": "Seeking discreet surveillance related to a custody concern. Prefer a confidential phone consult.",
"consent_to_contact": true,
"confidentiality_acknowledged": true,
"status": "scheduled",
// type code here for "relation_one" field
"internal_notes": "Confirm jurisdiction and discuss lawful scope.",
},
{
"submitted_on": new Date('2026-01-12T09:40:00Z'),
"full_name": "Derek Chen",
"email": "derek.chen@example.com",
"phone": "+1-202-555-0117",
"preferred_contact_method": "phone",
"client_type": "insurance",
"company_name": "Chen and Park Law",
// type code here for "relation_one" field
// type code here for "relation_one" field
"urgency": "urgent",
"message": "Need assistance locating a witness and verifying background details for an upcoming hearing.",
"consent_to_contact": true,
"confidentiality_acknowledged": true,
"status": "triage",
// type code here for "relation_one" field
"internal_notes": "Obtain engagement letter and scope. Do not request sensitive identifiers via email.",
},
{
"submitted_on": new Date('2026-01-18T16:30:00Z'),
"full_name": "Samantha Reed",
"email": "samantha.reed@example.com",
"phone": "+1-410-555-0151",
"preferred_contact_method": "email",
"client_type": "law_firm",
"company_name": "Harborline Insurance",
// type code here for "relation_one" field
// type code here for "relation_one" field
"urgency": "standard",
"message": "Requesting review for potential misrepresentation in a claim. Need evidence-focused report and documentation handling details.",
"consent_to_contact": true,
"confidentiality_acknowledged": true,
"status": "new",
// type code here for "relation_one" field
"internal_notes": "Triage and request claim number via secure channel.",
},
{
"submitted_on": new Date('2026-01-20T11:12:00Z'),
"full_name": "Noah Johnson",
"email": "noah.johnson@example.com",
"phone": "+1-571-555-0106",
"preferred_contact_method": "email",
"client_type": "attorney",
"company_name": "Independent",
// type code here for "relation_one" field
// type code here for "relation_one" field
"urgency": "standard",
"message": "Need identity verification and digital footprint review for a potential business partner. Looking for lawful OSINT findings.",
"consent_to_contact": true,
"confidentiality_acknowledged": true,
"status": "spam",
// type code here for "relation_one" field
"internal_notes": "Explain OSINT limitations and deliverable format.",
},
];
const ConsultationsData = [
{
"case_title": "Stonebridge Inventory Loss Review",
"status": "no_show",
"requested_on": new Date('2026-01-05T15:10:00Z'),
"scheduled_start": new Date('2026-01-06T16:00:00Z'),
"scheduled_end": new Date('2026-01-06T16:30:00Z'),
"meeting_mode": "phone",
"location": "Secure video call",
// type code here for "relation_one" field
// type code here for "relation_one" field
"notes": "Discuss incident timeline, access controls, and reporting expectations.",
},
{
"case_title": "Custody Concern Consultation",
"status": "cancelled",
"requested_on": new Date('2026-01-10T18:15:00Z'),
"scheduled_start": new Date('2026-01-11T19:00:00Z'),
"scheduled_end": new Date('2026-01-11T19:30:00Z'),
"meeting_mode": "phone",
"location": "Phone call",
// type code here for "relation_one" field
// type code here for "relation_one" field
"notes": "Confirm lawful objectives and ensure client understands constraints.",
},
{
"case_title": "Witness Location Support",
"status": "cancelled",
"requested_on": new Date('2026-01-12T10:00:00Z'),
"scheduled_start": new Date('2026-01-13T14:00:00Z'),
"scheduled_end": new Date('2026-01-13T14:45:00Z'),
"meeting_mode": "in_person",
"location": "Secure video call",
// type code here for "relation_one" field
// type code here for "relation_one" field
"notes": "Collect case context and define deliverables and deadlines.",
},
{
"case_title": "Claim Integrity Review",
"status": "no_show",
"requested_on": new Date('2026-01-18T16:45:00Z'),
"scheduled_start": new Date('2026-01-21T15:00:00Z'),
"scheduled_end": new Date('2026-01-21T15:30:00Z'),
"meeting_mode": "video",
"location": "Phone call",
// type code here for "relation_one" field
// type code here for "relation_one" field
"notes": "Plan secure exchange method for documents and claim file summary.",
},
{
"case_title": "OSINT Due Diligence Briefing",
"status": "no_show",
"requested_on": new Date('2026-01-20T11:30:00Z'),
"scheduled_start": new Date('2026-01-22T17:00:00Z'),
"scheduled_end": new Date('2026-01-22T17:30:00Z'),
"meeting_mode": "in_person",
"location": "Secure video call",
// type code here for "relation_one" field
// type code here for "relation_one" field
"notes": "Clarify lawful sources and verification standards.",
},
];
const CasesData = [
{
"case_number": "ARA-2026-001",
"title": "Stonebridge Inventory Shrink Review",
"case_type": "fraud_investigation",
"status": "intake",
"opened_on": new Date('2026-01-07T09:00:00Z'),
"closed_on": new Date('2026-02-01T18:00:00Z'),
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
"summary": "Assessment of suspected internal theft and process weaknesses with evidence documentation.",
"scope": "Review access logs provided by client, interview coordination as authorized, and timeline documentation for internal action.",
"legal_disclaimer_acknowledgement": "Client acknowledges all investigative work will be conducted within legal frameworks and does not include unlawful activities.",
"estimated_budget": 4500.0,
"retainer_amount": 1500.0,
"confidential": true,
},
{
"case_number": "ARA-2026-002",
"title": "Custody Concern Field Observation",
"case_type": "missing_persons",
"status": "active",
"opened_on": new Date('2026-01-12T10:00:00Z'),
"closed_on": new Date('2026-01-28T17:30:00Z'),
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
"summary": "Discreet observation to document location and activity for custody-related concerns.",
"scope": "Limited surveillance within agreed dates and locations with detailed logs and time-stamped documentation.",
"legal_disclaimer_acknowledgement": "Client acknowledges surveillance will be lawful and does not include trespass, harassment, or unlawful recording.",
"estimated_budget": 3200.0,
"retainer_amount": 1200.0,
"confidential": true,
},
{
"case_number": "ARA-2026-003",
"title": "Witness Location and Background Verification",
"case_type": "fraud_investigation",
"status": "active",
"opened_on": new Date('2026-01-14T13:00:00Z'),
"closed_on": new Date('2026-02-05T16:00:00Z'),
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
"summary": "Locate witness and verify background details to support counsel preparation.",
"scope": "Locate services and lawful public records review with reporting suitable for counsel use.",
"legal_disclaimer_acknowledgement": "Client acknowledges results depend on available lawful sources and will be reported factually with citations.",
"estimated_budget": 2800.0,
"retainer_amount": 900.0,
"confidential": true,
},
{
"case_number": "ARA-2026-004",
"title": "Claim Misrepresentation Review",
"case_type": "missing_persons",
"status": "on_hold",
"opened_on": new Date('2026-01-22T09:30:00Z'),
"closed_on": new Date('2026-02-07T17:00:00Z'),
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
"summary": "Evaluate potential claim inconsistencies and compile evidence-based findings for claims team.",
"scope": "Review documentation provided via secure channel, corroborate timelines, and produce structured report.",
"legal_disclaimer_acknowledgement": "Client acknowledges no unlawful access to private accounts or restricted data will be pursued.",
"estimated_budget": 5000.0,
"retainer_amount": 2000.0,
"confidential": true,
},
{
"case_number": "ARA-2026-005",
"title": "OSINT Due Diligence for Prospective Partner",
"case_type": "missing_persons",
"status": "awaiting_client",
"opened_on": new Date('2026-01-23T12:00:00Z'),
"closed_on": new Date('2026-02-06T18:30:00Z'),
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
// type code here for "relation_one" field
"summary": "Open-source intelligence review and identity verification for due diligence purposes.",
"scope": "Collect and analyze publicly available information, note source reliability, and provide a concise findings brief.",
"legal_disclaimer_acknowledgement": "Client acknowledges OSINT is limited to lawful, publicly available sources and cannot guarantee completeness.",
"estimated_budget": 1800.0,
"retainer_amount": 600.0,
"confidential": true,
},
];
const CasePartiesData = [
{
// type code here for "relation_one" field
"party_role": "witness",
"full_name": "Alex Miller",
"organization": "Stonebridge Retail Group",
"email": "alex.miller@example.com",
"phone": "+1-703-555-0134",
"address": "Arlington, VA",
"notes": "Primary business contact for documentation and approvals.",
},
{
// type code here for "relation_one" field
"party_role": "witness",
"full_name": "Marina Lopez",
"organization": "Independent",
"email": "marina.lopez@example.com",
"phone": "+1-301-555-0190",
"address": "Columbia, MD",
"notes": "Requests strict confidentiality for communications.",
},
{
// type code here for "relation_one" field
"party_role": "subject",
"full_name": "Derek Chen",
"organization": "Chen and Park Law",
"email": "derek.chen@example.com",
"phone": "+1-202-555-0117",
"address": "Washington, DC",
"notes": "Preferred communication via secure email for scheduling only.",
},
{
// type code here for "relation_one" field
"party_role": "witness",
"full_name": "Samantha Reed",
"organization": "Harborline Insurance",
"email": "samantha.reed@example.com",
"phone": "+1-410-555-0151",
"address": "Baltimore, MD",
"notes": "Claims team contact; requests evidence chain notes.",
},
{
// type code here for "relation_one" field
"party_role": "attorney",
"full_name": "Noah Johnson",
"organization": "Independent",
"email": "noah.johnson@example.com",
"phone": "+1-571-555-0106",
"address": "Remote",
"notes": "Wants summary suitable for internal due diligence documentation.",
},
];
const CaseUpdatesData = [
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"update_on": new Date('2026-01-09T17:00:00Z'),
"visibility": "client_visible",
"summary": "Initial documentation review completed",
"details": "Reviewed incident summaries and access logs provided by client. Identified timeline gaps and requested additional shift schedules via secure upload.",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"update_on": new Date('2026-01-15T16:10:00Z'),
"visibility": "internal",
"summary": "Requested additional records",
"details": "Please provide updated inventory variance reports for the last 60 days and current access roster. Use secure upload request link for files.",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"update_on": new Date('2026-01-20T12:45:00Z'),
"visibility": "client_visible",
"summary": "Lead established for witness location",
"details": "Located potential address history from public records. Preparing verification steps and contact plan consistent with scope.",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"update_on": new Date('2026-01-24T09:30:00Z'),
"visibility": "internal",
"summary": "Secure file exchange initiated",
"details": "Issued secure upload request for claim documents and timeline statement. Waiting for client submission.",
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"update_on": new Date('2026-01-25T18:05:00Z'),
"visibility": "client_visible",
"summary": "OSINT collection in progress",
"details": "Initial open-source collection completed. Next step is source corroboration and preparing a concise findings brief with citations.",
},
];
const EvidenceItemsData = [
{
// type code here for "relation_one" field
"evidence_type": "document",
"title": "Inventory variance report summary",
"description": "Client-provided variance summaries for review period.",
"captured_on": new Date('2026-01-08T10:15:00Z'),
"source": "Client secure upload",
"hash_value": "a3f2b1c4d5e69788aa11bb22cc33dd44",
// type code here for "files" field
"confidentiality_level": "attorney_eyes_only",
},
{
// type code here for "relation_one" field
"evidence_type": "log",
"title": "Time-stamped location photo set",
"description": "Photos captured from public vantage points consistent with scope.",
"captured_on": new Date('2026-01-13T21:05:00Z'),
"source": "Field observation",
"hash_value": "bb12cc34dd56ee78ff90aa11bb22cc33",
// type code here for "files" field
"confidentiality_level": "attorney_eyes_only",
},
{
// type code here for "relation_one" field
"evidence_type": "document",
"title": "Public records address history notes",
"description": "Summary of publicly available address history sources used for lead verification.",
"captured_on": new Date('2026-01-19T13:20:00Z'),
"source": "OSINT research",
"hash_value": "cc22dd44ee66ff8811aa22bb33cc44dd",
// type code here for "files" field
"confidentiality_level": "restricted",
},
{
// type code here for "relation_one" field
"evidence_type": "video",
"title": "Claim file intake checklist",
"description": "Checklist confirming receipt and completeness of initial claim documentation.",
"captured_on": new Date('2026-01-24T10:05:00Z'),
"source": "Internal intake",
"hash_value": "dd33ee55ff7711aa22bb33cc44dd55ee",
// type code here for "files" field
"confidentiality_level": "attorney_eyes_only",
},
{
// type code here for "relation_one" field
"evidence_type": "photo",
"title": "Digital footprint findings dataset",
"description": "Collected links and notes from publicly available sources with relevance tagging.",
"captured_on": new Date('2026-01-25T15:40:00Z'),
"source": "OSINT research",
"hash_value": "ee44ff6611aa22bb33cc44dd55ee66ff",
// type code here for "files" field
"confidentiality_level": "attorney_eyes_only",
},
];
const SecureUploadRequestsData = [
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"request_title": "Upload inventory and access records",
"instructions": "Upload variance reports, access roster, and relevant shift schedules. Do not include sensitive identifiers unless requested.",
"expires_on": new Date('2026-02-10T23:59:00Z'),
"status": "active",
// type code here for "files" field
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"request_title": "Upload custody documentation",
"instructions": "Upload any court filings or schedules relevant to scope. Use PDF format where possible.",
"expires_on": new Date('2026-02-05T23:59:00Z'),
"status": "expired",
// type code here for "files" field
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"request_title": "Upload case materials for counsel",
"instructions": "Upload any pleadings or witness details necessary for locate services. Provide minimal required details only.",
"expires_on": new Date('2026-02-03T23:59:00Z'),
"status": "fulfilled",
// type code here for "files" field
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"request_title": "Upload claim documents",
"instructions": "Upload claim file summary, supporting documents, and chronology. Use secure channel for any sensitive items.",
"expires_on": new Date('2026-02-12T23:59:00Z'),
"status": "active",
// type code here for "files" field
},
{
// type code here for "relation_one" field
// type code here for "relation_one" field
"request_title": "Upload partner-provided materials",
"instructions": "Upload any documents provided by the prospective partner for comparison with OSINT findings.",
"expires_on": new Date('2026-02-08T23:59:00Z'),
"status": "expired",
// type code here for "files" field
},
];
const DocumentsData = [
{
// type code here for "relation_one" field
"document_type": "affidavit",
"title": "Preliminary Findings Memo",
"document_on": new Date('2026-01-16T00:00:00Z'),
"visibility": "internal",
// type code here for "files" field
},
{
// type code here for "relation_one" field
"document_type": "authorization",
"title": "Client Authorization Form",
"document_on": new Date('2026-01-12T00:00:00Z'),
"visibility": "internal",
// type code here for "files" field
},
{
// type code here for "relation_one" field
"document_type": "report",
"title": "Witness Location Status Report",
"document_on": new Date('2026-01-22T00:00:00Z'),
"visibility": "client_visible",
// type code here for "files" field
},
{
// type code here for "relation_one" field
"document_type": "invoice",
"title": "Engagement Agreement",
"document_on": new Date('2026-01-22T00:00:00Z'),
"visibility": "client_visible",
// type code here for "files" field
},
{
// type code here for "relation_one" field
"document_type": "authorization",
"title": "OSINT Due Diligence Brief",
"document_on": new Date('2026-01-28T00:00:00Z'),
"visibility": "internal",
// type code here for "files" field
},
];
const InvoicesData = [
{
// type code here for "relation_one" field
"invoice_number": "INV-2026-0101",
"issued_on": new Date('2026-01-07T00:00:00Z'),
"due_on": new Date('2026-01-21T00:00:00Z'),
"status": "void",
"subtotal": 1500.0,
"tax": 0.0,
"total": 1500.0,
"notes": "Retainer invoice for case opening.",
},
{
// type code here for "relation_one" field
"invoice_number": "INV-2026-0102",
"issued_on": new Date('2026-01-12T00:00:00Z'),
"due_on": new Date('2026-01-26T00:00:00Z'),
"status": "partially_paid",
"subtotal": 1200.0,
"tax": 0.0,
"total": 1200.0,
"notes": "Retainer received prior to field work.",
},
{
// type code here for "relation_one" field
"invoice_number": "INV-2026-0103",
"issued_on": new Date('2026-01-14T00:00:00Z'),
"due_on": new Date('2026-01-28T00:00:00Z'),
"status": "overdue",
"subtotal": 900.0,
"tax": 0.0,
"total": 900.0,
"notes": "Initial retainer invoice for locate services.",
},
{
// type code here for "relation_one" field
"invoice_number": "INV-2026-0104",
"issued_on": new Date('2026-01-22T00:00:00Z'),
"due_on": new Date('2026-02-05T00:00:00Z'),
"status": "draft",
"subtotal": 2000.0,
"tax": 0.0,
"total": 2000.0,
"notes": "Retainer invoice pending confirmation of scope.",
},
{
// type code here for "relation_one" field
"invoice_number": "INV-2026-0105",
"issued_on": new Date('2026-01-23T00:00:00Z'),
"due_on": new Date('2026-02-06T00:00:00Z'),
"status": "paid",
"subtotal": 600.0,
"tax": 0.0,
"total": 600.0,
"notes": "Retainer for OSINT due diligence work.",
},
];
const PaymentsData = [
{
// type code here for "relation_one" field
"paid_on": new Date('2026-01-08T12:10:00Z'),
"amount": 750.0,
"method": "check",
"reference_code": "PAY-0101-A",
"notes": "Partial retainer received.",
},
{
// type code here for "relation_one" field
"paid_on": new Date('2026-01-15T10:20:00Z'),
"amount": 750.0,
"method": "other",
"reference_code": "PAY-0101-B",
"notes": "Remaining retainer received.",
},
{
// type code here for "relation_one" field
"paid_on": new Date('2026-01-12T09:45:00Z'),
"amount": 1200.0,
"method": "cash",
"reference_code": "PAY-0102-A",
"notes": "Retainer paid in full.",
},
{
// type code here for "relation_one" field
"paid_on": new Date('2026-01-23T14:05:00Z'),
"amount": 600.0,
"method": "check",
"reference_code": "PAY-0105-A",
"notes": "Retainer paid in full.",
},
{
// type code here for "relation_one" field
"paid_on": new Date('2026-01-20T11:00:00Z'),
"amount": 900.0,
"method": "other",
"reference_code": "PAY-0103-A",
"notes": "Check received and deposited.",
},
];
const BlogPostsData = [
{
"title": "What to Expect in a Confidential Case Review",
"slug": "what-to-expect-confidential-case-review",
"excerpt": "A brief overview of how our consultation process works and how we protect confidentiality from first contact.",
"content": "A confidential case review focuses on scope, lawful options, and deliverables. We outline what can be done, what cannot be done, and what information is needed to proceed responsibly.",
"published_on": new Date('2026-01-08T09:00:00Z'),
"is_published": true,
// type code here for "relation_one" field
"seo_title": "Confidential Case Review Guide",
"seo_description": "Learn what happens during a private investigation consultation and how confidentiality is protected.",
// type code here for "images" field
},
{
"title": "Evidence Integrity and Documentation Basics",
"slug": "evidence-integrity-documentation-basics",
"excerpt": "Why documentation matters and how professional reporting supports decision-making.",
"content": "Evidence integrity requires careful collection, time-stamping where applicable, and clear reporting. We focus on factual writing, source notes, and organized attachments.",
"published_on": new Date('2026-01-12T09:00:00Z'),
"is_published": true,
// type code here for "relation_one" field
"seo_title": "Evidence Integrity in Investigations",
"seo_description": "Understand how investigators document findings and maintain evidence integrity within legal frameworks.",
// type code here for "images" field
},
{
"title": "OSINT: Lawful Sources and Practical Limits",
"slug": "osint-lawful-sources-practical-limits",
"excerpt": "An overview of what open-source intelligence can and cannot provide.",
"content": "OSINT uses publicly available sources to support verification and risk assessment. We document sources, assess reliability, and avoid unlawful access or restricted data collection.",
"published_on": new Date('2026-01-18T09:00:00Z'),
"is_published": true,
// type code here for "relation_one" field
"seo_title": "OSINT Investigations Explained",
"seo_description": "Learn about lawful OSINT research, digital footprint analysis, and how results are reported responsibly.",
// type code here for "images" field
},
{
"title": "Working With Attorneys: Investigation Support Workflow",
"slug": "working-with-attorneys-investigation-support-workflow",
"excerpt": "How we coordinate with legal teams while keeping communications and deliverables clear.",
"content": "We align scope with counsel objectives, document methods and findings, and provide reporting formats appropriate for legal review. Timelines and secure exchange are prioritized.",
"published_on": new Date('2026-01-22T09:00:00Z'),
"is_published": true,
// type code here for "relation_one" field
"seo_title": "Litigation Support Workflow",
"seo_description": "A practical overview of how investigation support works for attorneys, including reporting and secure collaboration.",
// type code here for "images" field
},
{
"title": "Confidentiality and Secure File Upload Guidance",
"slug": "confidentiality-secure-file-upload-guidance",
"excerpt": "Best practices for sharing documents safely during an investigation.",
"content": "Use secure upload links when available, avoid sending sensitive identifiers by standard email, and follow file naming and document preparation guidance to reduce risk.",
"published_on": new Date('2026-01-26T09:00:00Z'),
"is_published": true,
// type code here for "relation_one" field
"seo_title": "Secure File Upload Best Practices",
"seo_description": "Practical tips for sharing investigation documents securely and maintaining confidentiality.",
// type code here for "images" field
},
];
const AuditEventsData = [
{
"event_on": new Date('2026-01-05T14:22:05Z'),
// type code here for "relation_one" field
"event_type": "status_change",
"resource_type": "document",
"resource_label": "Alex Miller inquiry",
"details": "New contact submission created from website form.",
"ip_address": "198.51.100.24",
},
{
"event_on": new Date('2026-01-06T16:35:10Z'),
// type code here for "relation_one" field
"event_type": "delete",
"resource_type": "evidence_item",
"resource_label": "Marina Lopez inquiry",
"details": "Status changed to scheduled after confirming consultation time.",
"ip_address": "203.0.113.18",
},
{
"event_on": new Date('2026-01-14T13:05:00Z'),
// type code here for "relation_one" field
"event_type": "permission_change",
"resource_type": "document",
"resource_label": "ARA-2026-003",
"details": "Case opened and assigned to lead investigator.",
"ip_address": "203.0.113.18",
},
{
"event_on": new Date('2026-01-24T10:05:10Z'),
// type code here for "relation_one" field
"event_type": "download",
"resource_type": "payment",
"resource_label": "Upload claim documents",
"details": "Secure upload request created for client document exchange.",
"ip_address": "203.0.113.77",
},
{
"event_on": new Date('2026-01-28T16:40:00Z'),
// type code here for "relation_one" field
"event_type": "permission_change",
"resource_type": "payment",
"resource_label": "OSINT Due Diligence Brief",
"details": "Internal download for review and quality check.",
"ip_address": "198.51.100.9",
},
];
// Similar logic for "relation_many"
async function associateServiceWithCategory() {
const relatedCategory0 = await ServiceCategories.findOne({
offset: Math.floor(Math.random() * (await ServiceCategories.count())),
});
const Service0 = await Services.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Service0?.setCategory)
{
await
Service0.
setCategory(relatedCategory0);
}
const relatedCategory1 = await ServiceCategories.findOne({
offset: Math.floor(Math.random() * (await ServiceCategories.count())),
});
const Service1 = await Services.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Service1?.setCategory)
{
await
Service1.
setCategory(relatedCategory1);
}
const relatedCategory2 = await ServiceCategories.findOne({
offset: Math.floor(Math.random() * (await ServiceCategories.count())),
});
const Service2 = await Services.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Service2?.setCategory)
{
await
Service2.
setCategory(relatedCategory2);
}
const relatedCategory3 = await ServiceCategories.findOne({
offset: Math.floor(Math.random() * (await ServiceCategories.count())),
});
const Service3 = await Services.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Service3?.setCategory)
{
await
Service3.
setCategory(relatedCategory3);
}
const relatedCategory4 = await ServiceCategories.findOne({
offset: Math.floor(Math.random() * (await ServiceCategories.count())),
});
const Service4 = await Services.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Service4?.setCategory)
{
await
Service4.
setCategory(relatedCategory4);
}
}
async function associateContactSubmissionWithService_area() {
const relatedService_area0 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const ContactSubmission0 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ContactSubmission0?.setService_area)
{
await
ContactSubmission0.
setService_area(relatedService_area0);
}
const relatedService_area1 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const ContactSubmission1 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ContactSubmission1?.setService_area)
{
await
ContactSubmission1.
setService_area(relatedService_area1);
}
const relatedService_area2 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const ContactSubmission2 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ContactSubmission2?.setService_area)
{
await
ContactSubmission2.
setService_area(relatedService_area2);
}
const relatedService_area3 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const ContactSubmission3 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (ContactSubmission3?.setService_area)
{
await
ContactSubmission3.
setService_area(relatedService_area3);
}
const relatedService_area4 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const ContactSubmission4 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (ContactSubmission4?.setService_area)
{
await
ContactSubmission4.
setService_area(relatedService_area4);
}
}
async function associateContactSubmissionWithService() {
const relatedService0 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const ContactSubmission0 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ContactSubmission0?.setService)
{
await
ContactSubmission0.
setService(relatedService0);
}
const relatedService1 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const ContactSubmission1 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ContactSubmission1?.setService)
{
await
ContactSubmission1.
setService(relatedService1);
}
const relatedService2 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const ContactSubmission2 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ContactSubmission2?.setService)
{
await
ContactSubmission2.
setService(relatedService2);
}
const relatedService3 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const ContactSubmission3 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (ContactSubmission3?.setService)
{
await
ContactSubmission3.
setService(relatedService3);
}
const relatedService4 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const ContactSubmission4 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (ContactSubmission4?.setService)
{
await
ContactSubmission4.
setService(relatedService4);
}
}
async function associateContactSubmissionWithAssigned_to() {
const relatedAssigned_to0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const ContactSubmission0 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (ContactSubmission0?.setAssigned_to)
{
await
ContactSubmission0.
setAssigned_to(relatedAssigned_to0);
}
const relatedAssigned_to1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const ContactSubmission1 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (ContactSubmission1?.setAssigned_to)
{
await
ContactSubmission1.
setAssigned_to(relatedAssigned_to1);
}
const relatedAssigned_to2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const ContactSubmission2 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (ContactSubmission2?.setAssigned_to)
{
await
ContactSubmission2.
setAssigned_to(relatedAssigned_to2);
}
const relatedAssigned_to3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const ContactSubmission3 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (ContactSubmission3?.setAssigned_to)
{
await
ContactSubmission3.
setAssigned_to(relatedAssigned_to3);
}
const relatedAssigned_to4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const ContactSubmission4 = await ContactSubmissions.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (ContactSubmission4?.setAssigned_to)
{
await
ContactSubmission4.
setAssigned_to(relatedAssigned_to4);
}
}
async function associateConsultationWithContact_submission() {
const relatedContact_submission0 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Consultation0 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Consultation0?.setContact_submission)
{
await
Consultation0.
setContact_submission(relatedContact_submission0);
}
const relatedContact_submission1 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Consultation1 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Consultation1?.setContact_submission)
{
await
Consultation1.
setContact_submission(relatedContact_submission1);
}
const relatedContact_submission2 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Consultation2 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Consultation2?.setContact_submission)
{
await
Consultation2.
setContact_submission(relatedContact_submission2);
}
const relatedContact_submission3 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Consultation3 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Consultation3?.setContact_submission)
{
await
Consultation3.
setContact_submission(relatedContact_submission3);
}
const relatedContact_submission4 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Consultation4 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Consultation4?.setContact_submission)
{
await
Consultation4.
setContact_submission(relatedContact_submission4);
}
}
async function associateConsultationWithInvestigator() {
const relatedInvestigator0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Consultation0 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Consultation0?.setInvestigator)
{
await
Consultation0.
setInvestigator(relatedInvestigator0);
}
const relatedInvestigator1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Consultation1 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Consultation1?.setInvestigator)
{
await
Consultation1.
setInvestigator(relatedInvestigator1);
}
const relatedInvestigator2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Consultation2 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Consultation2?.setInvestigator)
{
await
Consultation2.
setInvestigator(relatedInvestigator2);
}
const relatedInvestigator3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Consultation3 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Consultation3?.setInvestigator)
{
await
Consultation3.
setInvestigator(relatedInvestigator3);
}
const relatedInvestigator4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Consultation4 = await Consultations.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Consultation4?.setInvestigator)
{
await
Consultation4.
setInvestigator(relatedInvestigator4);
}
}
async function associateCasWithPrimary_service() {
const relatedPrimary_service0 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const Cas0 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Cas0?.setPrimary_service)
{
await
Cas0.
setPrimary_service(relatedPrimary_service0);
}
const relatedPrimary_service1 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const Cas1 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Cas1?.setPrimary_service)
{
await
Cas1.
setPrimary_service(relatedPrimary_service1);
}
const relatedPrimary_service2 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const Cas2 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Cas2?.setPrimary_service)
{
await
Cas2.
setPrimary_service(relatedPrimary_service2);
}
const relatedPrimary_service3 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const Cas3 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Cas3?.setPrimary_service)
{
await
Cas3.
setPrimary_service(relatedPrimary_service3);
}
const relatedPrimary_service4 = await Services.findOne({
offset: Math.floor(Math.random() * (await Services.count())),
});
const Cas4 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Cas4?.setPrimary_service)
{
await
Cas4.
setPrimary_service(relatedPrimary_service4);
}
}
async function associateCasWithService_area() {
const relatedService_area0 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const Cas0 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Cas0?.setService_area)
{
await
Cas0.
setService_area(relatedService_area0);
}
const relatedService_area1 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const Cas1 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Cas1?.setService_area)
{
await
Cas1.
setService_area(relatedService_area1);
}
const relatedService_area2 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const Cas2 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Cas2?.setService_area)
{
await
Cas2.
setService_area(relatedService_area2);
}
const relatedService_area3 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const Cas3 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Cas3?.setService_area)
{
await
Cas3.
setService_area(relatedService_area3);
}
const relatedService_area4 = await ServiceAreas.findOne({
offset: Math.floor(Math.random() * (await ServiceAreas.count())),
});
const Cas4 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Cas4?.setService_area)
{
await
Cas4.
setService_area(relatedService_area4);
}
}
async function associateCasWithIntake_source() {
const relatedIntake_source0 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Cas0 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Cas0?.setIntake_source)
{
await
Cas0.
setIntake_source(relatedIntake_source0);
}
const relatedIntake_source1 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Cas1 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Cas1?.setIntake_source)
{
await
Cas1.
setIntake_source(relatedIntake_source1);
}
const relatedIntake_source2 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Cas2 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Cas2?.setIntake_source)
{
await
Cas2.
setIntake_source(relatedIntake_source2);
}
const relatedIntake_source3 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Cas3 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Cas3?.setIntake_source)
{
await
Cas3.
setIntake_source(relatedIntake_source3);
}
const relatedIntake_source4 = await ContactSubmissions.findOne({
offset: Math.floor(Math.random() * (await ContactSubmissions.count())),
});
const Cas4 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Cas4?.setIntake_source)
{
await
Cas4.
setIntake_source(relatedIntake_source4);
}
}
async function associateCasWithLead_investigator() {
const relatedLead_investigator0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Cas0 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Cas0?.setLead_investigator)
{
await
Cas0.
setLead_investigator(relatedLead_investigator0);
}
const relatedLead_investigator1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Cas1 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Cas1?.setLead_investigator)
{
await
Cas1.
setLead_investigator(relatedLead_investigator1);
}
const relatedLead_investigator2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Cas2 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Cas2?.setLead_investigator)
{
await
Cas2.
setLead_investigator(relatedLead_investigator2);
}
const relatedLead_investigator3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Cas3 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Cas3?.setLead_investigator)
{
await
Cas3.
setLead_investigator(relatedLead_investigator3);
}
const relatedLead_investigator4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const Cas4 = await Cases.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Cas4?.setLead_investigator)
{
await
Cas4.
setLead_investigator(relatedLead_investigator4);
}
}
async function associateCasePartyWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseParty0 = await CaseParties.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (CaseParty0?.setCase)
{
await
CaseParty0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseParty1 = await CaseParties.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (CaseParty1?.setCase)
{
await
CaseParty1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseParty2 = await CaseParties.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (CaseParty2?.setCase)
{
await
CaseParty2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseParty3 = await CaseParties.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (CaseParty3?.setCase)
{
await
CaseParty3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseParty4 = await CaseParties.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (CaseParty4?.setCase)
{
await
CaseParty4.
setCase(relatedCase4);
}
}
async function associateCaseUpdateWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseUpdate0 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (CaseUpdate0?.setCase)
{
await
CaseUpdate0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseUpdate1 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (CaseUpdate1?.setCase)
{
await
CaseUpdate1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseUpdate2 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (CaseUpdate2?.setCase)
{
await
CaseUpdate2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseUpdate3 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (CaseUpdate3?.setCase)
{
await
CaseUpdate3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const CaseUpdate4 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (CaseUpdate4?.setCase)
{
await
CaseUpdate4.
setCase(relatedCase4);
}
}
async function associateCaseUpdateWithAuthor() {
const relatedAuthor0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const CaseUpdate0 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (CaseUpdate0?.setAuthor)
{
await
CaseUpdate0.
setAuthor(relatedAuthor0);
}
const relatedAuthor1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const CaseUpdate1 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (CaseUpdate1?.setAuthor)
{
await
CaseUpdate1.
setAuthor(relatedAuthor1);
}
const relatedAuthor2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const CaseUpdate2 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (CaseUpdate2?.setAuthor)
{
await
CaseUpdate2.
setAuthor(relatedAuthor2);
}
const relatedAuthor3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const CaseUpdate3 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (CaseUpdate3?.setAuthor)
{
await
CaseUpdate3.
setAuthor(relatedAuthor3);
}
const relatedAuthor4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const CaseUpdate4 = await CaseUpdates.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (CaseUpdate4?.setAuthor)
{
await
CaseUpdate4.
setAuthor(relatedAuthor4);
}
}
async function associateEvidenceItemWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const EvidenceItem0 = await EvidenceItems.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (EvidenceItem0?.setCase)
{
await
EvidenceItem0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const EvidenceItem1 = await EvidenceItems.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (EvidenceItem1?.setCase)
{
await
EvidenceItem1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const EvidenceItem2 = await EvidenceItems.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (EvidenceItem2?.setCase)
{
await
EvidenceItem2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const EvidenceItem3 = await EvidenceItems.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (EvidenceItem3?.setCase)
{
await
EvidenceItem3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const EvidenceItem4 = await EvidenceItems.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (EvidenceItem4?.setCase)
{
await
EvidenceItem4.
setCase(relatedCase4);
}
}
async function associateSecureUploadRequestWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const SecureUploadRequest0 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (SecureUploadRequest0?.setCase)
{
await
SecureUploadRequest0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const SecureUploadRequest1 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (SecureUploadRequest1?.setCase)
{
await
SecureUploadRequest1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const SecureUploadRequest2 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (SecureUploadRequest2?.setCase)
{
await
SecureUploadRequest2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const SecureUploadRequest3 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (SecureUploadRequest3?.setCase)
{
await
SecureUploadRequest3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const SecureUploadRequest4 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (SecureUploadRequest4?.setCase)
{
await
SecureUploadRequest4.
setCase(relatedCase4);
}
}
async function associateSecureUploadRequestWithRequested_by() {
const relatedRequested_by0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SecureUploadRequest0 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (SecureUploadRequest0?.setRequested_by)
{
await
SecureUploadRequest0.
setRequested_by(relatedRequested_by0);
}
const relatedRequested_by1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SecureUploadRequest1 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (SecureUploadRequest1?.setRequested_by)
{
await
SecureUploadRequest1.
setRequested_by(relatedRequested_by1);
}
const relatedRequested_by2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SecureUploadRequest2 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (SecureUploadRequest2?.setRequested_by)
{
await
SecureUploadRequest2.
setRequested_by(relatedRequested_by2);
}
const relatedRequested_by3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SecureUploadRequest3 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (SecureUploadRequest3?.setRequested_by)
{
await
SecureUploadRequest3.
setRequested_by(relatedRequested_by3);
}
const relatedRequested_by4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const SecureUploadRequest4 = await SecureUploadRequests.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (SecureUploadRequest4?.setRequested_by)
{
await
SecureUploadRequest4.
setRequested_by(relatedRequested_by4);
}
}
async function associateDocumentWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Document0 = await Documents.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Document0?.setCase)
{
await
Document0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Document1 = await Documents.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Document1?.setCase)
{
await
Document1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Document2 = await Documents.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Document2?.setCase)
{
await
Document2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Document3 = await Documents.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Document3?.setCase)
{
await
Document3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Document4 = await Documents.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Document4?.setCase)
{
await
Document4.
setCase(relatedCase4);
}
}
async function associateInvoiceWithCase() {
const relatedCase0 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Invoice0 = await Invoices.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Invoice0?.setCase)
{
await
Invoice0.
setCase(relatedCase0);
}
const relatedCase1 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Invoice1 = await Invoices.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Invoice1?.setCase)
{
await
Invoice1.
setCase(relatedCase1);
}
const relatedCase2 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Invoice2 = await Invoices.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Invoice2?.setCase)
{
await
Invoice2.
setCase(relatedCase2);
}
const relatedCase3 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Invoice3 = await Invoices.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Invoice3?.setCase)
{
await
Invoice3.
setCase(relatedCase3);
}
const relatedCase4 = await Cases.findOne({
offset: Math.floor(Math.random() * (await Cases.count())),
});
const Invoice4 = await Invoices.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Invoice4?.setCase)
{
await
Invoice4.
setCase(relatedCase4);
}
}
async function associatePaymentWithInvoice() {
const relatedInvoice0 = await Invoices.findOne({
offset: Math.floor(Math.random() * (await Invoices.count())),
});
const Payment0 = await Payments.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (Payment0?.setInvoice)
{
await
Payment0.
setInvoice(relatedInvoice0);
}
const relatedInvoice1 = await Invoices.findOne({
offset: Math.floor(Math.random() * (await Invoices.count())),
});
const Payment1 = await Payments.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (Payment1?.setInvoice)
{
await
Payment1.
setInvoice(relatedInvoice1);
}
const relatedInvoice2 = await Invoices.findOne({
offset: Math.floor(Math.random() * (await Invoices.count())),
});
const Payment2 = await Payments.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (Payment2?.setInvoice)
{
await
Payment2.
setInvoice(relatedInvoice2);
}
const relatedInvoice3 = await Invoices.findOne({
offset: Math.floor(Math.random() * (await Invoices.count())),
});
const Payment3 = await Payments.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (Payment3?.setInvoice)
{
await
Payment3.
setInvoice(relatedInvoice3);
}
const relatedInvoice4 = await Invoices.findOne({
offset: Math.floor(Math.random() * (await Invoices.count())),
});
const Payment4 = await Payments.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (Payment4?.setInvoice)
{
await
Payment4.
setInvoice(relatedInvoice4);
}
}
async function associateBlogPostWithAuthor() {
const relatedAuthor0 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const BlogPost0 = await BlogPosts.findOne({
order: [['id', 'ASC']],
offset: 0
});
if (BlogPost0?.setAuthor)
{
await
BlogPost0.
setAuthor(relatedAuthor0);
}
const relatedAuthor1 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const BlogPost1 = await BlogPosts.findOne({
order: [['id', 'ASC']],
offset: 1
});
if (BlogPost1?.setAuthor)
{
await
BlogPost1.
setAuthor(relatedAuthor1);
}
const relatedAuthor2 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const BlogPost2 = await BlogPosts.findOne({
order: [['id', 'ASC']],
offset: 2
});
if (BlogPost2?.setAuthor)
{
await
BlogPost2.
setAuthor(relatedAuthor2);
}
const relatedAuthor3 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const BlogPost3 = await BlogPosts.findOne({
order: [['id', 'ASC']],
offset: 3
});
if (BlogPost3?.setAuthor)
{
await
BlogPost3.
setAuthor(relatedAuthor3);
}
const relatedAuthor4 = await Users.findOne({
offset: Math.floor(Math.random() * (await Users.count())),
});
const BlogPost4 = await BlogPosts.findOne({
order: [['id', 'ASC']],
offset: 4
});
if (BlogPost4?.setAuthor)
{
await
BlogPost4.
setAuthor(relatedAuthor4);
}
}
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);
}
}
module.exports = {
up: async (queryInterface, Sequelize) => {
await ServiceCategories.bulkCreate(ServiceCategoriesData);
await Services.bulkCreate(ServicesData);
await Industries.bulkCreate(IndustriesData);
await Pages.bulkCreate(PagesData);
await Faqs.bulkCreate(FaqsData);
await Testimonials.bulkCreate(TestimonialsData);
await Credentials.bulkCreate(CredentialsData);
await ServiceAreas.bulkCreate(ServiceAreasData);
await ContactSubmissions.bulkCreate(ContactSubmissionsData);
await Consultations.bulkCreate(ConsultationsData);
await Cases.bulkCreate(CasesData);
await CaseParties.bulkCreate(CasePartiesData);
await CaseUpdates.bulkCreate(CaseUpdatesData);
await EvidenceItems.bulkCreate(EvidenceItemsData);
await SecureUploadRequests.bulkCreate(SecureUploadRequestsData);
await Documents.bulkCreate(DocumentsData);
await Invoices.bulkCreate(InvoicesData);
await Payments.bulkCreate(PaymentsData);
await BlogPosts.bulkCreate(BlogPostsData);
await AuditEvents.bulkCreate(AuditEventsData);
await Promise.all([
// Similar logic for "relation_many"
await associateServiceWithCategory(),
await associateContactSubmissionWithService_area(),
await associateContactSubmissionWithService(),
await associateContactSubmissionWithAssigned_to(),
await associateConsultationWithContact_submission(),
await associateConsultationWithInvestigator(),
await associateCasWithPrimary_service(),
await associateCasWithService_area(),
await associateCasWithIntake_source(),
await associateCasWithLead_investigator(),
await associateCasePartyWithCase(),
await associateCaseUpdateWithCase(),
await associateCaseUpdateWithAuthor(),
await associateEvidenceItemWithCase(),
await associateSecureUploadRequestWithCase(),
await associateSecureUploadRequestWithRequested_by(),
await associateDocumentWithCase(),
await associateInvoiceWithCase(),
await associatePaymentWithInvoice(),
await associateBlogPostWithAuthor(),
await associateAuditEventWithActor(),
]);
},
down: async (queryInterface, Sequelize) => {
await queryInterface.bulkDelete('service_categories', null, {});
await queryInterface.bulkDelete('services', null, {});
await queryInterface.bulkDelete('industries', null, {});
await queryInterface.bulkDelete('pages', null, {});
await queryInterface.bulkDelete('faqs', null, {});
await queryInterface.bulkDelete('testimonials', null, {});
await queryInterface.bulkDelete('credentials', null, {});
await queryInterface.bulkDelete('service_areas', null, {});
await queryInterface.bulkDelete('contact_submissions', null, {});
await queryInterface.bulkDelete('consultations', null, {});
await queryInterface.bulkDelete('cases', null, {});
await queryInterface.bulkDelete('case_parties', null, {});
await queryInterface.bulkDelete('case_updates', null, {});
await queryInterface.bulkDelete('evidence_items', null, {});
await queryInterface.bulkDelete('secure_upload_requests', null, {});
await queryInterface.bulkDelete('documents', null, {});
await queryInterface.bulkDelete('invoices', null, {});
await queryInterface.bulkDelete('payments', null, {});
await queryInterface.bulkDelete('blog_posts', null, {});
await queryInterface.bulkDelete('audit_events', null, {});
},
};