





















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






const Organizations = db.organizations;

const Workspaces = db.workspaces;

const WorkspaceMemberships = db.workspace_memberships;

const Subjects = db.subjects;

const Topics = db.topics;

const Pages = db.pages;

const Blocks = db.blocks;

const Databases = db.databases;

const DatabaseEntries = db.database_entries;

const Sources = db.sources;

const SourceChunks = db.source_chunks;

const AiJobs = db.ai_jobs;

const ConceptMaps = db.concept_maps;

const StudyGuides = db.study_guides;

const FlashcardDecks = db.flashcard_decks;

const Flashcards = db.flashcards;

const SpacedRepetitionStates = db.spaced_repetition_states;

const StudySessions = db.study_sessions;

const ReviewEvents = db.review_events;

const Quizzes = db.quizzes;

const QuizQuestions = db.quiz_questions;

const QuizAttempts = db.quiz_attempts;

const TutorConversations = db.tutor_conversations;

const TutorMessages = db.tutor_messages;

const StudyPlans = db.study_plans;

const StudyPlanItems = db.study_plan_items;

const DashboardSnapshots = db.dashboard_snapshots;







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



const WorkspacesData = [
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "slug": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "workspace_type": "personal",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "theme_preset": "minimal_dark",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "slug": "Alan Turing",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "workspace_type": "organization",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "theme_preset": "holographic",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "slug": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "workspace_type": "organization",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "theme_preset": "electric_blue",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "slug": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "workspace_type": "personal",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "theme_preset": "minimal_dark",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "slug": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "workspace_type": "organization",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "theme_preset": "electric_blue",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const WorkspaceMembershipsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role": "viewer",
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role": "editor",
            
        
    
        
        
            
                "status": "invited",
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role": "viewer",
            
        
    
        
        
            
                "status": "invited",
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role": "admin",
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "role": "owner",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "joined_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SubjectsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color_hex": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color_hex": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "color_hex": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "color_hex": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "color_hex": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TopicsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "icon_emoji": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "visibility": "workspace",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "icon_emoji": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "visibility": "public_link",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "icon_emoji": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "visibility": "private",
            
        
    
        
        
            
                "is_pinned": false,
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "icon_emoji": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "visibility": "public_link",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "icon_emoji": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "visibility": "public_link",
            
        
    
        
        
            
                "is_pinned": true,
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_edited_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const BlocksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "block_type": "bulleted_list",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "text_content": "Grace Hopper",
            
        
    
        
        
            
                "code_language": "Alan Turing",
            
        
    
        
        
            
                "link_url": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 7,
            
        
    
        
        
            
                "is_collapsed": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "block_type": "pdf",
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "text_content": "Grace Hopper",
            
        
    
        
        
            
                "code_language": "Grace Hopper",
            
        
    
        
        
            
                "link_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 6,
            
        
    
        
        
            
                "is_collapsed": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "block_type": "code",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "text_content": "Marie Curie",
            
        
    
        
        
            
                "code_language": "Alan Turing",
            
        
    
        
        
            
                "link_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                "is_collapsed": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "block_type": "text",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "text_content": "Marie Curie",
            
        
    
        
        
            
                "code_language": "Ada Lovelace",
            
        
    
        
        
            
                "link_url": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 4,
            
        
    
        
        
            
                "is_collapsed": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "block_type": "link",
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "text_content": "Ada Lovelace",
            
        
    
        
        
            
                "code_language": "Marie Curie",
            
        
    
        
        
            
                "link_url": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 9,
            
        
    
        
        
            
                "is_collapsed": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DatabasesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "database_kind": "resources",
            
        
    
        
        
            
                "default_view": "kanban",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Marie Curie",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "database_kind": "study_materials",
            
        
    
        
        
            
                "default_view": "list",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "database_kind": "notes",
            
        
    
        
        
            
                "default_view": "card",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "database_kind": "custom",
            
        
    
        
        
            
                "default_view": "kanban",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "database_kind": "notes",
            
        
    
        
        
            
                "default_view": "kanban",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DatabaseEntriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "summary": "Marie Curie",
            
        
    
        
        
            
                "content_type": "other",
            
        
    
        
        
            
                "status": "needs_review",
            
        
    
        
        
            
                "studied_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_review_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_retention": 3.38,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "summary": "Ada Lovelace",
            
        
    
        
        
            
                "content_type": "video",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "studied_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_review_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_retention": 9.55,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "summary": "Marie Curie",
            
        
    
        
        
            
                "content_type": "code",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "studied_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_review_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_retention": 2.71,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "summary": "Alan Turing",
            
        
    
        
        
            
                "content_type": "audio",
            
        
    
        
        
            
                "status": "needs_review",
            
        
    
        
        
            
                "studied_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_review_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_retention": 1.0,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "summary": "Marie Curie",
            
        
    
        
        
            
                "content_type": "audio",
            
        
    
        
        
            
                "status": "ready",
            
        
    
        
        
            
                "studied_at": new Date(Date.now()),
            
        
    
        
        
            
                "next_review_at": new Date(Date.now()),
            
        
    
        
        
            
                "estimated_retention": 8.9,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SourcesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source_type": "image",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source_type": "note",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "error_message": "Grace Hopper",
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source_type": "image",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source_type": "pdf",
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "source_url": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "ingestion_status": "processing",
            
        
    
        
        
            
                "error_message": "Grace Hopper",
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "source_type": "image",
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "source_url": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "ingestion_status": "failed",
            
        
    
        
        
            
                "error_message": "Ada Lovelace",
            
        
    
        
        
            
                "ingested_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SourceChunksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_index": 9,
            
        
    
        
        
            
                "chunk_text": "Marie Curie",
            
        
    
        
        
            
                "token_count_estimate": 8.04,
            
        
    
        
        
            
                "embedding_provider": "Alan Turing",
            
        
    
        
        
            
                "embedding_model": "Alan Turing",
            
        
    
        
        
            
                "chunk_kind": "caption",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_index": 5,
            
        
    
        
        
            
                "chunk_text": "Grace Hopper",
            
        
    
        
        
            
                "token_count_estimate": 7.85,
            
        
    
        
        
            
                "embedding_provider": "Ada Lovelace",
            
        
    
        
        
            
                "embedding_model": "Alan Turing",
            
        
    
        
        
            
                "chunk_kind": "text",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_index": 6,
            
        
    
        
        
            
                "chunk_text": "Grace Hopper",
            
        
    
        
        
            
                "token_count_estimate": 7.42,
            
        
    
        
        
            
                "embedding_provider": "Grace Hopper",
            
        
    
        
        
            
                "embedding_model": "Grace Hopper",
            
        
    
        
        
            
                "chunk_kind": "code",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_index": 6,
            
        
    
        
        
            
                "chunk_text": "Marie Curie",
            
        
    
        
        
            
                "token_count_estimate": 0.41,
            
        
    
        
        
            
                "embedding_provider": "Alan Turing",
            
        
    
        
        
            
                "embedding_model": "Ada Lovelace",
            
        
    
        
        
            
                "chunk_kind": "text",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "chunk_index": 8,
            
        
    
        
        
            
                "chunk_text": "Ada Lovelace",
            
        
    
        
        
            
                "token_count_estimate": 3.96,
            
        
    
        
        
            
                "embedding_provider": "Marie Curie",
            
        
    
        
        
            
                "embedding_model": "Grace Hopper",
            
        
    
        
        
            
                "chunk_kind": "table",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AiJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "generate_exercises",
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "provider": "Grace Hopper",
            
        
    
        
        
            
                "model": "Grace Hopper",
            
        
    
        
        
            
                "cost_estimate": 9.71,
            
        
    
        
        
            
                "error_details": "Ada Lovelace",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "generate_exercises",
            
        
    
        
        
            
                "status": "running",
            
        
    
        
        
            
                "provider": "Ada Lovelace",
            
        
    
        
        
            
                "model": "Alan Turing",
            
        
    
        
        
            
                "cost_estimate": 9.74,
            
        
    
        
        
            
                "error_details": "Grace Hopper",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "generate_quiz",
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "provider": "Marie Curie",
            
        
    
        
        
            
                "model": "Alan Turing",
            
        
    
        
        
            
                "cost_estimate": 6.29,
            
        
    
        
        
            
                "error_details": "Grace Hopper",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "summarize",
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "provider": "Ada Lovelace",
            
        
    
        
        
            
                "model": "Ada Lovelace",
            
        
    
        
        
            
                "cost_estimate": 1.28,
            
        
    
        
        
            
                "error_details": "Alan Turing",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "summarize",
            
        
    
        
        
            
                "status": "canceled",
            
        
    
        
        
            
                "provider": "Grace Hopper",
            
        
    
        
        
            
                "model": "Ada Lovelace",
            
        
    
        
        
            
                "cost_estimate": 1.06,
            
        
    
        
        
            
                "error_details": "Alan Turing",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "finished_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ConceptMapsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "map_data_json": "Alan Turing",
            
        
    
        
        
            
                "format": "json",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "map_data_json": "Grace Hopper",
            
        
    
        
        
            
                "format": "graphviz",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "map_data_json": "Grace Hopper",
            
        
    
        
        
            
                "format": "json",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "map_data_json": "Grace Hopper",
            
        
    
        
        
            
                "format": "mermaid",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "map_data_json": "Grace Hopper",
            
        
    
        
        
            
                "format": "graphviz",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StudyGuidesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                "difficulty_level": "advanced",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "content": "Marie Curie",
            
        
    
        
        
            
                "difficulty_level": "advanced",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                "difficulty_level": "intro",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                "difficulty_level": "advanced",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "content": "Alan Turing",
            
        
    
        
        
            
                "difficulty_level": "intro",
            
        
    
        
        
            
                "generated_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FlashcardDecksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Grace Hopper",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "deck_visibility": "private",
            
        
    
        
        
            
                "generation_mode": "mixed",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "deck_visibility": "private",
            
        
    
        
        
            
                "generation_mode": "ai_generated",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "deck_visibility": "private",
            
        
    
        
        
            
                "generation_mode": "ai_generated",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "deck_visibility": "private",
            
        
    
        
        
            
                "generation_mode": "mixed",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                "deck_visibility": "public_link",
            
        
    
        
        
            
                "generation_mode": "manual",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FlashcardsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "front": "Ada Lovelace",
            
        
    
        
        
            
                "back": "Grace Hopper",
            
        
    
        
        
            
                "hint": "Alan Turing",
            
        
    
        
        
            
                "card_type": "cloze",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 6,
            
        
    
        
        
            
                "is_suspended": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "front": "Ada Lovelace",
            
        
    
        
        
            
                "back": "Grace Hopper",
            
        
    
        
        
            
                "hint": "Grace Hopper",
            
        
    
        
        
            
                "card_type": "basic",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                "is_suspended": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "front": "Ada Lovelace",
            
        
    
        
        
            
                "back": "Ada Lovelace",
            
        
    
        
        
            
                "hint": "Ada Lovelace",
            
        
    
        
        
            
                "card_type": "basic",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 5,
            
        
    
        
        
            
                "is_suspended": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "front": "Ada Lovelace",
            
        
    
        
        
            
                "back": "Ada Lovelace",
            
        
    
        
        
            
                "hint": "Alan Turing",
            
        
    
        
        
            
                "card_type": "basic",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                "is_suspended": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "front": "Marie Curie",
            
        
    
        
        
            
                "back": "Marie Curie",
            
        
    
        
        
            
                "hint": "Alan Turing",
            
        
    
        
        
            
                "card_type": "basic",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 6,
            
        
    
        
        
            
                "is_suspended": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SpacedRepetitionStatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "algorithm": "sm2",
            
        
    
        
        
            
                "repetitions": 7,
            
        
    
        
        
            
                "lapses": 7,
            
        
    
        
        
            
                "ease_factor": 6.11,
            
        
    
        
        
            
                "interval_days": 9,
            
        
    
        
        
            
                "stability": 6.18,
            
        
    
        
        
            
                "difficulty": 1.95,
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "last_reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "algorithm": "sm2",
            
        
    
        
        
            
                "repetitions": 2,
            
        
    
        
        
            
                "lapses": 3,
            
        
    
        
        
            
                "ease_factor": 3.18,
            
        
    
        
        
            
                "interval_days": 9,
            
        
    
        
        
            
                "stability": 5.21,
            
        
    
        
        
            
                "difficulty": 9.98,
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "last_reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "algorithm": "leitner",
            
        
    
        
        
            
                "repetitions": 5,
            
        
    
        
        
            
                "lapses": 9,
            
        
    
        
        
            
                "ease_factor": 7.95,
            
        
    
        
        
            
                "interval_days": 5,
            
        
    
        
        
            
                "stability": 0.5,
            
        
    
        
        
            
                "difficulty": 7.43,
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "last_reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "algorithm": "sm2",
            
        
    
        
        
            
                "repetitions": 7,
            
        
    
        
        
            
                "lapses": 9,
            
        
    
        
        
            
                "ease_factor": 3.91,
            
        
    
        
        
            
                "interval_days": 8,
            
        
    
        
        
            
                "stability": 1.65,
            
        
    
        
        
            
                "difficulty": 9.74,
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "last_reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "algorithm": "fsrs_v4",
            
        
    
        
        
            
                "repetitions": 7,
            
        
    
        
        
            
                "lapses": 5,
            
        
    
        
        
            
                "ease_factor": 9.11,
            
        
    
        
        
            
                "interval_days": 3,
            
        
    
        
        
            
                "stability": 8.8,
            
        
    
        
        
            
                "difficulty": 4.11,
            
        
    
        
        
            
                "due_at": new Date(Date.now()),
            
        
    
        
        
            
                "last_reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StudySessionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "mode": "focus",
            
        
    
        
        
            
                "session_type": "pomodoro",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_seconds": 1,
            
        
    
        
        
            
                "distraction_block_enabled": true,
            
        
    
        
        
            
                "music_mode": "white_noise",
            
        
    
        
        
            
                "focus_score": 3.45,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "mode": "focus",
            
        
    
        
        
            
                "session_type": "quick_review",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_seconds": 4,
            
        
    
        
        
            
                "distraction_block_enabled": false,
            
        
    
        
        
            
                "music_mode": "white_noise",
            
        
    
        
        
            
                "focus_score": 2.17,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "mode": "review",
            
        
    
        
        
            
                "session_type": "quick_review",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_seconds": 3,
            
        
    
        
        
            
                "distraction_block_enabled": false,
            
        
    
        
        
            
                "music_mode": "ambient",
            
        
    
        
        
            
                "focus_score": 4.54,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "mode": "review",
            
        
    
        
        
            
                "session_type": "quick_review",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_seconds": 6,
            
        
    
        
        
            
                "distraction_block_enabled": true,
            
        
    
        
        
            
                "music_mode": "off",
            
        
    
        
        
            
                "focus_score": 1.69,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "mode": "challenge",
            
        
    
        
        
            
                "session_type": "deep_work",
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "ended_at": new Date(Date.now()),
            
        
    
        
        
            
                "duration_seconds": 9,
            
        
    
        
        
            
                "distraction_block_enabled": false,
            
        
    
        
        
            
                "music_mode": "white_noise",
            
        
    
        
        
            
                "focus_score": 9.7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ReviewEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": "good",
            
        
    
        
        
            
                "response_time_ms": 8,
            
        
    
        
        
            
                "is_correct": false,
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": "hard",
            
        
    
        
        
            
                "response_time_ms": 3,
            
        
    
        
        
            
                "is_correct": true,
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": "easy",
            
        
    
        
        
            
                "response_time_ms": 4,
            
        
    
        
        
            
                "is_correct": false,
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": "again",
            
        
    
        
        
            
                "response_time_ms": 5,
            
        
    
        
        
            
                "is_correct": true,
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": "again",
            
        
    
        
        
            
                "response_time_ms": 6,
            
        
    
        
        
            
                "is_correct": true,
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const QuizzesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "quiz_type": "quiz",
            
        
    
        
        
            
                "difficulty_level": "advanced",
            
        
    
        
        
            
                "time_limit_minutes": 5,
            
        
    
        
        
            
                "is_published": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "quiz_type": "open_questions",
            
        
    
        
        
            
                "difficulty_level": "intro",
            
        
    
        
        
            
                "time_limit_minutes": 5,
            
        
    
        
        
            
                "is_published": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "quiz_type": "open_questions",
            
        
    
        
        
            
                "difficulty_level": "intro",
            
        
    
        
        
            
                "time_limit_minutes": 8,
            
        
    
        
        
            
                "is_published": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "quiz_type": "exercises",
            
        
    
        
        
            
                "difficulty_level": "intermediate",
            
        
    
        
        
            
                "time_limit_minutes": 4,
            
        
    
        
        
            
                "is_published": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "quiz_type": "exercises",
            
        
    
        
        
            
                "difficulty_level": "advanced",
            
        
    
        
        
            
                "time_limit_minutes": 6,
            
        
    
        
        
            
                "is_published": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const QuizQuestionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question_type": "true_false",
            
        
    
        
        
            
                "prompt": "Ada Lovelace",
            
        
    
        
        
            
                "choices_json": "Alan Turing",
            
        
    
        
        
            
                "correct_answer": "Alan Turing",
            
        
    
        
        
            
                "explanation": "Ada Lovelace",
            
        
    
        
        
            
                "points": 8,
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question_type": "short_answer",
            
        
    
        
        
            
                "prompt": "Grace Hopper",
            
        
    
        
        
            
                "choices_json": "Ada Lovelace",
            
        
    
        
        
            
                "correct_answer": "Grace Hopper",
            
        
    
        
        
            
                "explanation": "Marie Curie",
            
        
    
        
        
            
                "points": 7,
            
        
    
        
        
            
                "sort_order": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question_type": "short_answer",
            
        
    
        
        
            
                "prompt": "Grace Hopper",
            
        
    
        
        
            
                "choices_json": "Alan Turing",
            
        
    
        
        
            
                "correct_answer": "Ada Lovelace",
            
        
    
        
        
            
                "explanation": "Marie Curie",
            
        
    
        
        
            
                "points": 2,
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question_type": "true_false",
            
        
    
        
        
            
                "prompt": "Alan Turing",
            
        
    
        
        
            
                "choices_json": "Grace Hopper",
            
        
    
        
        
            
                "correct_answer": "Grace Hopper",
            
        
    
        
        
            
                "explanation": "Grace Hopper",
            
        
    
        
        
            
                "points": 4,
            
        
    
        
        
            
                "sort_order": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question_type": "open_ended",
            
        
    
        
        
            
                "prompt": "Alan Turing",
            
        
    
        
        
            
                "choices_json": "Ada Lovelace",
            
        
    
        
        
            
                "correct_answer": "Marie Curie",
            
        
    
        
        
            
                "explanation": "Grace Hopper",
            
        
    
        
        
            
                "points": 4,
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const QuizAttemptsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "score_percent": 4.02,
            
        
    
        
        
            
                "correct_count": 5,
            
        
    
        
        
            
                "total_count": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "score_percent": 8.9,
            
        
    
        
        
            
                "correct_count": 6,
            
        
    
        
        
            
                "total_count": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "score_percent": 7.62,
            
        
    
        
        
            
                "correct_count": 9,
            
        
    
        
        
            
                "total_count": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "score_percent": 5.31,
            
        
    
        
        
            
                "correct_count": 8,
            
        
    
        
        
            
                "total_count": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date(Date.now()),
            
        
    
        
        
            
                "submitted_at": new Date(Date.now()),
            
        
    
        
        
            
                "score_percent": 8.44,
            
        
    
        
        
            
                "correct_count": 4,
            
        
    
        
        
            
                "total_count": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TutorConversationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "tutor_mode": "socratic",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_message_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "tutor_mode": "debugging",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_message_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "tutor_mode": "socratic",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_message_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "tutor_mode": "debugging",
            
        
    
        
        
            
                "is_archived": false,
            
        
    
        
        
            
                "last_message_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "tutor_mode": "explain_like_im_5",
            
        
    
        
        
            
                "is_archived": true,
            
        
    
        
        
            
                "last_message_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TutorMessagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "assistant",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                "citations_json": "Grace Hopper",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "assistant",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                "citations_json": "Ada Lovelace",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "assistant",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                "citations_json": "Marie Curie",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "user",
            
        
    
        
        
            
                "content": "Ada Lovelace",
            
        
    
        
        
            
                "citations_json": "Marie Curie",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender": "user",
            
        
    
        
        
            
                "content": "Grace Hopper",
            
        
    
        
        
            
                "citations_json": "Marie Curie",
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StudyPlansData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "goal": "Alan Turing",
            
        
    
        
        
            
                "start_date": new Date(Date.now()),
            
        
    
        
        
            
                "end_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "target_hours_per_week": 5.57,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "goal": "Grace Hopper",
            
        
    
        
        
            
                "start_date": new Date(Date.now()),
            
        
    
        
        
            
                "end_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "target_hours_per_week": 8.64,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "goal": "Marie Curie",
            
        
    
        
        
            
                "start_date": new Date(Date.now()),
            
        
    
        
        
            
                "end_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "target_hours_per_week": 0.79,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "goal": "Marie Curie",
            
        
    
        
        
            
                "start_date": new Date(Date.now()),
            
        
    
        
        
            
                "end_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "target_hours_per_week": 6.78,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "goal": "Grace Hopper",
            
        
    
        
        
            
                "start_date": new Date(Date.now()),
            
        
    
        
        
            
                "end_date": new Date(Date.now()),
            
        
    
        
        
            
                "status": "paused",
            
        
    
        
        
            
                "target_hours_per_week": 0.67,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StudyPlanItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "item_type": "quiz",
            
        
    
        
        
            
                "scheduled_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "scheduled_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "done",
            
        
    
        
        
            
                "estimated_minutes": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Ada Lovelace",
            
        
    
        
        
            
                "item_type": "quiz",
            
        
    
        
        
            
                "scheduled_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "scheduled_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "estimated_minutes": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Alan Turing",
            
        
    
        
        
            
                "item_type": "watch",
            
        
    
        
        
            
                "scheduled_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "scheduled_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "skipped",
            
        
    
        
        
            
                "estimated_minutes": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Grace Hopper",
            
        
    
        
        
            
                "item_type": "project",
            
        
    
        
        
            
                "scheduled_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "scheduled_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "in_progress",
            
        
    
        
        
            
                "estimated_minutes": 7,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Marie Curie",
            
        
    
        
        
            
                "item_type": "practice",
            
        
    
        
        
            
                "scheduled_start_at": new Date(Date.now()),
            
        
    
        
        
            
                "scheduled_end_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "done",
            
        
    
        
        
            
                "estimated_minutes": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DashboardSnapshotsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date(Date.now()),
            
        
    
        
        
            
                "study_hours_last_7d": 4.1,
            
        
    
        
        
            
                "study_hours_last_30d": 4.87,
            
        
    
        
        
            
                "retention_estimate": 3.62,
            
        
    
        
        
            
                "test_performance_avg": 6.92,
            
        
    
        
        
            
                "cards_due_count": 6,
            
        
    
        
        
            
                "streak_days": 8,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date(Date.now()),
            
        
    
        
        
            
                "study_hours_last_7d": 7.05,
            
        
    
        
        
            
                "study_hours_last_30d": 8.31,
            
        
    
        
        
            
                "retention_estimate": 0.61,
            
        
    
        
        
            
                "test_performance_avg": 6.53,
            
        
    
        
        
            
                "cards_due_count": 3,
            
        
    
        
        
            
                "streak_days": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date(Date.now()),
            
        
    
        
        
            
                "study_hours_last_7d": 1.0,
            
        
    
        
        
            
                "study_hours_last_30d": 1.56,
            
        
    
        
        
            
                "retention_estimate": 7.22,
            
        
    
        
        
            
                "test_performance_avg": 1.81,
            
        
    
        
        
            
                "cards_due_count": 6,
            
        
    
        
        
            
                "streak_days": 5,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date(Date.now()),
            
        
    
        
        
            
                "study_hours_last_7d": 6.37,
            
        
    
        
        
            
                "study_hours_last_30d": 1.59,
            
        
    
        
        
            
                "retention_estimate": 8.49,
            
        
    
        
        
            
                "test_performance_avg": 2.71,
            
        
    
        
        
            
                "cards_due_count": 4,
            
        
    
        
        
            
                "streak_days": 9,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "snapshot_at": new Date(Date.now()),
            
        
    
        
        
            
                "study_hours_last_7d": 3.02,
            
        
    
        
        
            
                "study_hours_last_30d": 8.95,
            
        
    
        
        
            
                "retention_estimate": 4.16,
            
        
    
        
        
            
                "test_performance_avg": 4.56,
            
        
    
        
        
            
                "cards_due_count": 2,
            
        
    
        
        
            
                "streak_days": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];




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

    
    
    
    
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
            
            async function associateWorkspaceWithOwner() {
            
                const relatedOwner0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Workspace0 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Workspace0?.setOwner)
                {
                    await
                    Workspace0.
                    setOwner(relatedOwner0);
                }
            
                const relatedOwner1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Workspace1 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Workspace1?.setOwner)
                {
                    await
                    Workspace1.
                    setOwner(relatedOwner1);
                }
            
                const relatedOwner2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Workspace2 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Workspace2?.setOwner)
                {
                    await
                    Workspace2.
                    setOwner(relatedOwner2);
                }
            
                const relatedOwner3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Workspace3 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Workspace3?.setOwner)
                {
                    await
                    Workspace3.
                    setOwner(relatedOwner3);
                }
            
                const relatedOwner4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Workspace4 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Workspace4?.setOwner)
                {
                    await
                    Workspace4.
                    setOwner(relatedOwner4);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateWorkspaceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Workspace0 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Workspace0?.setOrganization)
                {
                    await
                    Workspace0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Workspace1 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Workspace1?.setOrganization)
                {
                    await
                    Workspace1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Workspace2 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Workspace2?.setOrganization)
                {
                    await
                    Workspace2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Workspace3 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Workspace3?.setOrganization)
                {
                    await
                    Workspace3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Workspace4 = await Workspaces.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Workspace4?.setOrganization)
                {
                    await
                    Workspace4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateWorkspaceMembershipWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const WorkspaceMembership0 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WorkspaceMembership0?.setWorkspace)
                {
                    await
                    WorkspaceMembership0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const WorkspaceMembership1 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WorkspaceMembership1?.setWorkspace)
                {
                    await
                    WorkspaceMembership1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const WorkspaceMembership2 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WorkspaceMembership2?.setWorkspace)
                {
                    await
                    WorkspaceMembership2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const WorkspaceMembership3 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WorkspaceMembership3?.setWorkspace)
                {
                    await
                    WorkspaceMembership3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const WorkspaceMembership4 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (WorkspaceMembership4?.setWorkspace)
                {
                    await
                    WorkspaceMembership4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateWorkspaceMembershipWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WorkspaceMembership0 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WorkspaceMembership0?.setUser)
                {
                    await
                    WorkspaceMembership0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WorkspaceMembership1 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WorkspaceMembership1?.setUser)
                {
                    await
                    WorkspaceMembership1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WorkspaceMembership2 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WorkspaceMembership2?.setUser)
                {
                    await
                    WorkspaceMembership2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WorkspaceMembership3 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WorkspaceMembership3?.setUser)
                {
                    await
                    WorkspaceMembership3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WorkspaceMembership4 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (WorkspaceMembership4?.setUser)
                {
                    await
                    WorkspaceMembership4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateWorkspaceMembershipWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WorkspaceMembership0 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WorkspaceMembership0?.setOrganization)
                {
                    await
                    WorkspaceMembership0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WorkspaceMembership1 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WorkspaceMembership1?.setOrganization)
                {
                    await
                    WorkspaceMembership1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WorkspaceMembership2 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WorkspaceMembership2?.setOrganization)
                {
                    await
                    WorkspaceMembership2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WorkspaceMembership3 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WorkspaceMembership3?.setOrganization)
                {
                    await
                    WorkspaceMembership3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WorkspaceMembership4 = await WorkspaceMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (WorkspaceMembership4?.setOrganization)
                {
                    await
                    WorkspaceMembership4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSubjectWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Subject0 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Subject0?.setWorkspace)
                {
                    await
                    Subject0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Subject1 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Subject1?.setWorkspace)
                {
                    await
                    Subject1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Subject2 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Subject2?.setWorkspace)
                {
                    await
                    Subject2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Subject3 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Subject3?.setWorkspace)
                {
                    await
                    Subject3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Subject4 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Subject4?.setWorkspace)
                {
                    await
                    Subject4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSubjectWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subject0 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Subject0?.setOrganization)
                {
                    await
                    Subject0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subject1 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Subject1?.setOrganization)
                {
                    await
                    Subject1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subject2 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Subject2?.setOrganization)
                {
                    await
                    Subject2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subject3 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Subject3?.setOrganization)
                {
                    await
                    Subject3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Subject4 = await Subjects.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Subject4?.setOrganization)
                {
                    await
                    Subject4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTopicWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Topic0 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Topic0?.setSubject)
                {
                    await
                    Topic0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Topic1 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Topic1?.setSubject)
                {
                    await
                    Topic1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Topic2 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Topic2?.setSubject)
                {
                    await
                    Topic2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Topic3 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Topic3?.setSubject)
                {
                    await
                    Topic3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Topic4 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Topic4?.setSubject)
                {
                    await
                    Topic4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateTopicWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Topic0 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Topic0?.setOrganization)
                {
                    await
                    Topic0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Topic1 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Topic1?.setOrganization)
                {
                    await
                    Topic1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Topic2 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Topic2?.setOrganization)
                {
                    await
                    Topic2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Topic3 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Topic3?.setOrganization)
                {
                    await
                    Topic3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Topic4 = await Topics.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Topic4?.setOrganization)
                {
                    await
                    Topic4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePageWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setWorkspace)
                {
                    await
                    Page0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setWorkspace)
                {
                    await
                    Page1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setWorkspace)
                {
                    await
                    Page2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setWorkspace)
                {
                    await
                    Page3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Page4 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Page4?.setWorkspace)
                {
                    await
                    Page4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associatePageWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setSubject)
                {
                    await
                    Page0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setSubject)
                {
                    await
                    Page1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setSubject)
                {
                    await
                    Page2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setSubject)
                {
                    await
                    Page3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Page4 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Page4?.setSubject)
                {
                    await
                    Page4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associatePageWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setTopic)
                {
                    await
                    Page0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setTopic)
                {
                    await
                    Page1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setTopic)
                {
                    await
                    Page2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setTopic)
                {
                    await
                    Page3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Page4 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Page4?.setTopic)
                {
                    await
                    Page4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
            
            async function associatePageWithParent_page() {
            
                const relatedParent_page0 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setParent_page)
                {
                    await
                    Page0.
                    setParent_page(relatedParent_page0);
                }
            
                const relatedParent_page1 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setParent_page)
                {
                    await
                    Page1.
                    setParent_page(relatedParent_page1);
                }
            
                const relatedParent_page2 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setParent_page)
                {
                    await
                    Page2.
                    setParent_page(relatedParent_page2);
                }
            
                const relatedParent_page3 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setParent_page)
                {
                    await
                    Page3.
                    setParent_page(relatedParent_page3);
                }
            
                const relatedParent_page4 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Page4 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Page4?.setParent_page)
                {
                    await
                    Page4.
                    setParent_page(relatedParent_page4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setOrganization)
                {
                    await
                    Page0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setOrganization)
                {
                    await
                    Page1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setOrganization)
                {
                    await
                    Page2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setOrganization)
                {
                    await
                    Page3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Page4 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Page4?.setOrganization)
                {
                    await
                    Page4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateBlockWithPage() {
            
                const relatedPage0 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Block0 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Block0?.setPage)
                {
                    await
                    Block0.
                    setPage(relatedPage0);
                }
            
                const relatedPage1 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Block1 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Block1?.setPage)
                {
                    await
                    Block1.
                    setPage(relatedPage1);
                }
            
                const relatedPage2 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Block2 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Block2?.setPage)
                {
                    await
                    Block2.
                    setPage(relatedPage2);
                }
            
                const relatedPage3 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Block3 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Block3?.setPage)
                {
                    await
                    Block3.
                    setPage(relatedPage3);
                }
            
                const relatedPage4 = await Pages.findOne({
                    offset: Math.floor(Math.random() * (await Pages.count())),
                });
                const Block4 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Block4?.setPage)
                {
                    await
                    Block4.
                    setPage(relatedPage4);
                }
            
        }
        
    
        
            
            async function associateBlockWithParent_block() {
            
                const relatedParent_block0 = await Blocks.findOne({
                    offset: Math.floor(Math.random() * (await Blocks.count())),
                });
                const Block0 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Block0?.setParent_block)
                {
                    await
                    Block0.
                    setParent_block(relatedParent_block0);
                }
            
                const relatedParent_block1 = await Blocks.findOne({
                    offset: Math.floor(Math.random() * (await Blocks.count())),
                });
                const Block1 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Block1?.setParent_block)
                {
                    await
                    Block1.
                    setParent_block(relatedParent_block1);
                }
            
                const relatedParent_block2 = await Blocks.findOne({
                    offset: Math.floor(Math.random() * (await Blocks.count())),
                });
                const Block2 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Block2?.setParent_block)
                {
                    await
                    Block2.
                    setParent_block(relatedParent_block2);
                }
            
                const relatedParent_block3 = await Blocks.findOne({
                    offset: Math.floor(Math.random() * (await Blocks.count())),
                });
                const Block3 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Block3?.setParent_block)
                {
                    await
                    Block3.
                    setParent_block(relatedParent_block3);
                }
            
                const relatedParent_block4 = await Blocks.findOne({
                    offset: Math.floor(Math.random() * (await Blocks.count())),
                });
                const Block4 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Block4?.setParent_block)
                {
                    await
                    Block4.
                    setParent_block(relatedParent_block4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateBlockWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Block0 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Block0?.setOrganization)
                {
                    await
                    Block0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Block1 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Block1?.setOrganization)
                {
                    await
                    Block1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Block2 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Block2?.setOrganization)
                {
                    await
                    Block2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Block3 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Block3?.setOrganization)
                {
                    await
                    Block3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Block4 = await Blocks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Block4?.setOrganization)
                {
                    await
                    Block4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDatabasWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Databas0 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Databas0?.setWorkspace)
                {
                    await
                    Databas0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Databas1 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Databas1?.setWorkspace)
                {
                    await
                    Databas1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Databas2 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Databas2?.setWorkspace)
                {
                    await
                    Databas2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Databas3 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Databas3?.setWorkspace)
                {
                    await
                    Databas3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Databas4 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Databas4?.setWorkspace)
                {
                    await
                    Databas4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDatabasWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Databas0 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Databas0?.setOrganization)
                {
                    await
                    Databas0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Databas1 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Databas1?.setOrganization)
                {
                    await
                    Databas1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Databas2 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Databas2?.setOrganization)
                {
                    await
                    Databas2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Databas3 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Databas3?.setOrganization)
                {
                    await
                    Databas3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Databas4 = await Databases.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Databas4?.setOrganization)
                {
                    await
                    Databas4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDatabaseEntryWithDatabase() {
            
                const relatedDatabase0 = await Databases.findOne({
                    offset: Math.floor(Math.random() * (await Databases.count())),
                });
                const DatabaseEntry0 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DatabaseEntry0?.setDatabase)
                {
                    await
                    DatabaseEntry0.
                    setDatabase(relatedDatabase0);
                }
            
                const relatedDatabase1 = await Databases.findOne({
                    offset: Math.floor(Math.random() * (await Databases.count())),
                });
                const DatabaseEntry1 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DatabaseEntry1?.setDatabase)
                {
                    await
                    DatabaseEntry1.
                    setDatabase(relatedDatabase1);
                }
            
                const relatedDatabase2 = await Databases.findOne({
                    offset: Math.floor(Math.random() * (await Databases.count())),
                });
                const DatabaseEntry2 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DatabaseEntry2?.setDatabase)
                {
                    await
                    DatabaseEntry2.
                    setDatabase(relatedDatabase2);
                }
            
                const relatedDatabase3 = await Databases.findOne({
                    offset: Math.floor(Math.random() * (await Databases.count())),
                });
                const DatabaseEntry3 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DatabaseEntry3?.setDatabase)
                {
                    await
                    DatabaseEntry3.
                    setDatabase(relatedDatabase3);
                }
            
                const relatedDatabase4 = await Databases.findOne({
                    offset: Math.floor(Math.random() * (await Databases.count())),
                });
                const DatabaseEntry4 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DatabaseEntry4?.setDatabase)
                {
                    await
                    DatabaseEntry4.
                    setDatabase(relatedDatabase4);
                }
            
        }
        
    
        
            
            async function associateDatabaseEntryWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const DatabaseEntry0 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DatabaseEntry0?.setSubject)
                {
                    await
                    DatabaseEntry0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const DatabaseEntry1 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DatabaseEntry1?.setSubject)
                {
                    await
                    DatabaseEntry1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const DatabaseEntry2 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DatabaseEntry2?.setSubject)
                {
                    await
                    DatabaseEntry2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const DatabaseEntry3 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DatabaseEntry3?.setSubject)
                {
                    await
                    DatabaseEntry3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const DatabaseEntry4 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DatabaseEntry4?.setSubject)
                {
                    await
                    DatabaseEntry4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateDatabaseEntryWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const DatabaseEntry0 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DatabaseEntry0?.setTopic)
                {
                    await
                    DatabaseEntry0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const DatabaseEntry1 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DatabaseEntry1?.setTopic)
                {
                    await
                    DatabaseEntry1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const DatabaseEntry2 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DatabaseEntry2?.setTopic)
                {
                    await
                    DatabaseEntry2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const DatabaseEntry3 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DatabaseEntry3?.setTopic)
                {
                    await
                    DatabaseEntry3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const DatabaseEntry4 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DatabaseEntry4?.setTopic)
                {
                    await
                    DatabaseEntry4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDatabaseEntryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DatabaseEntry0 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DatabaseEntry0?.setOrganization)
                {
                    await
                    DatabaseEntry0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DatabaseEntry1 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DatabaseEntry1?.setOrganization)
                {
                    await
                    DatabaseEntry1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DatabaseEntry2 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DatabaseEntry2?.setOrganization)
                {
                    await
                    DatabaseEntry2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DatabaseEntry3 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DatabaseEntry3?.setOrganization)
                {
                    await
                    DatabaseEntry3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DatabaseEntry4 = await DatabaseEntries.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DatabaseEntry4?.setOrganization)
                {
                    await
                    DatabaseEntry4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSourceWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Source0 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Source0?.setWorkspace)
                {
                    await
                    Source0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Source1 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Source1?.setWorkspace)
                {
                    await
                    Source1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Source2 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Source2?.setWorkspace)
                {
                    await
                    Source2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Source3 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Source3?.setWorkspace)
                {
                    await
                    Source3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Source4 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Source4?.setWorkspace)
                {
                    await
                    Source4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateSourceWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Source0 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Source0?.setSubject)
                {
                    await
                    Source0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Source1 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Source1?.setSubject)
                {
                    await
                    Source1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Source2 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Source2?.setSubject)
                {
                    await
                    Source2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Source3 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Source3?.setSubject)
                {
                    await
                    Source3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Source4 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Source4?.setSubject)
                {
                    await
                    Source4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateSourceWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Source0 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Source0?.setTopic)
                {
                    await
                    Source0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Source1 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Source1?.setTopic)
                {
                    await
                    Source1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Source2 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Source2?.setTopic)
                {
                    await
                    Source2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Source3 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Source3?.setTopic)
                {
                    await
                    Source3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Source4 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Source4?.setTopic)
                {
                    await
                    Source4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSourceWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Source0 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Source0?.setOrganization)
                {
                    await
                    Source0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Source1 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Source1?.setOrganization)
                {
                    await
                    Source1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Source2 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Source2?.setOrganization)
                {
                    await
                    Source2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Source3 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Source3?.setOrganization)
                {
                    await
                    Source3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Source4 = await Sources.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Source4?.setOrganization)
                {
                    await
                    Source4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSourceChunkWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const SourceChunk0 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SourceChunk0?.setSource)
                {
                    await
                    SourceChunk0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const SourceChunk1 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SourceChunk1?.setSource)
                {
                    await
                    SourceChunk1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const SourceChunk2 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SourceChunk2?.setSource)
                {
                    await
                    SourceChunk2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const SourceChunk3 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SourceChunk3?.setSource)
                {
                    await
                    SourceChunk3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const SourceChunk4 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SourceChunk4?.setSource)
                {
                    await
                    SourceChunk4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSourceChunkWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SourceChunk0 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SourceChunk0?.setOrganization)
                {
                    await
                    SourceChunk0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SourceChunk1 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SourceChunk1?.setOrganization)
                {
                    await
                    SourceChunk1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SourceChunk2 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SourceChunk2?.setOrganization)
                {
                    await
                    SourceChunk2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SourceChunk3 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SourceChunk3?.setOrganization)
                {
                    await
                    SourceChunk3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SourceChunk4 = await SourceChunks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SourceChunk4?.setOrganization)
                {
                    await
                    SourceChunk4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateAiJobWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setWorkspace)
                {
                    await
                    AiJob0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setWorkspace)
                {
                    await
                    AiJob1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setWorkspace)
                {
                    await
                    AiJob2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setWorkspace)
                {
                    await
                    AiJob3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setWorkspace)
                {
                    await
                    AiJob4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateAiJobWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setSource)
                {
                    await
                    AiJob0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setSource)
                {
                    await
                    AiJob1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setSource)
                {
                    await
                    AiJob2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setSource)
                {
                    await
                    AiJob3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setSource)
                {
                    await
                    AiJob4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAiJobWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AiJob0 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AiJob0?.setOrganization)
                {
                    await
                    AiJob0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AiJob1 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AiJob1?.setOrganization)
                {
                    await
                    AiJob1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AiJob2 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AiJob2?.setOrganization)
                {
                    await
                    AiJob2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AiJob3 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AiJob3?.setOrganization)
                {
                    await
                    AiJob3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AiJob4 = await AiJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (AiJob4?.setOrganization)
                {
                    await
                    AiJob4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateConceptMapWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const ConceptMap0 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ConceptMap0?.setWorkspace)
                {
                    await
                    ConceptMap0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const ConceptMap1 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ConceptMap1?.setWorkspace)
                {
                    await
                    ConceptMap1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const ConceptMap2 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ConceptMap2?.setWorkspace)
                {
                    await
                    ConceptMap2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const ConceptMap3 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ConceptMap3?.setWorkspace)
                {
                    await
                    ConceptMap3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const ConceptMap4 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ConceptMap4?.setWorkspace)
                {
                    await
                    ConceptMap4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateConceptMapWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const ConceptMap0 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ConceptMap0?.setSource)
                {
                    await
                    ConceptMap0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const ConceptMap1 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ConceptMap1?.setSource)
                {
                    await
                    ConceptMap1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const ConceptMap2 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ConceptMap2?.setSource)
                {
                    await
                    ConceptMap2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const ConceptMap3 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ConceptMap3?.setSource)
                {
                    await
                    ConceptMap3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const ConceptMap4 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ConceptMap4?.setSource)
                {
                    await
                    ConceptMap4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateConceptMapWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ConceptMap0 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ConceptMap0?.setOrganization)
                {
                    await
                    ConceptMap0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ConceptMap1 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ConceptMap1?.setOrganization)
                {
                    await
                    ConceptMap1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ConceptMap2 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ConceptMap2?.setOrganization)
                {
                    await
                    ConceptMap2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ConceptMap3 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ConceptMap3?.setOrganization)
                {
                    await
                    ConceptMap3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ConceptMap4 = await ConceptMaps.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ConceptMap4?.setOrganization)
                {
                    await
                    ConceptMap4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStudyGuideWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyGuide0 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyGuide0?.setWorkspace)
                {
                    await
                    StudyGuide0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyGuide1 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyGuide1?.setWorkspace)
                {
                    await
                    StudyGuide1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyGuide2 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyGuide2?.setWorkspace)
                {
                    await
                    StudyGuide2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyGuide3 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyGuide3?.setWorkspace)
                {
                    await
                    StudyGuide3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyGuide4 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyGuide4?.setWorkspace)
                {
                    await
                    StudyGuide4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateStudyGuideWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const StudyGuide0 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyGuide0?.setSource)
                {
                    await
                    StudyGuide0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const StudyGuide1 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyGuide1?.setSource)
                {
                    await
                    StudyGuide1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const StudyGuide2 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyGuide2?.setSource)
                {
                    await
                    StudyGuide2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const StudyGuide3 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyGuide3?.setSource)
                {
                    await
                    StudyGuide3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const StudyGuide4 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyGuide4?.setSource)
                {
                    await
                    StudyGuide4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStudyGuideWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyGuide0 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyGuide0?.setOrganization)
                {
                    await
                    StudyGuide0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyGuide1 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyGuide1?.setOrganization)
                {
                    await
                    StudyGuide1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyGuide2 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyGuide2?.setOrganization)
                {
                    await
                    StudyGuide2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyGuide3 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyGuide3?.setOrganization)
                {
                    await
                    StudyGuide3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyGuide4 = await StudyGuides.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyGuide4?.setOrganization)
                {
                    await
                    StudyGuide4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFlashcardDeckWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const FlashcardDeck0 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FlashcardDeck0?.setWorkspace)
                {
                    await
                    FlashcardDeck0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const FlashcardDeck1 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FlashcardDeck1?.setWorkspace)
                {
                    await
                    FlashcardDeck1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const FlashcardDeck2 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FlashcardDeck2?.setWorkspace)
                {
                    await
                    FlashcardDeck2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const FlashcardDeck3 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FlashcardDeck3?.setWorkspace)
                {
                    await
                    FlashcardDeck3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const FlashcardDeck4 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FlashcardDeck4?.setWorkspace)
                {
                    await
                    FlashcardDeck4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateFlashcardDeckWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const FlashcardDeck0 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FlashcardDeck0?.setSubject)
                {
                    await
                    FlashcardDeck0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const FlashcardDeck1 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FlashcardDeck1?.setSubject)
                {
                    await
                    FlashcardDeck1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const FlashcardDeck2 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FlashcardDeck2?.setSubject)
                {
                    await
                    FlashcardDeck2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const FlashcardDeck3 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FlashcardDeck3?.setSubject)
                {
                    await
                    FlashcardDeck3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const FlashcardDeck4 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FlashcardDeck4?.setSubject)
                {
                    await
                    FlashcardDeck4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateFlashcardDeckWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const FlashcardDeck0 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FlashcardDeck0?.setTopic)
                {
                    await
                    FlashcardDeck0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const FlashcardDeck1 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FlashcardDeck1?.setTopic)
                {
                    await
                    FlashcardDeck1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const FlashcardDeck2 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FlashcardDeck2?.setTopic)
                {
                    await
                    FlashcardDeck2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const FlashcardDeck3 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FlashcardDeck3?.setTopic)
                {
                    await
                    FlashcardDeck3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const FlashcardDeck4 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FlashcardDeck4?.setTopic)
                {
                    await
                    FlashcardDeck4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
            
            async function associateFlashcardDeckWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const FlashcardDeck0 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FlashcardDeck0?.setSource)
                {
                    await
                    FlashcardDeck0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const FlashcardDeck1 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FlashcardDeck1?.setSource)
                {
                    await
                    FlashcardDeck1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const FlashcardDeck2 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FlashcardDeck2?.setSource)
                {
                    await
                    FlashcardDeck2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const FlashcardDeck3 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FlashcardDeck3?.setSource)
                {
                    await
                    FlashcardDeck3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const FlashcardDeck4 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FlashcardDeck4?.setSource)
                {
                    await
                    FlashcardDeck4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFlashcardDeckWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FlashcardDeck0 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FlashcardDeck0?.setOrganization)
                {
                    await
                    FlashcardDeck0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FlashcardDeck1 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FlashcardDeck1?.setOrganization)
                {
                    await
                    FlashcardDeck1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FlashcardDeck2 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FlashcardDeck2?.setOrganization)
                {
                    await
                    FlashcardDeck2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FlashcardDeck3 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FlashcardDeck3?.setOrganization)
                {
                    await
                    FlashcardDeck3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FlashcardDeck4 = await FlashcardDecks.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (FlashcardDeck4?.setOrganization)
                {
                    await
                    FlashcardDeck4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFlashcardWithDeck() {
            
                const relatedDeck0 = await FlashcardDecks.findOne({
                    offset: Math.floor(Math.random() * (await FlashcardDecks.count())),
                });
                const Flashcard0 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Flashcard0?.setDeck)
                {
                    await
                    Flashcard0.
                    setDeck(relatedDeck0);
                }
            
                const relatedDeck1 = await FlashcardDecks.findOne({
                    offset: Math.floor(Math.random() * (await FlashcardDecks.count())),
                });
                const Flashcard1 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Flashcard1?.setDeck)
                {
                    await
                    Flashcard1.
                    setDeck(relatedDeck1);
                }
            
                const relatedDeck2 = await FlashcardDecks.findOne({
                    offset: Math.floor(Math.random() * (await FlashcardDecks.count())),
                });
                const Flashcard2 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Flashcard2?.setDeck)
                {
                    await
                    Flashcard2.
                    setDeck(relatedDeck2);
                }
            
                const relatedDeck3 = await FlashcardDecks.findOne({
                    offset: Math.floor(Math.random() * (await FlashcardDecks.count())),
                });
                const Flashcard3 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Flashcard3?.setDeck)
                {
                    await
                    Flashcard3.
                    setDeck(relatedDeck3);
                }
            
                const relatedDeck4 = await FlashcardDecks.findOne({
                    offset: Math.floor(Math.random() * (await FlashcardDecks.count())),
                });
                const Flashcard4 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Flashcard4?.setDeck)
                {
                    await
                    Flashcard4.
                    setDeck(relatedDeck4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFlashcardWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Flashcard0 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Flashcard0?.setOrganization)
                {
                    await
                    Flashcard0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Flashcard1 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Flashcard1?.setOrganization)
                {
                    await
                    Flashcard1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Flashcard2 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Flashcard2?.setOrganization)
                {
                    await
                    Flashcard2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Flashcard3 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Flashcard3?.setOrganization)
                {
                    await
                    Flashcard3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Flashcard4 = await Flashcards.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Flashcard4?.setOrganization)
                {
                    await
                    Flashcard4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSpacedRepetitionStateWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SpacedRepetitionState0 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SpacedRepetitionState0?.setUser)
                {
                    await
                    SpacedRepetitionState0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SpacedRepetitionState1 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SpacedRepetitionState1?.setUser)
                {
                    await
                    SpacedRepetitionState1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SpacedRepetitionState2 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SpacedRepetitionState2?.setUser)
                {
                    await
                    SpacedRepetitionState2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SpacedRepetitionState3 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SpacedRepetitionState3?.setUser)
                {
                    await
                    SpacedRepetitionState3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SpacedRepetitionState4 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SpacedRepetitionState4?.setUser)
                {
                    await
                    SpacedRepetitionState4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateSpacedRepetitionStateWithFlashcard() {
            
                const relatedFlashcard0 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const SpacedRepetitionState0 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SpacedRepetitionState0?.setFlashcard)
                {
                    await
                    SpacedRepetitionState0.
                    setFlashcard(relatedFlashcard0);
                }
            
                const relatedFlashcard1 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const SpacedRepetitionState1 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SpacedRepetitionState1?.setFlashcard)
                {
                    await
                    SpacedRepetitionState1.
                    setFlashcard(relatedFlashcard1);
                }
            
                const relatedFlashcard2 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const SpacedRepetitionState2 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SpacedRepetitionState2?.setFlashcard)
                {
                    await
                    SpacedRepetitionState2.
                    setFlashcard(relatedFlashcard2);
                }
            
                const relatedFlashcard3 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const SpacedRepetitionState3 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SpacedRepetitionState3?.setFlashcard)
                {
                    await
                    SpacedRepetitionState3.
                    setFlashcard(relatedFlashcard3);
                }
            
                const relatedFlashcard4 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const SpacedRepetitionState4 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SpacedRepetitionState4?.setFlashcard)
                {
                    await
                    SpacedRepetitionState4.
                    setFlashcard(relatedFlashcard4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSpacedRepetitionStateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SpacedRepetitionState0 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SpacedRepetitionState0?.setOrganization)
                {
                    await
                    SpacedRepetitionState0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SpacedRepetitionState1 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SpacedRepetitionState1?.setOrganization)
                {
                    await
                    SpacedRepetitionState1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SpacedRepetitionState2 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SpacedRepetitionState2?.setOrganization)
                {
                    await
                    SpacedRepetitionState2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SpacedRepetitionState3 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SpacedRepetitionState3?.setOrganization)
                {
                    await
                    SpacedRepetitionState3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SpacedRepetitionState4 = await SpacedRepetitionStates.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (SpacedRepetitionState4?.setOrganization)
                {
                    await
                    SpacedRepetitionState4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStudySessionWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudySession0 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudySession0?.setUser)
                {
                    await
                    StudySession0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudySession1 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudySession1?.setUser)
                {
                    await
                    StudySession1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudySession2 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudySession2?.setUser)
                {
                    await
                    StudySession2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudySession3 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudySession3?.setUser)
                {
                    await
                    StudySession3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudySession4 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudySession4?.setUser)
                {
                    await
                    StudySession4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateStudySessionWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudySession0 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudySession0?.setWorkspace)
                {
                    await
                    StudySession0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudySession1 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudySession1?.setWorkspace)
                {
                    await
                    StudySession1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudySession2 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudySession2?.setWorkspace)
                {
                    await
                    StudySession2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudySession3 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudySession3?.setWorkspace)
                {
                    await
                    StudySession3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudySession4 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudySession4?.setWorkspace)
                {
                    await
                    StudySession4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateStudySessionWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudySession0 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudySession0?.setSubject)
                {
                    await
                    StudySession0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudySession1 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudySession1?.setSubject)
                {
                    await
                    StudySession1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudySession2 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudySession2?.setSubject)
                {
                    await
                    StudySession2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudySession3 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudySession3?.setSubject)
                {
                    await
                    StudySession3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudySession4 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudySession4?.setSubject)
                {
                    await
                    StudySession4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateStudySessionWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudySession0 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudySession0?.setTopic)
                {
                    await
                    StudySession0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudySession1 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudySession1?.setTopic)
                {
                    await
                    StudySession1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudySession2 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudySession2?.setTopic)
                {
                    await
                    StudySession2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudySession3 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudySession3?.setTopic)
                {
                    await
                    StudySession3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudySession4 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudySession4?.setTopic)
                {
                    await
                    StudySession4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStudySessionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudySession0 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudySession0?.setOrganization)
                {
                    await
                    StudySession0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudySession1 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudySession1?.setOrganization)
                {
                    await
                    StudySession1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudySession2 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudySession2?.setOrganization)
                {
                    await
                    StudySession2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudySession3 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudySession3?.setOrganization)
                {
                    await
                    StudySession3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudySession4 = await StudySessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudySession4?.setOrganization)
                {
                    await
                    StudySession4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateReviewEventWithSession() {
            
                const relatedSession0 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const ReviewEvent0 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReviewEvent0?.setSession)
                {
                    await
                    ReviewEvent0.
                    setSession(relatedSession0);
                }
            
                const relatedSession1 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const ReviewEvent1 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReviewEvent1?.setSession)
                {
                    await
                    ReviewEvent1.
                    setSession(relatedSession1);
                }
            
                const relatedSession2 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const ReviewEvent2 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReviewEvent2?.setSession)
                {
                    await
                    ReviewEvent2.
                    setSession(relatedSession2);
                }
            
                const relatedSession3 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const ReviewEvent3 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ReviewEvent3?.setSession)
                {
                    await
                    ReviewEvent3.
                    setSession(relatedSession3);
                }
            
                const relatedSession4 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const ReviewEvent4 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ReviewEvent4?.setSession)
                {
                    await
                    ReviewEvent4.
                    setSession(relatedSession4);
                }
            
        }
        
    
        
            
            async function associateReviewEventWithFlashcard() {
            
                const relatedFlashcard0 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const ReviewEvent0 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReviewEvent0?.setFlashcard)
                {
                    await
                    ReviewEvent0.
                    setFlashcard(relatedFlashcard0);
                }
            
                const relatedFlashcard1 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const ReviewEvent1 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReviewEvent1?.setFlashcard)
                {
                    await
                    ReviewEvent1.
                    setFlashcard(relatedFlashcard1);
                }
            
                const relatedFlashcard2 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const ReviewEvent2 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReviewEvent2?.setFlashcard)
                {
                    await
                    ReviewEvent2.
                    setFlashcard(relatedFlashcard2);
                }
            
                const relatedFlashcard3 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const ReviewEvent3 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ReviewEvent3?.setFlashcard)
                {
                    await
                    ReviewEvent3.
                    setFlashcard(relatedFlashcard3);
                }
            
                const relatedFlashcard4 = await Flashcards.findOne({
                    offset: Math.floor(Math.random() * (await Flashcards.count())),
                });
                const ReviewEvent4 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ReviewEvent4?.setFlashcard)
                {
                    await
                    ReviewEvent4.
                    setFlashcard(relatedFlashcard4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateReviewEventWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReviewEvent0 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ReviewEvent0?.setOrganization)
                {
                    await
                    ReviewEvent0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReviewEvent1 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ReviewEvent1?.setOrganization)
                {
                    await
                    ReviewEvent1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReviewEvent2 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ReviewEvent2?.setOrganization)
                {
                    await
                    ReviewEvent2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReviewEvent3 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ReviewEvent3?.setOrganization)
                {
                    await
                    ReviewEvent3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ReviewEvent4 = await ReviewEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (ReviewEvent4?.setOrganization)
                {
                    await
                    ReviewEvent4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateQuizzeWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Quizze0 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quizze0?.setWorkspace)
                {
                    await
                    Quizze0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Quizze1 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quizze1?.setWorkspace)
                {
                    await
                    Quizze1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Quizze2 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quizze2?.setWorkspace)
                {
                    await
                    Quizze2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Quizze3 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quizze3?.setWorkspace)
                {
                    await
                    Quizze3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const Quizze4 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quizze4?.setWorkspace)
                {
                    await
                    Quizze4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateQuizzeWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Quizze0 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quizze0?.setSubject)
                {
                    await
                    Quizze0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Quizze1 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quizze1?.setSubject)
                {
                    await
                    Quizze1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Quizze2 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quizze2?.setSubject)
                {
                    await
                    Quizze2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Quizze3 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quizze3?.setSubject)
                {
                    await
                    Quizze3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const Quizze4 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quizze4?.setSubject)
                {
                    await
                    Quizze4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateQuizzeWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Quizze0 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quizze0?.setTopic)
                {
                    await
                    Quizze0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Quizze1 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quizze1?.setTopic)
                {
                    await
                    Quizze1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Quizze2 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quizze2?.setTopic)
                {
                    await
                    Quizze2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Quizze3 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quizze3?.setTopic)
                {
                    await
                    Quizze3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const Quizze4 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quizze4?.setTopic)
                {
                    await
                    Quizze4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
            
            async function associateQuizzeWithSource() {
            
                const relatedSource0 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const Quizze0 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quizze0?.setSource)
                {
                    await
                    Quizze0.
                    setSource(relatedSource0);
                }
            
                const relatedSource1 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const Quizze1 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quizze1?.setSource)
                {
                    await
                    Quizze1.
                    setSource(relatedSource1);
                }
            
                const relatedSource2 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const Quizze2 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quizze2?.setSource)
                {
                    await
                    Quizze2.
                    setSource(relatedSource2);
                }
            
                const relatedSource3 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const Quizze3 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quizze3?.setSource)
                {
                    await
                    Quizze3.
                    setSource(relatedSource3);
                }
            
                const relatedSource4 = await Sources.findOne({
                    offset: Math.floor(Math.random() * (await Sources.count())),
                });
                const Quizze4 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quizze4?.setSource)
                {
                    await
                    Quizze4.
                    setSource(relatedSource4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateQuizzeWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quizze0 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Quizze0?.setOrganization)
                {
                    await
                    Quizze0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quizze1 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Quizze1?.setOrganization)
                {
                    await
                    Quizze1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quizze2 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Quizze2?.setOrganization)
                {
                    await
                    Quizze2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quizze3 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Quizze3?.setOrganization)
                {
                    await
                    Quizze3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Quizze4 = await Quizzes.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (Quizze4?.setOrganization)
                {
                    await
                    Quizze4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateQuizQuestionWithQuiz() {
            
                const relatedQuiz0 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizQuestion0 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizQuestion0?.setQuiz)
                {
                    await
                    QuizQuestion0.
                    setQuiz(relatedQuiz0);
                }
            
                const relatedQuiz1 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizQuestion1 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizQuestion1?.setQuiz)
                {
                    await
                    QuizQuestion1.
                    setQuiz(relatedQuiz1);
                }
            
                const relatedQuiz2 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizQuestion2 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizQuestion2?.setQuiz)
                {
                    await
                    QuizQuestion2.
                    setQuiz(relatedQuiz2);
                }
            
                const relatedQuiz3 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizQuestion3 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizQuestion3?.setQuiz)
                {
                    await
                    QuizQuestion3.
                    setQuiz(relatedQuiz3);
                }
            
                const relatedQuiz4 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizQuestion4 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizQuestion4?.setQuiz)
                {
                    await
                    QuizQuestion4.
                    setQuiz(relatedQuiz4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateQuizQuestionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizQuestion0 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizQuestion0?.setOrganization)
                {
                    await
                    QuizQuestion0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizQuestion1 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizQuestion1?.setOrganization)
                {
                    await
                    QuizQuestion1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizQuestion2 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizQuestion2?.setOrganization)
                {
                    await
                    QuizQuestion2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizQuestion3 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizQuestion3?.setOrganization)
                {
                    await
                    QuizQuestion3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizQuestion4 = await QuizQuestions.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizQuestion4?.setOrganization)
                {
                    await
                    QuizQuestion4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateQuizAttemptWithQuiz() {
            
                const relatedQuiz0 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizAttempt0 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizAttempt0?.setQuiz)
                {
                    await
                    QuizAttempt0.
                    setQuiz(relatedQuiz0);
                }
            
                const relatedQuiz1 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizAttempt1 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizAttempt1?.setQuiz)
                {
                    await
                    QuizAttempt1.
                    setQuiz(relatedQuiz1);
                }
            
                const relatedQuiz2 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizAttempt2 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizAttempt2?.setQuiz)
                {
                    await
                    QuizAttempt2.
                    setQuiz(relatedQuiz2);
                }
            
                const relatedQuiz3 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizAttempt3 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizAttempt3?.setQuiz)
                {
                    await
                    QuizAttempt3.
                    setQuiz(relatedQuiz3);
                }
            
                const relatedQuiz4 = await Quizzes.findOne({
                    offset: Math.floor(Math.random() * (await Quizzes.count())),
                });
                const QuizAttempt4 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizAttempt4?.setQuiz)
                {
                    await
                    QuizAttempt4.
                    setQuiz(relatedQuiz4);
                }
            
        }
        
    
        
            
            async function associateQuizAttemptWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const QuizAttempt0 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizAttempt0?.setUser)
                {
                    await
                    QuizAttempt0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const QuizAttempt1 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizAttempt1?.setUser)
                {
                    await
                    QuizAttempt1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const QuizAttempt2 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizAttempt2?.setUser)
                {
                    await
                    QuizAttempt2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const QuizAttempt3 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizAttempt3?.setUser)
                {
                    await
                    QuizAttempt3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const QuizAttempt4 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizAttempt4?.setUser)
                {
                    await
                    QuizAttempt4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateQuizAttemptWithSession() {
            
                const relatedSession0 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const QuizAttempt0 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizAttempt0?.setSession)
                {
                    await
                    QuizAttempt0.
                    setSession(relatedSession0);
                }
            
                const relatedSession1 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const QuizAttempt1 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizAttempt1?.setSession)
                {
                    await
                    QuizAttempt1.
                    setSession(relatedSession1);
                }
            
                const relatedSession2 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const QuizAttempt2 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizAttempt2?.setSession)
                {
                    await
                    QuizAttempt2.
                    setSession(relatedSession2);
                }
            
                const relatedSession3 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const QuizAttempt3 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizAttempt3?.setSession)
                {
                    await
                    QuizAttempt3.
                    setSession(relatedSession3);
                }
            
                const relatedSession4 = await StudySessions.findOne({
                    offset: Math.floor(Math.random() * (await StudySessions.count())),
                });
                const QuizAttempt4 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizAttempt4?.setSession)
                {
                    await
                    QuizAttempt4.
                    setSession(relatedSession4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateQuizAttemptWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizAttempt0 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (QuizAttempt0?.setOrganization)
                {
                    await
                    QuizAttempt0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizAttempt1 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (QuizAttempt1?.setOrganization)
                {
                    await
                    QuizAttempt1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizAttempt2 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (QuizAttempt2?.setOrganization)
                {
                    await
                    QuizAttempt2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizAttempt3 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (QuizAttempt3?.setOrganization)
                {
                    await
                    QuizAttempt3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const QuizAttempt4 = await QuizAttempts.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (QuizAttempt4?.setOrganization)
                {
                    await
                    QuizAttempt4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTutorConversationWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const TutorConversation0 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorConversation0?.setWorkspace)
                {
                    await
                    TutorConversation0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const TutorConversation1 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorConversation1?.setWorkspace)
                {
                    await
                    TutorConversation1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const TutorConversation2 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorConversation2?.setWorkspace)
                {
                    await
                    TutorConversation2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const TutorConversation3 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorConversation3?.setWorkspace)
                {
                    await
                    TutorConversation3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const TutorConversation4 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorConversation4?.setWorkspace)
                {
                    await
                    TutorConversation4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
            
            async function associateTutorConversationWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TutorConversation0 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorConversation0?.setUser)
                {
                    await
                    TutorConversation0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TutorConversation1 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorConversation1?.setUser)
                {
                    await
                    TutorConversation1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TutorConversation2 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorConversation2?.setUser)
                {
                    await
                    TutorConversation2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TutorConversation3 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorConversation3?.setUser)
                {
                    await
                    TutorConversation3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const TutorConversation4 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorConversation4?.setUser)
                {
                    await
                    TutorConversation4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateTutorConversationWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const TutorConversation0 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorConversation0?.setSubject)
                {
                    await
                    TutorConversation0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const TutorConversation1 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorConversation1?.setSubject)
                {
                    await
                    TutorConversation1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const TutorConversation2 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorConversation2?.setSubject)
                {
                    await
                    TutorConversation2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const TutorConversation3 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorConversation3?.setSubject)
                {
                    await
                    TutorConversation3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const TutorConversation4 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorConversation4?.setSubject)
                {
                    await
                    TutorConversation4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateTutorConversationWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const TutorConversation0 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorConversation0?.setTopic)
                {
                    await
                    TutorConversation0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const TutorConversation1 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorConversation1?.setTopic)
                {
                    await
                    TutorConversation1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const TutorConversation2 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorConversation2?.setTopic)
                {
                    await
                    TutorConversation2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const TutorConversation3 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorConversation3?.setTopic)
                {
                    await
                    TutorConversation3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const TutorConversation4 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorConversation4?.setTopic)
                {
                    await
                    TutorConversation4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTutorConversationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorConversation0 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorConversation0?.setOrganization)
                {
                    await
                    TutorConversation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorConversation1 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorConversation1?.setOrganization)
                {
                    await
                    TutorConversation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorConversation2 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorConversation2?.setOrganization)
                {
                    await
                    TutorConversation2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorConversation3 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorConversation3?.setOrganization)
                {
                    await
                    TutorConversation3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorConversation4 = await TutorConversations.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorConversation4?.setOrganization)
                {
                    await
                    TutorConversation4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTutorMessageWithConversation() {
            
                const relatedConversation0 = await TutorConversations.findOne({
                    offset: Math.floor(Math.random() * (await TutorConversations.count())),
                });
                const TutorMessage0 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorMessage0?.setConversation)
                {
                    await
                    TutorMessage0.
                    setConversation(relatedConversation0);
                }
            
                const relatedConversation1 = await TutorConversations.findOne({
                    offset: Math.floor(Math.random() * (await TutorConversations.count())),
                });
                const TutorMessage1 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorMessage1?.setConversation)
                {
                    await
                    TutorMessage1.
                    setConversation(relatedConversation1);
                }
            
                const relatedConversation2 = await TutorConversations.findOne({
                    offset: Math.floor(Math.random() * (await TutorConversations.count())),
                });
                const TutorMessage2 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorMessage2?.setConversation)
                {
                    await
                    TutorMessage2.
                    setConversation(relatedConversation2);
                }
            
                const relatedConversation3 = await TutorConversations.findOne({
                    offset: Math.floor(Math.random() * (await TutorConversations.count())),
                });
                const TutorMessage3 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorMessage3?.setConversation)
                {
                    await
                    TutorMessage3.
                    setConversation(relatedConversation3);
                }
            
                const relatedConversation4 = await TutorConversations.findOne({
                    offset: Math.floor(Math.random() * (await TutorConversations.count())),
                });
                const TutorMessage4 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorMessage4?.setConversation)
                {
                    await
                    TutorMessage4.
                    setConversation(relatedConversation4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTutorMessageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorMessage0 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TutorMessage0?.setOrganization)
                {
                    await
                    TutorMessage0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorMessage1 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TutorMessage1?.setOrganization)
                {
                    await
                    TutorMessage1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorMessage2 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TutorMessage2?.setOrganization)
                {
                    await
                    TutorMessage2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorMessage3 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TutorMessage3?.setOrganization)
                {
                    await
                    TutorMessage3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TutorMessage4 = await TutorMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (TutorMessage4?.setOrganization)
                {
                    await
                    TutorMessage4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStudyPlanWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudyPlan0 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlan0?.setUser)
                {
                    await
                    StudyPlan0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudyPlan1 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlan1?.setUser)
                {
                    await
                    StudyPlan1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudyPlan2 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlan2?.setUser)
                {
                    await
                    StudyPlan2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudyPlan3 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlan3?.setUser)
                {
                    await
                    StudyPlan3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const StudyPlan4 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlan4?.setUser)
                {
                    await
                    StudyPlan4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateStudyPlanWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyPlan0 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlan0?.setWorkspace)
                {
                    await
                    StudyPlan0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyPlan1 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlan1?.setWorkspace)
                {
                    await
                    StudyPlan1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyPlan2 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlan2?.setWorkspace)
                {
                    await
                    StudyPlan2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyPlan3 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlan3?.setWorkspace)
                {
                    await
                    StudyPlan3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const StudyPlan4 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlan4?.setWorkspace)
                {
                    await
                    StudyPlan4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStudyPlanWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlan0 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlan0?.setOrganization)
                {
                    await
                    StudyPlan0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlan1 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlan1?.setOrganization)
                {
                    await
                    StudyPlan1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlan2 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlan2?.setOrganization)
                {
                    await
                    StudyPlan2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlan3 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlan3?.setOrganization)
                {
                    await
                    StudyPlan3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlan4 = await StudyPlans.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlan4?.setOrganization)
                {
                    await
                    StudyPlan4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStudyPlanItemWithStudy_plan() {
            
                const relatedStudy_plan0 = await StudyPlans.findOne({
                    offset: Math.floor(Math.random() * (await StudyPlans.count())),
                });
                const StudyPlanItem0 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlanItem0?.setStudy_plan)
                {
                    await
                    StudyPlanItem0.
                    setStudy_plan(relatedStudy_plan0);
                }
            
                const relatedStudy_plan1 = await StudyPlans.findOne({
                    offset: Math.floor(Math.random() * (await StudyPlans.count())),
                });
                const StudyPlanItem1 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlanItem1?.setStudy_plan)
                {
                    await
                    StudyPlanItem1.
                    setStudy_plan(relatedStudy_plan1);
                }
            
                const relatedStudy_plan2 = await StudyPlans.findOne({
                    offset: Math.floor(Math.random() * (await StudyPlans.count())),
                });
                const StudyPlanItem2 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlanItem2?.setStudy_plan)
                {
                    await
                    StudyPlanItem2.
                    setStudy_plan(relatedStudy_plan2);
                }
            
                const relatedStudy_plan3 = await StudyPlans.findOne({
                    offset: Math.floor(Math.random() * (await StudyPlans.count())),
                });
                const StudyPlanItem3 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlanItem3?.setStudy_plan)
                {
                    await
                    StudyPlanItem3.
                    setStudy_plan(relatedStudy_plan3);
                }
            
                const relatedStudy_plan4 = await StudyPlans.findOne({
                    offset: Math.floor(Math.random() * (await StudyPlans.count())),
                });
                const StudyPlanItem4 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlanItem4?.setStudy_plan)
                {
                    await
                    StudyPlanItem4.
                    setStudy_plan(relatedStudy_plan4);
                }
            
        }
        
    
        
            
            async function associateStudyPlanItemWithSubject() {
            
                const relatedSubject0 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudyPlanItem0 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlanItem0?.setSubject)
                {
                    await
                    StudyPlanItem0.
                    setSubject(relatedSubject0);
                }
            
                const relatedSubject1 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudyPlanItem1 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlanItem1?.setSubject)
                {
                    await
                    StudyPlanItem1.
                    setSubject(relatedSubject1);
                }
            
                const relatedSubject2 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudyPlanItem2 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlanItem2?.setSubject)
                {
                    await
                    StudyPlanItem2.
                    setSubject(relatedSubject2);
                }
            
                const relatedSubject3 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudyPlanItem3 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlanItem3?.setSubject)
                {
                    await
                    StudyPlanItem3.
                    setSubject(relatedSubject3);
                }
            
                const relatedSubject4 = await Subjects.findOne({
                    offset: Math.floor(Math.random() * (await Subjects.count())),
                });
                const StudyPlanItem4 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlanItem4?.setSubject)
                {
                    await
                    StudyPlanItem4.
                    setSubject(relatedSubject4);
                }
            
        }
        
    
        
            
            async function associateStudyPlanItemWithTopic() {
            
                const relatedTopic0 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudyPlanItem0 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlanItem0?.setTopic)
                {
                    await
                    StudyPlanItem0.
                    setTopic(relatedTopic0);
                }
            
                const relatedTopic1 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudyPlanItem1 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlanItem1?.setTopic)
                {
                    await
                    StudyPlanItem1.
                    setTopic(relatedTopic1);
                }
            
                const relatedTopic2 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudyPlanItem2 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlanItem2?.setTopic)
                {
                    await
                    StudyPlanItem2.
                    setTopic(relatedTopic2);
                }
            
                const relatedTopic3 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudyPlanItem3 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlanItem3?.setTopic)
                {
                    await
                    StudyPlanItem3.
                    setTopic(relatedTopic3);
                }
            
                const relatedTopic4 = await Topics.findOne({
                    offset: Math.floor(Math.random() * (await Topics.count())),
                });
                const StudyPlanItem4 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlanItem4?.setTopic)
                {
                    await
                    StudyPlanItem4.
                    setTopic(relatedTopic4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStudyPlanItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlanItem0 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (StudyPlanItem0?.setOrganization)
                {
                    await
                    StudyPlanItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlanItem1 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (StudyPlanItem1?.setOrganization)
                {
                    await
                    StudyPlanItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlanItem2 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (StudyPlanItem2?.setOrganization)
                {
                    await
                    StudyPlanItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlanItem3 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (StudyPlanItem3?.setOrganization)
                {
                    await
                    StudyPlanItem3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const StudyPlanItem4 = await StudyPlanItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (StudyPlanItem4?.setOrganization)
                {
                    await
                    StudyPlanItem4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDashboardSnapshotWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DashboardSnapshot0 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DashboardSnapshot0?.setUser)
                {
                    await
                    DashboardSnapshot0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DashboardSnapshot1 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DashboardSnapshot1?.setUser)
                {
                    await
                    DashboardSnapshot1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DashboardSnapshot2 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DashboardSnapshot2?.setUser)
                {
                    await
                    DashboardSnapshot2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DashboardSnapshot3 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DashboardSnapshot3?.setUser)
                {
                    await
                    DashboardSnapshot3.
                    setUser(relatedUser3);
                }
            
                const relatedUser4 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DashboardSnapshot4 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DashboardSnapshot4?.setUser)
                {
                    await
                    DashboardSnapshot4.
                    setUser(relatedUser4);
                }
            
        }
        
    
        
            
            async function associateDashboardSnapshotWithWorkspace() {
            
                const relatedWorkspace0 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const DashboardSnapshot0 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DashboardSnapshot0?.setWorkspace)
                {
                    await
                    DashboardSnapshot0.
                    setWorkspace(relatedWorkspace0);
                }
            
                const relatedWorkspace1 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const DashboardSnapshot1 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DashboardSnapshot1?.setWorkspace)
                {
                    await
                    DashboardSnapshot1.
                    setWorkspace(relatedWorkspace1);
                }
            
                const relatedWorkspace2 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const DashboardSnapshot2 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DashboardSnapshot2?.setWorkspace)
                {
                    await
                    DashboardSnapshot2.
                    setWorkspace(relatedWorkspace2);
                }
            
                const relatedWorkspace3 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const DashboardSnapshot3 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DashboardSnapshot3?.setWorkspace)
                {
                    await
                    DashboardSnapshot3.
                    setWorkspace(relatedWorkspace3);
                }
            
                const relatedWorkspace4 = await Workspaces.findOne({
                    offset: Math.floor(Math.random() * (await Workspaces.count())),
                });
                const DashboardSnapshot4 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DashboardSnapshot4?.setWorkspace)
                {
                    await
                    DashboardSnapshot4.
                    setWorkspace(relatedWorkspace4);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDashboardSnapshotWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DashboardSnapshot0 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DashboardSnapshot0?.setOrganization)
                {
                    await
                    DashboardSnapshot0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DashboardSnapshot1 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DashboardSnapshot1?.setOrganization)
                {
                    await
                    DashboardSnapshot1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DashboardSnapshot2 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DashboardSnapshot2?.setOrganization)
                {
                    await
                    DashboardSnapshot2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DashboardSnapshot3 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DashboardSnapshot3?.setOrganization)
                {
                    await
                    DashboardSnapshot3.
                    setOrganization(relatedOrganization3);
                }
            
                const relatedOrganization4 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DashboardSnapshot4 = await DashboardSnapshots.findOne({
                    order: [['id', 'ASC']],
                    offset: 4
                });
                if (DashboardSnapshot4?.setOrganization)
                {
                    await
                    DashboardSnapshot4.
                    setOrganization(relatedOrganization4);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Workspaces.bulkCreate(WorkspacesData);
                
            
            
                
                await WorkspaceMemberships.bulkCreate(WorkspaceMembershipsData);
                
            
            
                
                await Subjects.bulkCreate(SubjectsData);
                
            
            
                
                await Topics.bulkCreate(TopicsData);
                
            
            
                
                await Pages.bulkCreate(PagesData);
                
            
            
                
                await Blocks.bulkCreate(BlocksData);
                
            
            
                
                await Databases.bulkCreate(DatabasesData);
                
            
            
                
                await DatabaseEntries.bulkCreate(DatabaseEntriesData);
                
            
            
                
                await Sources.bulkCreate(SourcesData);
                
            
            
                
                await SourceChunks.bulkCreate(SourceChunksData);
                
            
            
                
                await AiJobs.bulkCreate(AiJobsData);
                
            
            
                
                await ConceptMaps.bulkCreate(ConceptMapsData);
                
            
            
                
                await StudyGuides.bulkCreate(StudyGuidesData);
                
            
            
                
                await FlashcardDecks.bulkCreate(FlashcardDecksData);
                
            
            
                
                await Flashcards.bulkCreate(FlashcardsData);
                
            
            
                
                await SpacedRepetitionStates.bulkCreate(SpacedRepetitionStatesData);
                
            
            
                
                await StudySessions.bulkCreate(StudySessionsData);
                
            
            
                
                await ReviewEvents.bulkCreate(ReviewEventsData);
                
            
            
                
                await Quizzes.bulkCreate(QuizzesData);
                
            
            
                
                await QuizQuestions.bulkCreate(QuizQuestionsData);
                
            
            
                
                await QuizAttempts.bulkCreate(QuizAttemptsData);
                
            
            
                
                await TutorConversations.bulkCreate(TutorConversationsData);
                
            
            
                
                await TutorMessages.bulkCreate(TutorMessagesData);
                
            
            
                
                await StudyPlans.bulkCreate(StudyPlansData);
                
            
            
                
                await StudyPlanItems.bulkCreate(StudyPlanItemsData);
                
            
            
                
                await DashboardSnapshots.bulkCreate(DashboardSnapshotsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWorkspaceWithOwner(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWorkspaceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateWorkspaceMembershipWithWorkspace(),
                    
                
                    
                        
                        await associateWorkspaceMembershipWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWorkspaceMembershipWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSubjectWithWorkspace(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSubjectWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTopicWithSubject(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTopicWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePageWithWorkspace(),
                    
                
                    
                        
                        await associatePageWithSubject(),
                    
                
                    
                        
                        await associatePageWithTopic(),
                    
                
                    
                        
                        await associatePageWithParent_page(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateBlockWithPage(),
                    
                
                    
                        
                        await associateBlockWithParent_block(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateBlockWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDatabasWithWorkspace(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDatabasWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDatabaseEntryWithDatabase(),
                    
                
                    
                        
                        await associateDatabaseEntryWithSubject(),
                    
                
                    
                        
                        await associateDatabaseEntryWithTopic(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDatabaseEntryWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSourceWithWorkspace(),
                    
                
                    
                        
                        await associateSourceWithSubject(),
                    
                
                    
                        
                        await associateSourceWithTopic(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSourceWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSourceChunkWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSourceChunkWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAiJobWithWorkspace(),
                    
                
                    
                        
                        await associateAiJobWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAiJobWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateConceptMapWithWorkspace(),
                    
                
                    
                        
                        await associateConceptMapWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateConceptMapWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStudyGuideWithWorkspace(),
                    
                
                    
                        
                        await associateStudyGuideWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStudyGuideWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFlashcardDeckWithWorkspace(),
                    
                
                    
                        
                        await associateFlashcardDeckWithSubject(),
                    
                
                    
                        
                        await associateFlashcardDeckWithTopic(),
                    
                
                    
                        
                        await associateFlashcardDeckWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFlashcardDeckWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFlashcardWithDeck(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFlashcardWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSpacedRepetitionStateWithUser(),
                    
                
                    
                        
                        await associateSpacedRepetitionStateWithFlashcard(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSpacedRepetitionStateWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStudySessionWithUser(),
                    
                
                    
                        
                        await associateStudySessionWithWorkspace(),
                    
                
                    
                        
                        await associateStudySessionWithSubject(),
                    
                
                    
                        
                        await associateStudySessionWithTopic(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStudySessionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateReviewEventWithSession(),
                    
                
                    
                        
                        await associateReviewEventWithFlashcard(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateReviewEventWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateQuizzeWithWorkspace(),
                    
                
                    
                        
                        await associateQuizzeWithSubject(),
                    
                
                    
                        
                        await associateQuizzeWithTopic(),
                    
                
                    
                        
                        await associateQuizzeWithSource(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateQuizzeWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateQuizQuestionWithQuiz(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateQuizQuestionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateQuizAttemptWithQuiz(),
                    
                
                    
                        
                        await associateQuizAttemptWithUser(),
                    
                
                    
                        
                        await associateQuizAttemptWithSession(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateQuizAttemptWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTutorConversationWithWorkspace(),
                    
                
                    
                        
                        await associateTutorConversationWithUser(),
                    
                
                    
                        
                        await associateTutorConversationWithSubject(),
                    
                
                    
                        
                        await associateTutorConversationWithTopic(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTutorConversationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTutorMessageWithConversation(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTutorMessageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStudyPlanWithUser(),
                    
                
                    
                        
                        await associateStudyPlanWithWorkspace(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStudyPlanWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStudyPlanItemWithStudy_plan(),
                    
                
                    
                        
                        await associateStudyPlanItemWithSubject(),
                    
                
                    
                        
                        await associateStudyPlanItemWithTopic(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStudyPlanItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDashboardSnapshotWithUser(),
                    
                
                    
                        
                        await associateDashboardSnapshotWithWorkspace(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDashboardSnapshotWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('workspaces', null, {});
            
            
            await queryInterface.bulkDelete('workspace_memberships', null, {});
            
            
            await queryInterface.bulkDelete('subjects', null, {});
            
            
            await queryInterface.bulkDelete('topics', null, {});
            
            
            await queryInterface.bulkDelete('pages', null, {});
            
            
            await queryInterface.bulkDelete('blocks', null, {});
            
            
            await queryInterface.bulkDelete('databases', null, {});
            
            
            await queryInterface.bulkDelete('database_entries', null, {});
            
            
            await queryInterface.bulkDelete('sources', null, {});
            
            
            await queryInterface.bulkDelete('source_chunks', null, {});
            
            
            await queryInterface.bulkDelete('ai_jobs', null, {});
            
            
            await queryInterface.bulkDelete('concept_maps', null, {});
            
            
            await queryInterface.bulkDelete('study_guides', null, {});
            
            
            await queryInterface.bulkDelete('flashcard_decks', null, {});
            
            
            await queryInterface.bulkDelete('flashcards', null, {});
            
            
            await queryInterface.bulkDelete('spaced_repetition_states', null, {});
            
            
            await queryInterface.bulkDelete('study_sessions', null, {});
            
            
            await queryInterface.bulkDelete('review_events', null, {});
            
            
            await queryInterface.bulkDelete('quizzes', null, {});
            
            
            await queryInterface.bulkDelete('quiz_questions', null, {});
            
            
            await queryInterface.bulkDelete('quiz_attempts', null, {});
            
            
            await queryInterface.bulkDelete('tutor_conversations', null, {});
            
            
            await queryInterface.bulkDelete('tutor_messages', null, {});
            
            
            await queryInterface.bulkDelete('study_plans', null, {});
            
            
            await queryInterface.bulkDelete('study_plan_items', null, {});
            
            
            await queryInterface.bulkDelete('dashboard_snapshots', null, {});
            
        
    },
};