





















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






const Brands = db.brands;

const BrandVoiceProfiles = db.brand_voice_profiles;

const BrainProfiles = db.brain_profiles;

const SkillModules = db.skill_modules;

const SixHatSessions = db.six_hat_sessions;

const KnowledgeSources = db.knowledge_sources;

const KnowledgeDocuments = db.knowledge_documents;

const KnowledgeChunks = db.knowledge_chunks;

const KnowledgeNodes = db.knowledge_nodes;

const Campaigns = db.campaigns;

const CampaignBrainConfigs = db.campaign_brain_configs;

const SafetyPolicies = db.safety_policies;

const AuditEvents = db.audit_events;

const AdProjects = db.ad_projects;

const AdCreatives = db.ad_creatives;

const GenerationRuns = db.generation_runs;

const GenerationOutputs = db.generation_outputs;

const OutputCitations = db.output_citations;

const FeedbackEntries = db.feedback_entries;

const LearningSignals = db.learning_signals;

const PlatformMetrics = db.platform_metrics;

const SandboxScenarios = db.sandbox_scenarios;

const RefreshJobs = db.refresh_jobs;

const ApprovalReviews = db.approval_reviews;







const BrandsData = [
    
    {
    
        
        
            
                "brand_name": "Marie Curie",
            
        
    
        
        
            
                "website_url": "Marie Curie",
            
        
    
        
        
            
                "industry": "Alan Turing",
            
        
    
        
        
            
                "primary_market": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                "brand_name": "Alan Turing",
            
        
    
        
        
            
                "website_url": "Alan Turing",
            
        
    
        
        
            
                "industry": "Grace Hopper",
            
        
    
        
        
            
                "primary_market": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                "brand_name": "Grace Hopper",
            
        
    
        
        
            
                "website_url": "Grace Hopper",
            
        
    
        
        
            
                "industry": "Marie Curie",
            
        
    
        
        
            
                "primary_market": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
];



const BrandVoiceProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "profile_name": "Marie Curie",
            
        
    
        
        
            
                "voice_description": "Grace Hopper",
            
        
    
        
        
            
                "do_say_examples": "Grace Hopper",
            
        
    
        
        
            
                "dont_say_examples": "Alan Turing",
            
        
    
        
        
            
                "english_variant": "en_us",
            
        
    
        
        
            
                "reading_level_target": 2,
            
        
    
        
        
            
                "formality_level": 6.98,
            
        
    
        
        
            
                "empathy_level": 9.31,
            
        
    
        
        
            
                "energy_level": 9.4,
            
        
    
        
        
            
                "humor_level": 5.91,
            
        
    
        
        
            
                "risk_tolerance": 5.43,
            
        
    
        
        
            
                "show_reasoning_trace": true,
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "profile_name": "Ada Lovelace",
            
        
    
        
        
            
                "voice_description": "Marie Curie",
            
        
    
        
        
            
                "do_say_examples": "Grace Hopper",
            
        
    
        
        
            
                "dont_say_examples": "Alan Turing",
            
        
    
        
        
            
                "english_variant": "en_us",
            
        
    
        
        
            
                "reading_level_target": 7,
            
        
    
        
        
            
                "formality_level": 2.11,
            
        
    
        
        
            
                "empathy_level": 0.69,
            
        
    
        
        
            
                "energy_level": 0.35,
            
        
    
        
        
            
                "humor_level": 6.41,
            
        
    
        
        
            
                "risk_tolerance": 7.26,
            
        
    
        
        
            
                "show_reasoning_trace": true,
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "profile_name": "Marie Curie",
            
        
    
        
        
            
                "voice_description": "Grace Hopper",
            
        
    
        
        
            
                "do_say_examples": "Ada Lovelace",
            
        
    
        
        
            
                "dont_say_examples": "Ada Lovelace",
            
        
    
        
        
            
                "english_variant": "en_us",
            
        
    
        
        
            
                "reading_level_target": 8,
            
        
    
        
        
            
                "formality_level": 5.11,
            
        
    
        
        
            
                "empathy_level": 3.78,
            
        
    
        
        
            
                "energy_level": 6.89,
            
        
    
        
        
            
                "humor_level": 3.55,
            
        
    
        
        
            
                "risk_tolerance": 9.46,
            
        
    
        
        
            
                "show_reasoning_trace": false,
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
];



const BrainProfilesData = [
    
    {
    
        
        
            
                "profile_name": "Grace Hopper",
            
        
    
        
        
            
                "profile_category": "analysis",
            
        
    
        
        
            
                "goal_statement": "Grace Hopper",
            
        
    
        
        
            
                "behavior_rules": "Grace Hopper",
            
        
    
        
        
            
                "preferred_sources_description": "Alan Turing",
            
        
    
        
        
            
                "citation_strictness": 3.1,
            
        
    
        
        
            
                "creativity_level": 4.92,
            
        
    
        
        
            
                "compliance_strictness": 4.91,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "profile_name": "Alan Turing",
            
        
    
        
        
            
                "profile_category": "custom",
            
        
    
        
        
            
                "goal_statement": "Alan Turing",
            
        
    
        
        
            
                "behavior_rules": "Grace Hopper",
            
        
    
        
        
            
                "preferred_sources_description": "Marie Curie",
            
        
    
        
        
            
                "citation_strictness": 3.09,
            
        
    
        
        
            
                "creativity_level": 8.81,
            
        
    
        
        
            
                "compliance_strictness": 2.29,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "profile_name": "Alan Turing",
            
        
    
        
        
            
                "profile_category": "analysis",
            
        
    
        
        
            
                "goal_statement": "Grace Hopper",
            
        
    
        
        
            
                "behavior_rules": "Marie Curie",
            
        
    
        
        
            
                "preferred_sources_description": "Grace Hopper",
            
        
    
        
        
            
                "citation_strictness": 6.29,
            
        
    
        
        
            
                "creativity_level": 2.11,
            
        
    
        
        
            
                "compliance_strictness": 9.56,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
];



const SkillModulesData = [
    
    {
    
        
        
            
                "module_name": "Alan Turing",
            
        
    
        
        
            
                "module_type": "optimization",
            
        
    
        
        
            
                "module_description": "Ada Lovelace",
            
        
    
        
        
            
                "evidence_level": "medium",
            
        
    
        
        
            
                "method_steps": "Grace Hopper",
            
        
    
        
        
            
                "requires_citations": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "module_name": "Ada Lovelace",
            
        
    
        
        
            
                "module_type": "creative",
            
        
    
        
        
            
                "module_description": "Alan Turing",
            
        
    
        
        
            
                "evidence_level": "low",
            
        
    
        
        
            
                "method_steps": "Alan Turing",
            
        
    
        
        
            
                "requires_citations": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "module_name": "Alan Turing",
            
        
    
        
        
            
                "module_type": "optimization",
            
        
    
        
        
            
                "module_description": "Grace Hopper",
            
        
    
        
        
            
                "evidence_level": "medium",
            
        
    
        
        
            
                "method_steps": "Alan Turing",
            
        
    
        
        
            
                "requires_citations": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const SixHatSessionsData = [
    
    {
    
        
        
            
                "session_name": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prompt_context": "Alan Turing",
            
        
    
        
        
            
                "white_hat_notes": "Grace Hopper",
            
        
    
        
        
            
                "red_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "black_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "yellow_hat_notes": "Ada Lovelace",
            
        
    
        
        
            
                "green_hat_notes": "Ada Lovelace",
            
        
    
        
        
            
                "blue_hat_notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "session_name": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prompt_context": "Grace Hopper",
            
        
    
        
        
            
                "white_hat_notes": "Grace Hopper",
            
        
    
        
        
            
                "red_hat_notes": "Ada Lovelace",
            
        
    
        
        
            
                "black_hat_notes": "Marie Curie",
            
        
    
        
        
            
                "yellow_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "green_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "blue_hat_notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "session_name": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prompt_context": "Alan Turing",
            
        
    
        
        
            
                "white_hat_notes": "Marie Curie",
            
        
    
        
        
            
                "red_hat_notes": "Grace Hopper",
            
        
    
        
        
            
                "black_hat_notes": "Marie Curie",
            
        
    
        
        
            
                "yellow_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "green_hat_notes": "Alan Turing",
            
        
    
        
        
            
                "blue_hat_notes": "Marie Curie",
            
        
    
    },
    
];



const KnowledgeSourcesData = [
    
    {
    
        
        
            
                "source_type": "audio",
            
        
    
        
        
            
                "source_name": "Grace Hopper",
            
        
    
        
        
            
                "source_url": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "trust_tier": "gold",
            
        
    
        
        
            
                "content_domain": "general_marketing",
            
        
    
        
        
            
                "last_ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_refresh_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_refresh_enabled": false,
            
        
    
        
        
            
                "refresh_notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "note",
            
        
    
        
        
            
                "source_name": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "trust_tier": "blocked",
            
        
    
        
        
            
                "content_domain": "behavioral_science",
            
        
    
        
        
            
                "last_ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_refresh_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_refresh_enabled": true,
            
        
    
        
        
            
                "refresh_notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "source_type": "note",
            
        
    
        
        
            
                "source_name": "Grace Hopper",
            
        
    
        
        
            
                "source_url": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "trust_tier": "silver",
            
        
    
        
        
            
                "content_domain": "campaign_reports",
            
        
    
        
        
            
                "last_ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_refresh_at": new Date(Date.now()),
            
        
    
        
        
            
                "auto_refresh_enabled": false,
            
        
    
        
        
            
                "refresh_notes": "Marie Curie",
            
        
    
    },
    
];



const KnowledgeDocumentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_title": "Marie Curie",
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "language": "Ada Lovelace",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "document_summary": "Grace Hopper",
            
        
    
        
        
            
                "tags_csv": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_title": "Marie Curie",
            
        
    
        
        
            
                "ingestion_status": "queued",
            
        
    
        
        
            
                "language": "Alan Turing",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "document_summary": "Grace Hopper",
            
        
    
        
        
            
                "tags_csv": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "document_title": "Grace Hopper",
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "language": "Marie Curie",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                "document_summary": "Marie Curie",
            
        
    
        
        
            
                "tags_csv": "Marie Curie",
            
        
    
    },
    
];



const KnowledgeChunksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_label": "Grace Hopper",
            
        
    
        
        
            
                "chunk_text": "Grace Hopper",
            
        
    
        
        
            
                "source_locator": "Grace Hopper",
            
        
    
        
        
            
                "recency_weight": 0.32,
            
        
    
        
        
            
                "quality_score": 8.62,
            
        
    
        
        
            
                "is_sensitive": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_label": "Marie Curie",
            
        
    
        
        
            
                "chunk_text": "Ada Lovelace",
            
        
    
        
        
            
                "source_locator": "Grace Hopper",
            
        
    
        
        
            
                "recency_weight": 8.24,
            
        
    
        
        
            
                "quality_score": 3.68,
            
        
    
        
        
            
                "is_sensitive": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_label": "Grace Hopper",
            
        
    
        
        
            
                "chunk_text": "Marie Curie",
            
        
    
        
        
            
                "source_locator": "Grace Hopper",
            
        
    
        
        
            
                "recency_weight": 5.06,
            
        
    
        
        
            
                "quality_score": 1.17,
            
        
    
        
        
            
                "is_sensitive": false,
            
        
    
    },
    
];



const KnowledgeNodesData = [
    
    {
    
        
        
            
                "node_name": "Marie Curie",
            
        
    
        
        
            
                "node_type": "topic",
            
        
    
        
        
            
                "node_description": "Alan Turing",
            
        
    
        
        
            
                "importance_score": 8.69,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                "node_name": "Marie Curie",
            
        
    
        
        
            
                "node_type": "metric",
            
        
    
        
        
            
                "node_description": "Alan Turing",
            
        
    
        
        
            
                "importance_score": 7.3,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                "node_name": "Marie Curie",
            
        
    
        
        
            
                "node_type": "metric",
            
        
    
        
        
            
                "node_description": "Alan Turing",
            
        
    
        
        
            
                "importance_score": 9.6,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
];



const CampaignsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "campaign_name": "Marie Curie",
            
        
    
        
        
            
                "campaign_type": "conversion",
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "objective": "Alan Turing",
            
        
    
        
        
            
                "primary_audience": "Marie Curie",
            
        
    
        
        
            
                "budget_amount": 4.02,
            
        
    
        
        
            
                "budget_currency": "Alan Turing",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "campaign_name": "Alan Turing",
            
        
    
        
        
            
                "campaign_type": "education",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "objective": "Marie Curie",
            
        
    
        
        
            
                "primary_audience": "Grace Hopper",
            
        
    
        
        
            
                "budget_amount": 8.56,
            
        
    
        
        
            
                "budget_currency": "Ada Lovelace",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "campaign_name": "Ada Lovelace",
            
        
    
        
        
            
                "campaign_type": "education",
            
        
    
        
        
            
                "status": "planned",
            
        
    
        
        
            
                "objective": "Ada Lovelace",
            
        
    
        
        
            
                "primary_audience": "Alan Turing",
            
        
    
        
        
            
                "budget_amount": 6.21,
            
        
    
        
        
            
                "budget_currency": "Ada Lovelace",
            
        
    
        
        
            
                "start_at": new Date(Date.now()),
            
        
    
        
        
            
                "end_at": new Date(Date.now()),
            
        
    
    },
    
];



const CampaignBrainConfigsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "layer_name": "Marie Curie",
            
        
    
        
        
            
                "priority_order": 9,
            
        
    
        
        
            
                "is_enabled": false,
            
        
    
        
        
            
                "influence_weight": 5.74,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "layer_name": "Alan Turing",
            
        
    
        
        
            
                "priority_order": 8,
            
        
    
        
        
            
                "is_enabled": false,
            
        
    
        
        
            
                "influence_weight": 2.57,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "layer_name": "Marie Curie",
            
        
    
        
        
            
                "priority_order": 3,
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "influence_weight": 5.92,
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
];



const SafetyPoliciesData = [
    
    {
    
        
        
            
                "policy_name": "Alan Turing",
            
        
    
        
        
            
                "enforcement_mode": "warn",
            
        
    
        
        
            
                "scope": "global",
            
        
    
        
        
            
                "policy_rules": "Grace Hopper",
            
        
    
        
        
            
                "restricted_topics": "Ada Lovelace",
            
        
    
        
        
            
                "never_copy_sources": "Alan Turing",
            
        
    
        
        
            
                "citation_required": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "policy_name": "Marie Curie",
            
        
    
        
        
            
                "enforcement_mode": "warn",
            
        
    
        
        
            
                "scope": "global",
            
        
    
        
        
            
                "policy_rules": "Marie Curie",
            
        
    
        
        
            
                "restricted_topics": "Alan Turing",
            
        
    
        
        
            
                "never_copy_sources": "Ada Lovelace",
            
        
    
        
        
            
                "citation_required": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "policy_name": "Grace Hopper",
            
        
    
        
        
            
                "enforcement_mode": "warn",
            
        
    
        
        
            
                "scope": "global",
            
        
    
        
        
            
                "policy_rules": "Ada Lovelace",
            
        
    
        
        
            
                "restricted_topics": "Marie Curie",
            
        
    
        
        
            
                "never_copy_sources": "Alan Turing",
            
        
    
        
        
            
                "citation_required": false,
            
        
    
        
        
            
                "is_active": false,
            
        
    
    },
    
];



const AuditEventsData = [
    
    {
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "sandbox_published",
            
        
    
        
        
            
                "event_summary": "Alan Turing",
            
        
    
        
        
            
                "event_details": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "feedback_recorded",
            
        
    
        
        
            
                "event_summary": "Ada Lovelace",
            
        
    
        
        
            
                "event_details": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "event_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "sandbox_published",
            
        
    
        
        
            
                "event_summary": "Grace Hopper",
            
        
    
        
        
            
                "event_details": "Ada Lovelace",
            
        
    
    },
    
];



const AdProjectsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "project_name": "Grace Hopper",
            
        
    
        
        
            
                "channel": "google_display",
            
        
    
        
        
            
                "status": "paused",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_brief": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "project_name": "Grace Hopper",
            
        
    
        
        
            
                "channel": "google_display",
            
        
    
        
        
            
                "status": "approved",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_brief": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "project_name": "Ada Lovelace",
            
        
    
        
        
            
                "channel": "linkedin",
            
        
    
        
        
            
                "status": "scheduled",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_brief": "Marie Curie",
            
        
    
    },
    
];



const AdCreativesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_name": "Grace Hopper",
            
        
    
        
        
            
                "creative_format": "text",
            
        
    
        
        
            
                "primary_text": "Grace Hopper",
            
        
    
        
        
            
                "headline": "Grace Hopper",
            
        
    
        
        
            
                "description_text": "Grace Hopper",
            
        
    
        
        
            
                "call_to_action": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "targeting_notes": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_name": "Grace Hopper",
            
        
    
        
        
            
                "creative_format": "landing_page_section",
            
        
    
        
        
            
                "primary_text": "Ada Lovelace",
            
        
    
        
        
            
                "headline": "Alan Turing",
            
        
    
        
        
            
                "description_text": "Marie Curie",
            
        
    
        
        
            
                "call_to_action": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "targeting_notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "creative_name": "Ada Lovelace",
            
        
    
        
        
            
                "creative_format": "image",
            
        
    
        
        
            
                "primary_text": "Grace Hopper",
            
        
    
        
        
            
                "headline": "Grace Hopper",
            
        
    
        
        
            
                "description_text": "Ada Lovelace",
            
        
    
        
        
            
                "call_to_action": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "targeting_notes": "Grace Hopper",
            
        
    
    },
    
];



const GenerationRunsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "run_type": "research_summary",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "run_status": "completed",
            
        
    
        
        
            
                "input_prompt": "Alan Turing",
            
        
    
        
        
            
                "model_label": "Marie Curie",
            
        
    
        
        
            
                "temperature": 2.79,
            
        
    
        
        
            
                "retrieved_chunk_count": 7,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "run_type": "teardown",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "run_status": "running",
            
        
    
        
        
            
                "input_prompt": "Ada Lovelace",
            
        
    
        
        
            
                "model_label": "Alan Turing",
            
        
    
        
        
            
                "temperature": 7.81,
            
        
    
        
        
            
                "retrieved_chunk_count": 8,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "run_type": "ab_test_plan",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "run_status": "failed",
            
        
    
        
        
            
                "input_prompt": "Marie Curie",
            
        
    
        
        
            
                "model_label": "Alan Turing",
            
        
    
        
        
            
                "temperature": 4.92,
            
        
    
        
        
            
                "retrieved_chunk_count": 6,
            
        
    
    },
    
];



const GenerationOutputsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "output_type": "ad_copy",
            
        
    
        
        
            
                "output_title": "Ada Lovelace",
            
        
    
        
        
            
                "output_content": "Grace Hopper",
            
        
    
        
        
            
                "is_exported": false,
            
        
    
        
        
            
                "exported_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "output_type": "compliance_report",
            
        
    
        
        
            
                "output_title": "Grace Hopper",
            
        
    
        
        
            
                "output_content": "Alan Turing",
            
        
    
        
        
            
                "is_exported": true,
            
        
    
        
        
            
                "exported_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "output_type": "analysis_report",
            
        
    
        
        
            
                "output_title": "Marie Curie",
            
        
    
        
        
            
                "output_content": "Marie Curie",
            
        
    
        
        
            
                "is_exported": true,
            
        
    
        
        
            
                "exported_at": new Date(Date.now()),
            
        
    
    },
    
];



const OutputCitationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 3.85,
            
        
    
        
        
            
                "citation_note": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 5.98,
            
        
    
        
        
            
                "citation_note": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "relevance_score": 3.02,
            
        
    
        
        
            
                "citation_note": "Ada Lovelace",
            
        
    
    },
    
];



const FeedbackEntriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "given_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_score": 8.27,
            
        
    
        
        
            
                "compliance_score": 8.81,
            
        
    
        
        
            
                "brand_fit_score": 7.86,
            
        
    
        
        
            
                "conversion_intent_score": 0.15,
            
        
    
        
        
            
                "empathy_score": 3.74,
            
        
    
        
        
            
                "risk_boldness_score": 7.41,
            
        
    
        
        
            
                "freeform_notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "given_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_score": 5.34,
            
        
    
        
        
            
                "compliance_score": 8.26,
            
        
    
        
        
            
                "brand_fit_score": 2.49,
            
        
    
        
        
            
                "conversion_intent_score": 4.77,
            
        
    
        
        
            
                "empathy_score": 6.28,
            
        
    
        
        
            
                "risk_boldness_score": 0.75,
            
        
    
        
        
            
                "freeform_notes": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "given_at": new Date(Date.now()),
            
        
    
        
        
            
                "overall_score": 2.64,
            
        
    
        
        
            
                "compliance_score": 5.8,
            
        
    
        
        
            
                "brand_fit_score": 7.67,
            
        
    
        
        
            
                "conversion_intent_score": 5.93,
            
        
    
        
        
            
                "empathy_score": 7.77,
            
        
    
        
        
            
                "risk_boldness_score": 9.91,
            
        
    
        
        
            
                "freeform_notes": "Ada Lovelace",
            
        
    
    },
    
];



const LearningSignalsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "signal_type": "ab_result",
            
        
    
        
        
            
                "signal_at": new Date(Date.now()),
            
        
    
        
        
            
                "signal_title": "Marie Curie",
            
        
    
        
        
            
                "signal_details": "Marie Curie",
            
        
    
        
        
            
                "confidence_score": 4.38,
            
        
    
        
        
            
                "applied_to_brain": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "signal_type": "audience_comment",
            
        
    
        
        
            
                "signal_at": new Date(Date.now()),
            
        
    
        
        
            
                "signal_title": "Marie Curie",
            
        
    
        
        
            
                "signal_details": "Alan Turing",
            
        
    
        
        
            
                "confidence_score": 6.49,
            
        
    
        
        
            
                "applied_to_brain": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "signal_type": "competitor_change",
            
        
    
        
        
            
                "signal_at": new Date(Date.now()),
            
        
    
        
        
            
                "signal_title": "Alan Turing",
            
        
    
        
        
            
                "signal_details": "Marie Curie",
            
        
    
        
        
            
                "confidence_score": 1.42,
            
        
    
        
        
            
                "applied_to_brain": true,
            
        
    
    },
    
];



const PlatformMetricsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "platform": "tiktok",
            
        
    
        
        
            
                "metric_date": new Date(Date.now()),
            
        
    
        
        
            
                "spend": 2.08,
            
        
    
        
        
            
                "impressions": 8.39,
            
        
    
        
        
            
                "clicks": 9.53,
            
        
    
        
        
            
                "ctr": 7.25,
            
        
    
        
        
            
                "conversions": 1.92,
            
        
    
        
        
            
                "cpa": 5.5,
            
        
    
        
        
            
                "roas": 5.95,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "platform": "linkedin",
            
        
    
        
        
            
                "metric_date": new Date(Date.now()),
            
        
    
        
        
            
                "spend": 1.7,
            
        
    
        
        
            
                "impressions": 2.55,
            
        
    
        
        
            
                "clicks": 0.92,
            
        
    
        
        
            
                "ctr": 4.72,
            
        
    
        
        
            
                "conversions": 1.96,
            
        
    
        
        
            
                "cpa": 7.72,
            
        
    
        
        
            
                "roas": 2.88,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "platform": "email",
            
        
    
        
        
            
                "metric_date": new Date(Date.now()),
            
        
    
        
        
            
                "spend": 6.56,
            
        
    
        
        
            
                "impressions": 7.38,
            
        
    
        
        
            
                "clicks": 1.39,
            
        
    
        
        
            
                "ctr": 0.59,
            
        
    
        
        
            
                "conversions": 1.66,
            
        
    
        
        
            
                "cpa": 2.57,
            
        
    
        
        
            
                "roas": 7.58,
            
        
    
    },
    
];



const SandboxScenariosData = [
    
    {
    
        
        
            
                "scenario_name": "Alan Turing",
            
        
    
        
        
            
                "scenario_type": "compliance_drill",
            
        
    
        
        
            
                "scenario_description": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "completed",
            
        
    
        
        
            
                "last_run_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "scenario_name": "Ada Lovelace",
            
        
    
        
        
            
                "scenario_type": "mock_campaign",
            
        
    
        
        
            
                "scenario_description": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "last_run_at": new Date(Date.now()),
            
        
    
    },
    
    {
    
        
        
            
                "scenario_name": "Marie Curie",
            
        
    
        
        
            
                "scenario_type": "policy_stress_test",
            
        
    
        
        
            
                "scenario_description": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "running",
            
        
    
        
        
            
                "last_run_at": new Date(Date.now()),
            
        
    
    },
    
];



const RefreshJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "transcribe",
            
        
    
        
        
            
                "job_status": "completed",
            
        
    
        
        
            
                "scheduled_for": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "job_summary": "Alan Turing",
            
        
    
        
        
            
                "job_log": "Ada Lovelace",
            
        
    
        
        
            
                "approval_required": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "behavioral_science_update",
            
        
    
        
        
            
                "job_status": "awaiting_approval",
            
        
    
        
        
            
                "scheduled_for": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "job_summary": "Ada Lovelace",
            
        
    
        
        
            
                "job_log": "Grace Hopper",
            
        
    
        
        
            
                "approval_required": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "crawl",
            
        
    
        
        
            
                "job_status": "completed",
            
        
    
        
        
            
                "scheduled_for": new Date(Date.now()),
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                "job_summary": "Alan Turing",
            
        
    
        
        
            
                "job_log": "Alan Turing",
            
        
    
        
        
            
                "approval_required": true,
            
        
    
    },
    
];



const ApprovalReviewsData = [
    
    {
    
        
        
            
                "review_target": "refresh_job",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                "decision": "rejected",
            
        
    
        
        
            
                "alignment_score": 2.94,
            
        
    
        
        
            
                "review_notes": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                "review_target": "brain_profile",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                "decision": "rejected",
            
        
    
        
        
            
                "alignment_score": 0.53,
            
        
    
        
        
            
                "review_notes": "Ada Lovelace",
            
        
    
    },
    
    {
    
        
        
            
                "review_target": "skill_module",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                "decision": "approved",
            
        
    
        
        
            
                "alignment_score": 6.83,
            
        
    
        
        
            
                "review_notes": "Ada Lovelace",
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
    
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateBrandVoiceProfileWithBrand() {
            
                const relatedBrand0 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const BrandVoiceProfile0 = await BrandVoiceProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (BrandVoiceProfile0?.setBrand)
                {
                    await
                    BrandVoiceProfile0.
                    setBrand(relatedBrand0);
                }
            
                const relatedBrand1 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const BrandVoiceProfile1 = await BrandVoiceProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (BrandVoiceProfile1?.setBrand)
                {
                    await
                    BrandVoiceProfile1.
                    setBrand(relatedBrand1);
                }
            
                const relatedBrand2 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const BrandVoiceProfile2 = await BrandVoiceProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (BrandVoiceProfile2?.setBrand)
                {
                    await
                    BrandVoiceProfile2.
                    setBrand(relatedBrand2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
            
            async function associateSixHatSessionWithCampaign() {
            
                const relatedCampaign0 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const SixHatSession0 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SixHatSession0?.setCampaign)
                {
                    await
                    SixHatSession0.
                    setCampaign(relatedCampaign0);
                }
            
                const relatedCampaign1 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const SixHatSession1 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SixHatSession1?.setCampaign)
                {
                    await
                    SixHatSession1.
                    setCampaign(relatedCampaign1);
                }
            
                const relatedCampaign2 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const SixHatSession2 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SixHatSession2?.setCampaign)
                {
                    await
                    SixHatSession2.
                    setCampaign(relatedCampaign2);
                }
            
        }
        
    
        
            
            async function associateSixHatSessionWithAd_project() {
            
                const relatedAd_project0 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const SixHatSession0 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SixHatSession0?.setAd_project)
                {
                    await
                    SixHatSession0.
                    setAd_project(relatedAd_project0);
                }
            
                const relatedAd_project1 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const SixHatSession1 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SixHatSession1?.setAd_project)
                {
                    await
                    SixHatSession1.
                    setAd_project(relatedAd_project1);
                }
            
                const relatedAd_project2 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const SixHatSession2 = await SixHatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SixHatSession2?.setAd_project)
                {
                    await
                    SixHatSession2.
                    setAd_project(relatedAd_project2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateKnowledgeDocumentWithKnowledge_source() {
            
                const relatedKnowledge_source0 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const KnowledgeDocument0 = await KnowledgeDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (KnowledgeDocument0?.setKnowledge_source)
                {
                    await
                    KnowledgeDocument0.
                    setKnowledge_source(relatedKnowledge_source0);
                }
            
                const relatedKnowledge_source1 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const KnowledgeDocument1 = await KnowledgeDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (KnowledgeDocument1?.setKnowledge_source)
                {
                    await
                    KnowledgeDocument1.
                    setKnowledge_source(relatedKnowledge_source1);
                }
            
                const relatedKnowledge_source2 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const KnowledgeDocument2 = await KnowledgeDocuments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (KnowledgeDocument2?.setKnowledge_source)
                {
                    await
                    KnowledgeDocument2.
                    setKnowledge_source(relatedKnowledge_source2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateKnowledgeChunkWithKnowledge_document() {
            
                const relatedKnowledge_document0 = await KnowledgeDocuments.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeDocuments.count())),
                });
                const KnowledgeChunk0 = await KnowledgeChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (KnowledgeChunk0?.setKnowledge_document)
                {
                    await
                    KnowledgeChunk0.
                    setKnowledge_document(relatedKnowledge_document0);
                }
            
                const relatedKnowledge_document1 = await KnowledgeDocuments.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeDocuments.count())),
                });
                const KnowledgeChunk1 = await KnowledgeChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (KnowledgeChunk1?.setKnowledge_document)
                {
                    await
                    KnowledgeChunk1.
                    setKnowledge_document(relatedKnowledge_document1);
                }
            
                const relatedKnowledge_document2 = await KnowledgeDocuments.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeDocuments.count())),
                });
                const KnowledgeChunk2 = await KnowledgeChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (KnowledgeChunk2?.setKnowledge_document)
                {
                    await
                    KnowledgeChunk2.
                    setKnowledge_document(relatedKnowledge_document2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
        
            
            async function associateCampaignWithBrand() {
            
                const relatedBrand0 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Campaign0 = await Campaigns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Campaign0?.setBrand)
                {
                    await
                    Campaign0.
                    setBrand(relatedBrand0);
                }
            
                const relatedBrand1 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Campaign1 = await Campaigns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Campaign1?.setBrand)
                {
                    await
                    Campaign1.
                    setBrand(relatedBrand1);
                }
            
                const relatedBrand2 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Campaign2 = await Campaigns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Campaign2?.setBrand)
                {
                    await
                    Campaign2.
                    setBrand(relatedBrand2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateCampaignBrainConfigWithCampaign() {
            
                const relatedCampaign0 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const CampaignBrainConfig0 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CampaignBrainConfig0?.setCampaign)
                {
                    await
                    CampaignBrainConfig0.
                    setCampaign(relatedCampaign0);
                }
            
                const relatedCampaign1 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const CampaignBrainConfig1 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CampaignBrainConfig1?.setCampaign)
                {
                    await
                    CampaignBrainConfig1.
                    setCampaign(relatedCampaign1);
                }
            
                const relatedCampaign2 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const CampaignBrainConfig2 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CampaignBrainConfig2?.setCampaign)
                {
                    await
                    CampaignBrainConfig2.
                    setCampaign(relatedCampaign2);
                }
            
        }
        
    
        
            
            async function associateCampaignBrainConfigWithBrain_profile() {
            
                const relatedBrain_profile0 = await BrainProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrainProfiles.count())),
                });
                const CampaignBrainConfig0 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CampaignBrainConfig0?.setBrain_profile)
                {
                    await
                    CampaignBrainConfig0.
                    setBrain_profile(relatedBrain_profile0);
                }
            
                const relatedBrain_profile1 = await BrainProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrainProfiles.count())),
                });
                const CampaignBrainConfig1 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CampaignBrainConfig1?.setBrain_profile)
                {
                    await
                    CampaignBrainConfig1.
                    setBrain_profile(relatedBrain_profile1);
                }
            
                const relatedBrain_profile2 = await BrainProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrainProfiles.count())),
                });
                const CampaignBrainConfig2 = await CampaignBrainConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CampaignBrainConfig2?.setBrain_profile)
                {
                    await
                    CampaignBrainConfig2.
                    setBrain_profile(relatedBrain_profile2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
            
            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);
                }
            
        }
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAdProjectWithCampaign() {
            
                const relatedCampaign0 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const AdProject0 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AdProject0?.setCampaign)
                {
                    await
                    AdProject0.
                    setCampaign(relatedCampaign0);
                }
            
                const relatedCampaign1 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const AdProject1 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AdProject1?.setCampaign)
                {
                    await
                    AdProject1.
                    setCampaign(relatedCampaign1);
                }
            
                const relatedCampaign2 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const AdProject2 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AdProject2?.setCampaign)
                {
                    await
                    AdProject2.
                    setCampaign(relatedCampaign2);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateAdProjectWithBrand_voice_profile() {
            
                const relatedBrand_voice_profile0 = await BrandVoiceProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrandVoiceProfiles.count())),
                });
                const AdProject0 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AdProject0?.setBrand_voice_profile)
                {
                    await
                    AdProject0.
                    setBrand_voice_profile(relatedBrand_voice_profile0);
                }
            
                const relatedBrand_voice_profile1 = await BrandVoiceProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrandVoiceProfiles.count())),
                });
                const AdProject1 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AdProject1?.setBrand_voice_profile)
                {
                    await
                    AdProject1.
                    setBrand_voice_profile(relatedBrand_voice_profile1);
                }
            
                const relatedBrand_voice_profile2 = await BrandVoiceProfiles.findOne({
                    offset: Math.floor(Math.random() * (await BrandVoiceProfiles.count())),
                });
                const AdProject2 = await AdProjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AdProject2?.setBrand_voice_profile)
                {
                    await
                    AdProject2.
                    setBrand_voice_profile(relatedBrand_voice_profile2);
                }
            
        }
        
    
        
    

    
    
    
        
            
            async function associateAdCreativeWithAd_project() {
            
                const relatedAd_project0 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const AdCreative0 = await AdCreatives.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AdCreative0?.setAd_project)
                {
                    await
                    AdCreative0.
                    setAd_project(relatedAd_project0);
                }
            
                const relatedAd_project1 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const AdCreative1 = await AdCreatives.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AdCreative1?.setAd_project)
                {
                    await
                    AdCreative1.
                    setAd_project(relatedAd_project1);
                }
            
                const relatedAd_project2 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const AdCreative2 = await AdCreatives.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AdCreative2?.setAd_project)
                {
                    await
                    AdCreative2.
                    setAd_project(relatedAd_project2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateGenerationRunWithAd_project() {
            
                const relatedAd_project0 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const GenerationRun0 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GenerationRun0?.setAd_project)
                {
                    await
                    GenerationRun0.
                    setAd_project(relatedAd_project0);
                }
            
                const relatedAd_project1 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const GenerationRun1 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GenerationRun1?.setAd_project)
                {
                    await
                    GenerationRun1.
                    setAd_project(relatedAd_project1);
                }
            
                const relatedAd_project2 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const GenerationRun2 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GenerationRun2?.setAd_project)
                {
                    await
                    GenerationRun2.
                    setAd_project(relatedAd_project2);
                }
            
        }
        
    
        
            
            async function associateGenerationRunWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GenerationRun0 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GenerationRun0?.setRequested_by)
                {
                    await
                    GenerationRun0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GenerationRun1 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GenerationRun1?.setRequested_by)
                {
                    await
                    GenerationRun1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const GenerationRun2 = await GenerationRuns.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GenerationRun2?.setRequested_by)
                {
                    await
                    GenerationRun2.
                    setRequested_by(relatedRequested_by2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateGenerationOutputWithGeneration_run() {
            
                const relatedGeneration_run0 = await GenerationRuns.findOne({
                    offset: Math.floor(Math.random() * (await GenerationRuns.count())),
                });
                const GenerationOutput0 = await GenerationOutputs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (GenerationOutput0?.setGeneration_run)
                {
                    await
                    GenerationOutput0.
                    setGeneration_run(relatedGeneration_run0);
                }
            
                const relatedGeneration_run1 = await GenerationRuns.findOne({
                    offset: Math.floor(Math.random() * (await GenerationRuns.count())),
                });
                const GenerationOutput1 = await GenerationOutputs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (GenerationOutput1?.setGeneration_run)
                {
                    await
                    GenerationOutput1.
                    setGeneration_run(relatedGeneration_run1);
                }
            
                const relatedGeneration_run2 = await GenerationRuns.findOne({
                    offset: Math.floor(Math.random() * (await GenerationRuns.count())),
                });
                const GenerationOutput2 = await GenerationOutputs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (GenerationOutput2?.setGeneration_run)
                {
                    await
                    GenerationOutput2.
                    setGeneration_run(relatedGeneration_run2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateOutputCitationWithGeneration_output() {
            
                const relatedGeneration_output0 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const OutputCitation0 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OutputCitation0?.setGeneration_output)
                {
                    await
                    OutputCitation0.
                    setGeneration_output(relatedGeneration_output0);
                }
            
                const relatedGeneration_output1 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const OutputCitation1 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OutputCitation1?.setGeneration_output)
                {
                    await
                    OutputCitation1.
                    setGeneration_output(relatedGeneration_output1);
                }
            
                const relatedGeneration_output2 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const OutputCitation2 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OutputCitation2?.setGeneration_output)
                {
                    await
                    OutputCitation2.
                    setGeneration_output(relatedGeneration_output2);
                }
            
        }
        
    
        
            
            async function associateOutputCitationWithKnowledge_chunk() {
            
                const relatedKnowledge_chunk0 = await KnowledgeChunks.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeChunks.count())),
                });
                const OutputCitation0 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OutputCitation0?.setKnowledge_chunk)
                {
                    await
                    OutputCitation0.
                    setKnowledge_chunk(relatedKnowledge_chunk0);
                }
            
                const relatedKnowledge_chunk1 = await KnowledgeChunks.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeChunks.count())),
                });
                const OutputCitation1 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OutputCitation1?.setKnowledge_chunk)
                {
                    await
                    OutputCitation1.
                    setKnowledge_chunk(relatedKnowledge_chunk1);
                }
            
                const relatedKnowledge_chunk2 = await KnowledgeChunks.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeChunks.count())),
                });
                const OutputCitation2 = await OutputCitations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OutputCitation2?.setKnowledge_chunk)
                {
                    await
                    OutputCitation2.
                    setKnowledge_chunk(relatedKnowledge_chunk2);
                }
            
        }
        
    
        
    
        
    

    
    
    
        
            
            async function associateFeedbackEntryWithGeneration_output() {
            
                const relatedGeneration_output0 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const FeedbackEntry0 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedbackEntry0?.setGeneration_output)
                {
                    await
                    FeedbackEntry0.
                    setGeneration_output(relatedGeneration_output0);
                }
            
                const relatedGeneration_output1 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const FeedbackEntry1 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedbackEntry1?.setGeneration_output)
                {
                    await
                    FeedbackEntry1.
                    setGeneration_output(relatedGeneration_output1);
                }
            
                const relatedGeneration_output2 = await GenerationOutputs.findOne({
                    offset: Math.floor(Math.random() * (await GenerationOutputs.count())),
                });
                const FeedbackEntry2 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedbackEntry2?.setGeneration_output)
                {
                    await
                    FeedbackEntry2.
                    setGeneration_output(relatedGeneration_output2);
                }
            
        }
        
    
        
            
            async function associateFeedbackEntryWithGiven_by() {
            
                const relatedGiven_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedbackEntry0 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedbackEntry0?.setGiven_by)
                {
                    await
                    FeedbackEntry0.
                    setGiven_by(relatedGiven_by0);
                }
            
                const relatedGiven_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedbackEntry1 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedbackEntry1?.setGiven_by)
                {
                    await
                    FeedbackEntry1.
                    setGiven_by(relatedGiven_by1);
                }
            
                const relatedGiven_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedbackEntry2 = await FeedbackEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedbackEntry2?.setGiven_by)
                {
                    await
                    FeedbackEntry2.
                    setGiven_by(relatedGiven_by2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateLearningSignalWithCampaign() {
            
                const relatedCampaign0 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const LearningSignal0 = await LearningSignals.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (LearningSignal0?.setCampaign)
                {
                    await
                    LearningSignal0.
                    setCampaign(relatedCampaign0);
                }
            
                const relatedCampaign1 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const LearningSignal1 = await LearningSignals.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (LearningSignal1?.setCampaign)
                {
                    await
                    LearningSignal1.
                    setCampaign(relatedCampaign1);
                }
            
                const relatedCampaign2 = await Campaigns.findOne({
                    offset: Math.floor(Math.random() * (await Campaigns.count())),
                });
                const LearningSignal2 = await LearningSignals.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (LearningSignal2?.setCampaign)
                {
                    await
                    LearningSignal2.
                    setCampaign(relatedCampaign2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associatePlatformMetricWithAd_project() {
            
                const relatedAd_project0 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const PlatformMetric0 = await PlatformMetrics.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PlatformMetric0?.setAd_project)
                {
                    await
                    PlatformMetric0.
                    setAd_project(relatedAd_project0);
                }
            
                const relatedAd_project1 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const PlatformMetric1 = await PlatformMetrics.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PlatformMetric1?.setAd_project)
                {
                    await
                    PlatformMetric1.
                    setAd_project(relatedAd_project1);
                }
            
                const relatedAd_project2 = await AdProjects.findOne({
                    offset: Math.floor(Math.random() * (await AdProjects.count())),
                });
                const PlatformMetric2 = await PlatformMetrics.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PlatformMetric2?.setAd_project)
                {
                    await
                    PlatformMetric2.
                    setAd_project(relatedAd_project2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
            
            async function associateSandboxScenarioWithCampaign_brain_config() {
            
                const relatedCampaign_brain_config0 = await CampaignBrainConfigs.findOne({
                    offset: Math.floor(Math.random() * (await CampaignBrainConfigs.count())),
                });
                const SandboxScenario0 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SandboxScenario0?.setCampaign_brain_config)
                {
                    await
                    SandboxScenario0.
                    setCampaign_brain_config(relatedCampaign_brain_config0);
                }
            
                const relatedCampaign_brain_config1 = await CampaignBrainConfigs.findOne({
                    offset: Math.floor(Math.random() * (await CampaignBrainConfigs.count())),
                });
                const SandboxScenario1 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SandboxScenario1?.setCampaign_brain_config)
                {
                    await
                    SandboxScenario1.
                    setCampaign_brain_config(relatedCampaign_brain_config1);
                }
            
                const relatedCampaign_brain_config2 = await CampaignBrainConfigs.findOne({
                    offset: Math.floor(Math.random() * (await CampaignBrainConfigs.count())),
                });
                const SandboxScenario2 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SandboxScenario2?.setCampaign_brain_config)
                {
                    await
                    SandboxScenario2.
                    setCampaign_brain_config(relatedCampaign_brain_config2);
                }
            
        }
        
    
        
            
            async function associateSandboxScenarioWithSafety_policy() {
            
                const relatedSafety_policy0 = await SafetyPolicies.findOne({
                    offset: Math.floor(Math.random() * (await SafetyPolicies.count())),
                });
                const SandboxScenario0 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SandboxScenario0?.setSafety_policy)
                {
                    await
                    SandboxScenario0.
                    setSafety_policy(relatedSafety_policy0);
                }
            
                const relatedSafety_policy1 = await SafetyPolicies.findOne({
                    offset: Math.floor(Math.random() * (await SafetyPolicies.count())),
                });
                const SandboxScenario1 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SandboxScenario1?.setSafety_policy)
                {
                    await
                    SandboxScenario1.
                    setSafety_policy(relatedSafety_policy1);
                }
            
                const relatedSafety_policy2 = await SafetyPolicies.findOne({
                    offset: Math.floor(Math.random() * (await SafetyPolicies.count())),
                });
                const SandboxScenario2 = await SandboxScenarios.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SandboxScenario2?.setSafety_policy)
                {
                    await
                    SandboxScenario2.
                    setSafety_policy(relatedSafety_policy2);
                }
            
        }
        
    
        
    
        
    

    
    
    
        
            
            async function associateRefreshJobWithKnowledge_source() {
            
                const relatedKnowledge_source0 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const RefreshJob0 = await RefreshJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (RefreshJob0?.setKnowledge_source)
                {
                    await
                    RefreshJob0.
                    setKnowledge_source(relatedKnowledge_source0);
                }
            
                const relatedKnowledge_source1 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const RefreshJob1 = await RefreshJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (RefreshJob1?.setKnowledge_source)
                {
                    await
                    RefreshJob1.
                    setKnowledge_source(relatedKnowledge_source1);
                }
            
                const relatedKnowledge_source2 = await KnowledgeSources.findOne({
                    offset: Math.floor(Math.random() * (await KnowledgeSources.count())),
                });
                const RefreshJob2 = await RefreshJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (RefreshJob2?.setKnowledge_source)
                {
                    await
                    RefreshJob2.
                    setKnowledge_source(relatedKnowledge_source2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
            
            async function associateApprovalReviewWithReviewed_by() {
            
                const relatedReviewed_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ApprovalReview0 = await ApprovalReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ApprovalReview0?.setReviewed_by)
                {
                    await
                    ApprovalReview0.
                    setReviewed_by(relatedReviewed_by0);
                }
            
                const relatedReviewed_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ApprovalReview1 = await ApprovalReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ApprovalReview1?.setReviewed_by)
                {
                    await
                    ApprovalReview1.
                    setReviewed_by(relatedReviewed_by1);
                }
            
                const relatedReviewed_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ApprovalReview2 = await ApprovalReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ApprovalReview2?.setReviewed_by)
                {
                    await
                    ApprovalReview2.
                    setReviewed_by(relatedReviewed_by2);
                }
            
        }
        
    
        
    
        
    
        
    
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Brands.bulkCreate(BrandsData);
                
            
            
                
                await BrandVoiceProfiles.bulkCreate(BrandVoiceProfilesData);
                
            
            
                
                await BrainProfiles.bulkCreate(BrainProfilesData);
                
            
            
                
                await SkillModules.bulkCreate(SkillModulesData);
                
            
            
                
                await SixHatSessions.bulkCreate(SixHatSessionsData);
                
            
            
                
                await KnowledgeSources.bulkCreate(KnowledgeSourcesData);
                
            
            
                
                await KnowledgeDocuments.bulkCreate(KnowledgeDocumentsData);
                
            
            
                
                await KnowledgeChunks.bulkCreate(KnowledgeChunksData);
                
            
            
                
                await KnowledgeNodes.bulkCreate(KnowledgeNodesData);
                
            
            
                
                await Campaigns.bulkCreate(CampaignsData);
                
            
            
                
                await CampaignBrainConfigs.bulkCreate(CampaignBrainConfigsData);
                
            
            
                
                await SafetyPolicies.bulkCreate(SafetyPoliciesData);
                
            
            
                
                await AuditEvents.bulkCreate(AuditEventsData);
                
            
            
                
                await AdProjects.bulkCreate(AdProjectsData);
                
            
            
                
                await AdCreatives.bulkCreate(AdCreativesData);
                
            
            
                
                await GenerationRuns.bulkCreate(GenerationRunsData);
                
            
            
                
                await GenerationOutputs.bulkCreate(GenerationOutputsData);
                
            
            
                
                await OutputCitations.bulkCreate(OutputCitationsData);
                
            
            
                
                await FeedbackEntries.bulkCreate(FeedbackEntriesData);
                
            
            
                
                await LearningSignals.bulkCreate(LearningSignalsData);
                
            
            
                
                await PlatformMetrics.bulkCreate(PlatformMetricsData);
                
            
            
                
                await SandboxScenarios.bulkCreate(SandboxScenariosData);
                
            
            
                
                await RefreshJobs.bulkCreate(RefreshJobsData);
                
            
            
                
                await ApprovalReviews.bulkCreate(ApprovalReviewsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateBrandVoiceProfileWithBrand(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                        
                        await associateSixHatSessionWithCampaign(),
                    
                
                    
                        
                        await associateSixHatSessionWithAd_project(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateKnowledgeDocumentWithKnowledge_source(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateKnowledgeChunkWithKnowledge_document(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                    
                        
                        await associateCampaignWithBrand(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCampaignBrainConfigWithCampaign(),
                    
                
                    
                        
                        await associateCampaignBrainConfigWithBrain_profile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                        
                        await associateAuditEventWithActor(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAdProjectWithCampaign(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAdProjectWithBrand_voice_profile(),
                    
                
                    
                
            
                
                
                    
                        
                        await associateAdCreativeWithAd_project(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateGenerationRunWithAd_project(),
                    
                
                    
                        
                        await associateGenerationRunWithRequested_by(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateGenerationOutputWithGeneration_run(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateOutputCitationWithGeneration_output(),
                    
                
                    
                        
                        await associateOutputCitationWithKnowledge_chunk(),
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateFeedbackEntryWithGeneration_output(),
                    
                
                    
                        
                        await associateFeedbackEntryWithGiven_by(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateLearningSignalWithCampaign(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePlatformMetricWithAd_project(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSandboxScenarioWithCampaign_brain_config(),
                    
                
                    
                        
                        await associateSandboxScenarioWithSafety_policy(),
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateRefreshJobWithKnowledge_source(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                        
                        await associateApprovalReviewWithReviewed_by(),
                    
                
                    
                
                    
                
                    
                
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('brands', null, {});
            
            
            await queryInterface.bulkDelete('brand_voice_profiles', null, {});
            
            
            await queryInterface.bulkDelete('brain_profiles', null, {});
            
            
            await queryInterface.bulkDelete('skill_modules', null, {});
            
            
            await queryInterface.bulkDelete('six_hat_sessions', null, {});
            
            
            await queryInterface.bulkDelete('knowledge_sources', null, {});
            
            
            await queryInterface.bulkDelete('knowledge_documents', null, {});
            
            
            await queryInterface.bulkDelete('knowledge_chunks', null, {});
            
            
            await queryInterface.bulkDelete('knowledge_nodes', null, {});
            
            
            await queryInterface.bulkDelete('campaigns', null, {});
            
            
            await queryInterface.bulkDelete('campaign_brain_configs', null, {});
            
            
            await queryInterface.bulkDelete('safety_policies', null, {});
            
            
            await queryInterface.bulkDelete('audit_events', null, {});
            
            
            await queryInterface.bulkDelete('ad_projects', null, {});
            
            
            await queryInterface.bulkDelete('ad_creatives', null, {});
            
            
            await queryInterface.bulkDelete('generation_runs', null, {});
            
            
            await queryInterface.bulkDelete('generation_outputs', null, {});
            
            
            await queryInterface.bulkDelete('output_citations', null, {});
            
            
            await queryInterface.bulkDelete('feedback_entries', null, {});
            
            
            await queryInterface.bulkDelete('learning_signals', null, {});
            
            
            await queryInterface.bulkDelete('platform_metrics', null, {});
            
            
            await queryInterface.bulkDelete('sandbox_scenarios', null, {});
            
            
            await queryInterface.bulkDelete('refresh_jobs', null, {});
            
            
            await queryInterface.bulkDelete('approval_reviews', null, {});
            
        
    },
};