





















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






const Organizations = db.organizations;

const Stores = db.stores;

const Pages = db.pages;

const Collections = db.collections;

const Products = db.products;

const ProductVariants = db.product_variants;

const Customers = db.customers;

const Addresses = db.addresses;

const Orders = db.orders;

const OrderItems = db.order_items;

const Fulfillments = db.fulfillments;

const Payments = db.payments;

const DiscountCodes = db.discount_codes;

const Refunds = db.refunds;

const InventoryAdjustments = db.inventory_adjustments;

const FaqArticles = db.faq_articles;

const ChatbotConfigs = db.chatbot_configs;

const ChatSessions = db.chat_sessions;

const ChatMessages = db.chat_messages;

const SupportTickets = db.support_tickets;

const ShopifySyncJobs = db.shopify_sync_jobs;







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



const StoresData = [
    
    {
    
        
        
            
                "store_name": "Northwind Outfitters",
            
        
    
        
        
            
                "shopify_domain": "northwind-outfitters.myshopify.com",
            
        
    
        
        
            
                "shopify_storefront_url": "https://northwindoutfitters.com",
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "primary_locale": "en-US",
            
        
    
        
        
            
                "is_connected": true,
            
        
    
        
        
            
                "connected_at": new Date('2026-01-10T15:00:00Z'),
            
        
    
        
        
            
                "shopify_api_version": "2025-01",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Harbor & Pine",
            
        
    
        
        
            
                "shopify_domain": "harbor-pine.myshopify.com",
            
        
    
        
        
            
                "shopify_storefront_url": "https://harborandpine.com",
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "primary_locale": "en-US",
            
        
    
        
        
            
                "is_connected": true,
            
        
    
        
        
            
                "connected_at": new Date('2026-01-22T18:30:00Z'),
            
        
    
        
        
            
                "shopify_api_version": "2025-01",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Saffron & Stone",
            
        
    
        
        
            
                "shopify_domain": "saffron-stone.myshopify.com",
            
        
    
        
        
            
                "shopify_storefront_url": "https://saffronandstone.com",
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "primary_locale": "en-US",
            
        
    
        
        
            
                "is_connected": true,
            
        
    
        
        
            
                "connected_at": new Date('2026-02-01T09:45:00Z'),
            
        
    
        
        
            
                "shopify_api_version": "2025-01",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Alpine Trail Co.",
            
        
    
        
        
            
                "shopify_domain": "alpine-trail-co.myshopify.com",
            
        
    
        
        
            
                "shopify_storefront_url": "https://alpintrailco.com",
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "primary_locale": "en-US",
            
        
    
        
        
            
                "is_connected": true,
            
        
    
        
        
            
                "connected_at": new Date('2025-12-05T20:10:00Z'),
            
        
    
        
        
            
                "shopify_api_version": "2025-01",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "About Us",
            
        
    
        
        
            
                "slug": "about-us",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "meta_title": "About Northwind Outfitters",
            
        
    
        
        
            
                "meta_description": "Learn about our mission and how we source our products.",
            
        
    
        
        
            
                "content": "Northwind Outfitters is dedicated to quality essentials and reliable service.",
            
        
    
        
        
            
                "published_at": new Date('2026-01-12T10:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Shipping Policy",
            
        
    
        
        
            
                "slug": "shipping-policy",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "meta_title": "Shipping Policy",
            
        
    
        
        
            
                "meta_description": "Details on shipping times, carriers, and costs.",
            
        
    
        
        
            
                "content": "Orders ship within 1-2 business days. Standard shipping is available at checkout.",
            
        
    
        
        
            
                "published_at": new Date('2026-01-12T10:30:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Returns & Exchanges",
            
        
    
        
        
            
                "slug": "returns",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "meta_title": "Returns and Exchanges",
            
        
    
        
        
            
                "meta_description": "How to initiate returns and exchanges.",
            
        
    
        
        
            
                "content": "Returns are accepted within 30 days of delivery in unused condition.",
            
        
    
        
        
            
                "published_at": new Date('2026-01-13T09:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Contact",
            
        
    
        
        
            
                "slug": "contact",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "meta_title": "Contact Harbor & Pine",
            
        
    
        
        
            
                "meta_description": "Reach our team for product and order questions.",
            
        
    
        
        
            
                "content": "Contact us via email and we will respond within one business day.",
            
        
    
        
        
            
                "published_at": new Date('2026-01-25T14:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CollectionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "collection_name": "Best Sellers",
            
        
    
        
        
            
                "handle": "best-sellers",
            
        
    
        
        
            
                "description": "Customer favorites and top-performing items.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "collection_name": "Outerwear",
            
        
    
        
        
            
                "handle": "outerwear",
            
        
    
        
        
            
                "description": "Jackets and layers built for changing weather.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "collection_name": "Home Essentials",
            
        
    
        
        
            
                "handle": "home-essentials",
            
        
    
        
        
            
                "description": "Clean design for everyday living.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "collection_name": "Trail Gear",
            
        
    
        
        
            
                "handle": "trail-gear",
            
        
    
        
        
            
                "description": "Hiking-ready accessories and packs.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProductsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_title": "Nimbus Fleece Hoodie",
            
        
    
        
        
            
                "handle": "nimbus-fleece-hoodie",
            
        
    
        
        
            
                "vendor": "Northwind Outfitters",
            
        
    
        
        
            
                "product_type": "Apparel",
            
        
    
        
        
            
                "description": "Soft fleece hoodie with a structured fit for everyday wear.",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_featured_top3": true,
            
        
    
        
        
            
                "current_sales_rank": 1,
            
        
    
        
        
            
                "total_sales_count": 1840,
            
        
    
        
        
            
                "published_at": new Date('2026-01-11T08:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_title": "Cascade Insulated Jacket",
            
        
    
        
        
            
                "handle": "cascade-insulated-jacket",
            
        
    
        
        
            
                "vendor": "Northwind Outfitters",
            
        
    
        
        
            
                "product_type": "Outerwear",
            
        
    
        
        
            
                "description": "Lightweight insulated jacket designed for warmth without bulk.",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_featured_top3": true,
            
        
    
        
        
            
                "current_sales_rank": 2,
            
        
    
        
        
            
                "total_sales_count": 1325,
            
        
    
        
        
            
                "published_at": new Date('2026-01-11T08:10:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_title": "Summit Trail Backpack 28L",
            
        
    
        
        
            
                "handle": "summit-trail-backpack-28l",
            
        
    
        
        
            
                "vendor": "Northwind Outfitters",
            
        
    
        
        
            
                "product_type": "Accessories",
            
        
    
        
        
            
                "description": "Durable 28L backpack with multiple compartments and breathable back panel.",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_featured_top3": true,
            
        
    
        
        
            
                "current_sales_rank": 3,
            
        
    
        
        
            
                "total_sales_count": 980,
            
        
    
        
        
            
                "published_at": new Date('2026-01-11T08:20:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_title": "Stoneware Mug Set",
            
        
    
        
        
            
                "handle": "stoneware-mug-set",
            
        
    
        
        
            
                "vendor": "Harbor & Pine",
            
        
    
        
        
            
                "product_type": "Home Goods",
            
        
    
        
        
            
                "description": "Set of 4 stoneware mugs with a matte glaze finish.",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_featured_top3": false,
            
        
    
        
        
            
                "current_sales_rank": 7,
            
        
    
        
        
            
                "total_sales_count": 410,
            
        
    
        
        
            
                "published_at": new Date('2026-01-26T12:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProductVariantsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_title": "Nimbus Fleece Hoodie - Small - Charcoal",
            
        
    
        
        
            
                "sku": "NWH-NIM-HOD-S-CHA",
            
        
    
        
        
            
                "barcode": "810000100001",
            
        
    
        
        
            
                "price": 64.0,
            
        
    
        
        
            
                "compare_at_price": 79.0,
            
        
    
        
        
            
                "inventory_quantity": 120,
            
        
    
        
        
            
                "inventory_policy": "continue",
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                "weight": 0.65,
            
        
    
        
        
            
                "weight_unit": "kg",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_title": "Nimbus Fleece Hoodie - Medium - Charcoal",
            
        
    
        
        
            
                "sku": "NWH-NIM-HOD-M-CHA",
            
        
    
        
        
            
                "barcode": "810000100002",
            
        
    
        
        
            
                "price": 64.0,
            
        
    
        
        
            
                "compare_at_price": 79.0,
            
        
    
        
        
            
                "inventory_quantity": 140,
            
        
    
        
        
            
                "inventory_policy": "continue",
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                "weight": 0.68,
            
        
    
        
        
            
                "weight_unit": "kg",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_title": "Cascade Insulated Jacket - Medium - Navy",
            
        
    
        
        
            
                "sku": "NWH-CAS-JKT-M-NAV",
            
        
    
        
        
            
                "barcode": "810000200010",
            
        
    
        
        
            
                "price": 139.0,
            
        
    
        
        
            
                "compare_at_price": 169.0,
            
        
    
        
        
            
                "inventory_quantity": 85,
            
        
    
        
        
            
                "inventory_policy": "deny",
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                "weight": 0.95,
            
        
    
        
        
            
                "weight_unit": "kg",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_title": "Summit Trail Backpack 28L - One Size - Black",
            
        
    
        
        
            
                "sku": "NWH-SUM-BPK-28-BLK",
            
        
    
        
        
            
                "barcode": "810000300100",
            
        
    
        
        
            
                "price": 89.0,
            
        
    
        
        
            
                "compare_at_price": 109.0,
            
        
    
        
        
            
                "inventory_quantity": 60,
            
        
    
        
        
            
                "inventory_policy": "continue",
            
        
    
        
        
            
                "taxable": true,
            
        
    
        
        
            
                "weight": 0.8,
            
        
    
        
        
            
                "weight_unit": "kg",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CustomersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Casey",
            
        
    
        
        
            
                "last_name": "Wright",
            
        
    
        
        
            
                "email": "casey.wright@example.com",
            
        
    
        
        
            
                "phone": "4155550138",
            
        
    
        
        
            
                "customer_state": "invited",
            
        
    
        
        
            
                "created_on_shopify_at": new Date('2025-11-15T17:25:00Z'),
            
        
    
        
        
            
                "orders_count": 6,
            
        
    
        
        
            
                "total_spent": 612.4,
            
        
    
        
        
            
                "notes": "Prefers delivery to office address.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Drew",
            
        
    
        
        
            
                "last_name": "Martinez",
            
        
    
        
        
            
                "email": "drew.martinez@example.com",
            
        
    
        
        
            
                "phone": "2065550199",
            
        
    
        
        
            
                "customer_state": "disabled",
            
        
    
        
        
            
                "created_on_shopify_at": new Date('2026-01-03T10:14:00Z'),
            
        
    
        
        
            
                "orders_count": 2,
            
        
    
        
        
            
                "total_spent": 228.0,
            
        
    
        
        
            
                "notes": "Asked about size guide for jackets.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Jamie",
            
        
    
        
        
            
                "last_name": "Ng",
            
        
    
        
        
            
                "email": "jamie.ng@example.com",
            
        
    
        
        
            
                "phone": "3125550177",
            
        
    
        
        
            
                "customer_state": "invited",
            
        
    
        
        
            
                "created_on_shopify_at": new Date('2026-01-24T08:05:00Z'),
            
        
    
        
        
            
                "orders_count": 1,
            
        
    
        
        
            
                "total_spent": 42.0,
            
        
    
        
        
            
                "notes": "Gift purchase, requested plain packaging.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "first_name": "Sam",
            
        
    
        
        
            
                "last_name": "Hughes",
            
        
    
        
        
            
                "email": "sam.hughes@example.com",
            
        
    
        
        
            
                "phone": "3035550122",
            
        
    
        
        
            
                "customer_state": "disabled",
            
        
    
        
        
            
                "created_on_shopify_at": new Date('2026-02-02T15:40:00Z'),
            
        
    
        
        
            
                "orders_count": 0,
            
        
    
        
        
            
                "total_spent": 0.0,
            
        
    
        
        
            
                "notes": "Signed up from newsletter landing page.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AddressesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Office",
            
        
    
        
        
            
                "first_name": "Casey",
            
        
    
        
        
            
                "last_name": "Wright",
            
        
    
        
        
            
                "company": "Wright & Co",
            
        
    
        
        
            
                "address1": "455 Market St",
            
        
    
        
        
            
                "address2": "Suite 1200",
            
        
    
        
        
            
                "city": "San Francisco",
            
        
    
        
        
            
                "province": "CA",
            
        
    
        
        
            
                "postal_code": "94105",
            
        
    
        
        
            
                "country": "US",
            
        
    
        
        
            
                "phone": "4155550138",
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Home",
            
        
    
        
        
            
                "first_name": "Casey",
            
        
    
        
        
            
                "last_name": "Wright",
            
        
    
        
        
            
                "company": "",
            
        
    
        
        
            
                "address1": "221 Pine St",
            
        
    
        
        
            
                "address2": "Apt 7B",
            
        
    
        
        
            
                "city": "San Francisco",
            
        
    
        
        
            
                "province": "CA",
            
        
    
        
        
            
                "postal_code": "94108",
            
        
    
        
        
            
                "country": "US",
            
        
    
        
        
            
                "phone": "4155550138",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Home",
            
        
    
        
        
            
                "first_name": "Drew",
            
        
    
        
        
            
                "last_name": "Martinez",
            
        
    
        
        
            
                "company": "",
            
        
    
        
        
            
                "address1": "901 3rd Ave",
            
        
    
        
        
            
                "address2": "Unit 14",
            
        
    
        
        
            
                "city": "Seattle",
            
        
    
        
        
            
                "province": "WA",
            
        
    
        
        
            
                "postal_code": "98104",
            
        
    
        
        
            
                "country": "US",
            
        
    
        
        
            
                "phone": "2065550199",
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Home",
            
        
    
        
        
            
                "first_name": "Jamie",
            
        
    
        
        
            
                "last_name": "Ng",
            
        
    
        
        
            
                "company": "",
            
        
    
        
        
            
                "address1": "77 W Wacker Dr",
            
        
    
        
        
            
                "address2": "Floor 9",
            
        
    
        
        
            
                "city": "Chicago",
            
        
    
        
        
            
                "province": "IL",
            
        
    
        
        
            
                "postal_code": "60601",
            
        
    
        
        
            
                "country": "US",
            
        
    
        
        
            
                "phone": "3125550177",
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrdersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "NW-10482",
            
        
    
        
        
            
                "order_status": "draft",
            
        
    
        
        
            
                "financial_status": "paid",
            
        
    
        
        
            
                "fulfillment_status": "partial",
            
        
    
        
        
            
                "subtotal_price": 153.0,
            
        
    
        
        
            
                "shipping_price": 8.0,
            
        
    
        
        
            
                "tax_price": 13.77,
            
        
    
        
        
            
                "discount_total": 0.0,
            
        
    
        
        
            
                "total_price": 174.77,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-14T19:10:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "cancel_reason": "Customer changed mind",
            
        
    
        
        
            
                "internal_note": "Rush handling requested via email.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "NW-10483",
            
        
    
        
        
            
                "order_status": "completed",
            
        
    
        
        
            
                "financial_status": "refunded",
            
        
    
        
        
            
                "fulfillment_status": "unfulfilled",
            
        
    
        
        
            
                "subtotal_price": 139.0,
            
        
    
        
        
            
                "shipping_price": 0.0,
            
        
    
        
        
            
                "tax_price": 12.51,
            
        
    
        
        
            
                "discount_total": 0.0,
            
        
    
        
        
            
                "total_price": 151.51,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-15T10:05:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "cancel_reason": "Payment review",
            
        
    
        
        
            
                "internal_note": "Hold until fraud check clears.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "HP-20011",
            
        
    
        
        
            
                "order_status": "open",
            
        
    
        
        
            
                "financial_status": "voided",
            
        
    
        
        
            
                "fulfillment_status": "unfulfilled",
            
        
    
        
        
            
                "subtotal_price": 42.0,
            
        
    
        
        
            
                "shipping_price": 6.0,
            
        
    
        
        
            
                "tax_price": 3.93,
            
        
    
        
        
            
                "discount_total": 0.0,
            
        
    
        
        
            
                "total_price": 51.93,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "placed_at": new Date('2026-01-28T13:22:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "cancel_reason": "N/A",
            
        
    
        
        
            
                "internal_note": "Gift note included.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_number": "AT-30007",
            
        
    
        
        
            
                "order_status": "completed",
            
        
    
        
        
            
                "financial_status": "paid",
            
        
    
        
        
            
                "fulfillment_status": "partial",
            
        
    
        
        
            
                "subtotal_price": 89.0,
            
        
    
        
        
            
                "shipping_price": 0.0,
            
        
    
        
        
            
                "tax_price": 0.0,
            
        
    
        
        
            
                "discount_total": 10.0,
            
        
    
        
        
            
                "total_price": 79.0,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-19T21:40:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "cancel_reason": "N/A",
            
        
    
        
        
            
                "internal_note": "Draft created from abandoned checkout recovery.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "title": "Nimbus Fleece Hoodie",
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 64.0,
            
        
    
        
        
            
                "line_discount": 0.0,
            
        
    
        
        
            
                "line_total": 64.0,
            
        
    
        
        
            
                "fulfillment_service": "manual",
            
        
    
        
        
            
                // 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": "Summit Trail Backpack 28L",
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 89.0,
            
        
    
        
        
            
                "line_discount": 0.0,
            
        
    
        
        
            
                "line_total": 89.0,
            
        
    
        
        
            
                "fulfillment_service": "manual",
            
        
    
        
        
            
                // 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": "Cascade Insulated Jacket",
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 139.0,
            
        
    
        
        
            
                "line_discount": 0.0,
            
        
    
        
        
            
                "line_total": 139.0,
            
        
    
        
        
            
                "fulfillment_service": "manual",
            
        
    
        
        
            
                // 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": "Stoneware Mug Set",
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 42.0,
            
        
    
        
        
            
                "line_discount": 0.0,
            
        
    
        
        
            
                "line_total": 42.0,
            
        
    
        
        
            
                "fulfillment_service": "manual",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FulfillmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "success",
            
        
    
        
        
            
                "tracking_company": "UPS",
            
        
    
        
        
            
                "tracking_number": "1Z4F12W90311890012",
            
        
    
        
        
            
                "tracking_url": "https://www.ups.com/track?tracknum=1Z4F12W90311890012",
            
        
    
        
        
            
                "shipped_at": new Date('2026-01-29T16:10:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-02-02T12:45:00Z'),
            
        
    
        
        
            
                "note": "Left at front desk.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "error",
            
        
    
        
        
            
                "tracking_company": "USPS",
            
        
    
        
        
            
                "tracking_number": "9400111202555123456789",
            
        
    
        
        
            
                "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111202555123456789",
            
        
    
        
        
            
                "shipped_at": new Date('2026-02-16T20:05:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-02-20T17:10:00Z'),
            
        
    
        
        
            
                "note": "Awaiting carrier scan.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "tracking_company": "FedEx",
            
        
    
        
        
            
                "tracking_number": "784512309876",
            
        
    
        
        
            
                "tracking_url": "https://www.fedex.com/fedextrack/?trknbr=784512309876",
            
        
    
        
        
            
                "shipped_at": new Date('2026-02-17T18:22:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-02-19T15:40:00Z'),
            
        
    
        
        
            
                "note": "Partial shipment, one item backordered.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "tracking_company": "DHL",
            
        
    
        
        
            
                "tracking_number": "JD014600006392001234",
            
        
    
        
        
            
                "tracking_url": "https://www.dhl.com/global-en/home/tracking.html?tracking-id=JD014600006392001234",
            
        
    
        
        
            
                "shipped_at": new Date('2026-02-16T09:12:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-02-18T11:00:00Z'),
            
        
    
        
        
            
                "note": "Shipment voided after payment hold.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_kind": "authorization",
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "amount": 174.77,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "gateway": "shopify_payments",
            
        
    
        
        
            
                "transaction_reference": "ch_3P1nWm2A9zQ4",
            
        
    
        
        
            
                "processed_at": new Date('2026-02-14T19:11:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_kind": "authorization",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "amount": 151.51,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "gateway": "shopify_payments",
            
        
    
        
        
            
                "transaction_reference": "auth_9V1kQp8L0xT7",
            
        
    
        
        
            
                "processed_at": new Date('2026-02-15T10:06:00Z'),
            
        
    
        
        
            
                "failure_reason": "Under review",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_kind": "capture",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "amount": 51.93,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "gateway": "paypal",
            
        
    
        
        
            
                "transaction_reference": "PAYPAL-8RW30112XY",
            
        
    
        
        
            
                "processed_at": new Date('2026-01-28T13:23:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_kind": "refund",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "amount": 159.77,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "gateway": "shopify_payments",
            
        
    
        
        
            
                "transaction_reference": "ch_1K9sLm7R2bP0",
            
        
    
        
        
            
                "processed_at": new Date('2026-02-16T08:56:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DiscountCodesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "code": "WELCOME10",
            
        
    
        
        
            
                "discount_type": "fixed_amount",
            
        
    
        
        
            
                "value": 10.0,
            
        
    
        
        
            
                "status": "disabled",
            
        
    
        
        
            
                "starts_at": new Date('2026-01-01T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-12-31T23:59:00Z'),
            
        
    
        
        
            
                "usage_limit": 5000,
            
        
    
        
        
            
                "used_count": 312,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "code": "FREESHIP50",
            
        
    
        
        
            
                "discount_type": "percentage",
            
        
    
        
        
            
                "value": 0.0,
            
        
    
        
        
            
                "status": "expired",
            
        
    
        
        
            
                "starts_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-06-30T23:59:00Z'),
            
        
    
        
        
            
                "usage_limit": 2000,
            
        
    
        
        
            
                "used_count": 128,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "code": "HOME15",
            
        
    
        
        
            
                "discount_type": "free_shipping",
            
        
    
        
        
            
                "value": 15.0,
            
        
    
        
        
            
                "status": "disabled",
            
        
    
        
        
            
                "starts_at": new Date('2026-01-15T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-02-15T23:59:00Z'),
            
        
    
        
        
            
                "usage_limit": 1000,
            
        
    
        
        
            
                "used_count": 640,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "code": "TRAIL10",
            
        
    
        
        
            
                "discount_type": "percentage",
            
        
    
        
        
            
                "value": 10.0,
            
        
    
        
        
            
                "status": "disabled",
            
        
    
        
        
            
                "starts_at": new Date('2025-12-01T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-03-31T23:59:00Z'),
            
        
    
        
        
            
                "usage_limit": 3000,
            
        
    
        
        
            
                "used_count": 875,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RefundsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 64.0,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-17T10:20:00Z'),
            
        
    
        
        
            
                "processed_at": new Date('2026-02-18T09:30:00Z'),
            
        
    
        
        
            
                "reason": "Item damaged",
            
        
    
        
        
            
                "note": "Customer provided photos, refunded one hoodie.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 151.51,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-16T12:00:00Z'),
            
        
    
        
        
            
                "processed_at": new Date('2026-02-16T12:30:00Z'),
            
        
    
        
        
            
                "reason": "Authorization void attempt",
            
        
    
        
        
            
                "note": "Authorization could not be voided before expiry.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 6.0,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-03T09:10:00Z'),
            
        
    
        
        
            
                "processed_at": new Date('2026-02-03T10:00:00Z'),
            
        
    
        
        
            
                "reason": "Shipping refund",
            
        
    
        
        
            
                "note": "Refunded shipping due to late delivery.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 8.0,
            
        
    
        
        
            
                "currency_code": "USD",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-20T18:00:00Z'),
            
        
    
        
        
            
                "processed_at": new Date('2026-02-20T18:05:00Z'),
            
        
    
        
        
            
                "reason": "Carrier delay",
            
        
    
        
        
            
                "note": "Pending approval for goodwill shipping refund.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InventoryAdjustmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjustment_type": "shrink",
            
        
    
        
        
            
                "delta_quantity": 25,
            
        
    
        
        
            
                "resulting_quantity": 145,
            
        
    
        
        
            
                "reason": "Inbound shipment received",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjusted_at": new Date('2026-02-10T15:05:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjustment_type": "restock",
            
        
    
        
        
            
                "delta_quantity": -3,
            
        
    
        
        
            
                "resulting_quantity": 137,
            
        
    
        
        
            
                "reason": "Cycle count correction",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjusted_at": new Date('2026-02-12T11:20:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjustment_type": "shrink",
            
        
    
        
        
            
                "delta_quantity": -2,
            
        
    
        
        
            
                "resulting_quantity": 83,
            
        
    
        
        
            
                "reason": "Damaged units during handling",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjusted_at": new Date('2026-02-13T09:45:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjustment_type": "correction",
            
        
    
        
        
            
                "delta_quantity": -1,
            
        
    
        
        
            
                "resulting_quantity": 59,
            
        
    
        
        
            
                "reason": "Warehouse shrinkage",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "adjusted_at": new Date('2026-02-14T18:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FaqArticlesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question": "How long does shipping take?",
            
        
    
        
        
            
                "answer": "Most orders ship in 1-2 business days. Delivery times vary by carrier and destination.",
            
        
    
        
        
            
                "category": "general",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question": "What is your return policy?",
            
        
    
        
        
            
                "answer": "Returns are accepted within 30 days of delivery for unused items with original packaging.",
            
        
    
        
        
            
                "category": "returns",
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question": "Which payment methods do you accept?",
            
        
    
        
        
            
                "answer": "We accept major credit cards, Shop Pay, and PayPal where available.",
            
        
    
        
        
            
                "category": "general",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "question": "How do I find the right size?",
            
        
    
        
        
            
                "answer": "Use the size guide on each product page. If you are between sizes, we recommend sizing up.",
            
        
    
        
        
            
                "category": "general",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "sort_order": 4,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ChatbotConfigsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "bot_name": "Northwind Helper",
            
        
    
        
        
            
                "model_provider": "google",
            
        
    
        
        
            
                "model_name": "gpt-4.1-mini",
            
        
    
        
        
            
                "system_prompt": "You are a helpful customer support assistant for Northwind Outfitters. Answer concisely and use store policies. If uncertain, offer to create a ticket.",
            
        
    
        
        
            
                "temperature": 0.3,
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "welcome_message": "Hi, I can help with shipping, returns, and order questions.",
            
        
    
        
        
            
                "handoff_mode": "email",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "bot_name": "Harbor Guide",
            
        
    
        
        
            
                "model_provider": "openai",
            
        
    
        
        
            
                "model_name": "claude-3.5-sonnet",
            
        
    
        
        
            
                "system_prompt": "You help customers with orders and product questions for Harbor and Pine. Keep a friendly, professional tone and reference the FAQ when possible.",
            
        
    
        
        
            
                "temperature": 0.4,
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "welcome_message": "Welcome! Ask me anything about your order or our products.",
            
        
    
        
        
            
                "handoff_mode": "email",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "bot_name": "Saffron Support",
            
        
    
        
        
            
                "model_provider": "azure_openai",
            
        
    
        
        
            
                "model_name": "gemini-1.5-flash",
            
        
    
        
        
            
                "system_prompt": "Provide answers for Saffron and Stone customers based on published policies and FAQs.",
            
        
    
        
        
            
                "temperature": 0.35,
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "welcome_message": "Hi! I can help answer common questions.",
            
        
    
        
        
            
                "handoff_mode": "live_chat_ticket",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "bot_name": "Trail Assistant",
            
        
    
        
        
            
                "model_provider": "azure_openai",
            
        
    
        
        
            
                "model_name": "gpt-4o-mini",
            
        
    
        
        
            
                "system_prompt": "Assist with trail gear questions, shipping timelines, and returns. Offer to open a support ticket if needed.",
            
        
    
        
        
            
                "temperature": 0.25,
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "welcome_message": "Hey there, need help with gear or an order?",
            
        
    
        
        
            
                "handoff_mode": "none",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ChatSessionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_key": "cs_9f1c2b3a4d",
            
        
    
        
        
            
                "channel": "order_status_page",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "started_at": new Date('2026-02-14T19:20:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-02-14T19:35:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_key": "cs_1a2b3c4d5e",
            
        
    
        
        
            
                "channel": "order_status_page",
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "started_at": new Date('2026-02-15T10:20:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-02-15T10:33:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_key": "cs_7e6d5c4b3a",
            
        
    
        
        
            
                "channel": "email_link",
            
        
    
        
        
            
                "status": "handoff",
            
        
    
        
        
            
                "started_at": new Date('2026-01-29T09:10:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-01-29T09:18:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_key": "cs_3c2d1e0f9a",
            
        
    
        
        
            
                "channel": "email_link",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "started_at": new Date('2026-02-19T21:45:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-02-19T22:10:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ChatMessagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "system",
            
        
    
        
        
            
                "sender_display_name": "Casey Wright",
            
        
    
        
        
            
                "message_text": "Can you confirm the shipping time to San Francisco?",
            
        
    
        
        
            
                "sent_at": new Date('2026-02-14T19:21:00Z'),
            
        
    
        
        
            
                "is_faq_suggested": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "agent",
            
        
    
        
        
            
                "sender_display_name": "Northwind Helper",
            
        
    
        
        
            
                "message_text": "Most orders ship in 1-2 business days. Delivery typically takes 2-5 business days after shipment depending on carrier.",
            
        
    
        
        
            
                "sent_at": new Date('2026-02-14T19:21:10Z'),
            
        
    
        
        
            
                "is_faq_suggested": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "system",
            
        
    
        
        
            
                "sender_display_name": "Drew Martinez",
            
        
    
        
        
            
                "message_text": "My payment shows authorized. When will the order ship?",
            
        
    
        
        
            
                "sent_at": new Date('2026-02-15T10:21:00Z'),
            
        
    
        
        
            
                "is_faq_suggested": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "system",
            
        
    
        
        
            
                "sender_display_name": "Northwind Helper",
            
        
    
        
        
            
                "message_text": "Once authorization clears to paid, we can ship. If it remains under review, I can open a support ticket for you.",
            
        
    
        
        
            
                "sent_at": new Date('2026-02-15T10:21:15Z'),
            
        
    
        
        
            
                "is_faq_suggested": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SupportTicketsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Payment authorization pending",
            
        
    
        
        
            
                "description": "Customer asked when the order will ship and the payment appears under review.",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                "status": "resolved",
            
        
    
        
        
            
                "opened_at": new Date('2026-02-15T10:23:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Item arrived damaged",
            
        
    
        
        
            
                "description": "Customer reported damage on one hoodie and requested a refund or replacement.",
            
        
    
        
        
            
                "priority": "low",
            
        
    
        
        
            
                "status": "resolved",
            
        
    
        
        
            
                "opened_at": new Date('2026-02-17T10:10:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-18T09:45:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Delivery arrived late",
            
        
    
        
        
            
                "description": "Customer requested shipping refund due to late delivery.",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                "status": "new",
            
        
    
        
        
            
                "opened_at": new Date('2026-02-03T09:05:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-03T11:15:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Discount code not applying",
            
        
    
        
        
            
                "description": "Customer reported TRAIL10 did not apply during checkout and requested assistance.",
            
        
    
        
        
            
                "priority": "urgent",
            
        
    
        
        
            
                "status": "new",
            
        
    
        
        
            
                "opened_at": new Date('2026-02-19T21:55:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ShopifySyncJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resource_type": "variants",
            
        
    
        
        
            
                "job_type": "incremental_sync",
            
        
    
        
        
            
                "status": "running",
            
        
    
        
        
            
                "started_at": new Date('2026-02-10T02:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-02-10T02:12:00Z'),
            
        
    
        
        
            
                "records_processed": 420,
            
        
    
        
        
            
                "error_message": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resource_type": "products",
            
        
    
        
        
            
                "job_type": "full_sync",
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "started_at": new Date('2026-02-19T02:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-02-19T02:03:00Z'),
            
        
    
        
        
            
                "records_processed": 38,
            
        
    
        
        
            
                "error_message": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resource_type": "refunds",
            
        
    
        
        
            
                "job_type": "full_sync",
            
        
    
        
        
            
                "status": "queued",
            
        
    
        
        
            
                "started_at": new Date('2026-02-18T03:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-02-18T03:01:00Z'),
            
        
    
        
        
            
                "records_processed": 0,
            
        
    
        
        
            
                "error_message": "Shopify API rate limit exceeded",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resource_type": "orders",
            
        
    
        
        
            
                "job_type": "webhook_replay",
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "started_at": new Date('2026-02-20T01:30:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-02-20T02:00:00Z'),
            
        
    
        
        
            
                "records_processed": 12,
            
        
    
        
        
            
                "error_message": "None",
            
        
    
        
        
            
                // 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);
                }
            
        }
        
    

    
    
    
    
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStoreWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store0 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Store0?.setOrganization)
                {
                    await
                    Store0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store1 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Store1?.setOrganization)
                {
                    await
                    Store1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store2 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Store2?.setOrganization)
                {
                    await
                    Store2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store3 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Store3?.setOrganization)
                {
                    await
                    Store3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePageWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Page0 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Page0?.setStore)
                {
                    await
                    Page0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Page1 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Page1?.setStore)
                {
                    await
                    Page1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Page2 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Page2?.setStore)
                {
                    await
                    Page2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Page3 = await Pages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Page3?.setStore)
                {
                    await
                    Page3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCollectionWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Collection0 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Collection0?.setStore)
                {
                    await
                    Collection0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Collection1 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Collection1?.setStore)
                {
                    await
                    Collection1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Collection2 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Collection2?.setStore)
                {
                    await
                    Collection2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Collection3 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Collection3?.setStore)
                {
                    await
                    Collection3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCollectionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Collection0 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Collection0?.setOrganization)
                {
                    await
                    Collection0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Collection1 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Collection1?.setOrganization)
                {
                    await
                    Collection1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Collection2 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Collection2?.setOrganization)
                {
                    await
                    Collection2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Collection3 = await Collections.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Collection3?.setOrganization)
                {
                    await
                    Collection3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProductWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setStore)
                {
                    await
                    Product0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setStore)
                {
                    await
                    Product1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setStore)
                {
                    await
                    Product2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setStore)
                {
                    await
                    Product3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateProductWithCollection() {
            
                const relatedCollection0 = await Collections.findOne({
                    offset: Math.floor(Math.random() * (await Collections.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setCollection)
                {
                    await
                    Product0.
                    setCollection(relatedCollection0);
                }
            
                const relatedCollection1 = await Collections.findOne({
                    offset: Math.floor(Math.random() * (await Collections.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setCollection)
                {
                    await
                    Product1.
                    setCollection(relatedCollection1);
                }
            
                const relatedCollection2 = await Collections.findOne({
                    offset: Math.floor(Math.random() * (await Collections.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setCollection)
                {
                    await
                    Product2.
                    setCollection(relatedCollection2);
                }
            
                const relatedCollection3 = await Collections.findOne({
                    offset: Math.floor(Math.random() * (await Collections.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setCollection)
                {
                    await
                    Product3.
                    setCollection(relatedCollection3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProductWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setOrganization)
                {
                    await
                    Product0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setOrganization)
                {
                    await
                    Product1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setOrganization)
                {
                    await
                    Product2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setOrganization)
                {
                    await
                    Product3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProductVariantWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductVariant0 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductVariant0?.setProduct)
                {
                    await
                    ProductVariant0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductVariant1 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductVariant1?.setProduct)
                {
                    await
                    ProductVariant1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductVariant2 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductVariant2?.setProduct)
                {
                    await
                    ProductVariant2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductVariant3 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductVariant3?.setProduct)
                {
                    await
                    ProductVariant3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProductVariantWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductVariant0 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductVariant0?.setOrganization)
                {
                    await
                    ProductVariant0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductVariant1 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductVariant1?.setOrganization)
                {
                    await
                    ProductVariant1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductVariant2 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductVariant2?.setOrganization)
                {
                    await
                    ProductVariant2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductVariant3 = await ProductVariants.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductVariant3?.setOrganization)
                {
                    await
                    ProductVariant3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCustomerWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Customer0 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Customer0?.setStore)
                {
                    await
                    Customer0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Customer1 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Customer1?.setStore)
                {
                    await
                    Customer1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Customer2 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Customer2?.setStore)
                {
                    await
                    Customer2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Customer3 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Customer3?.setStore)
                {
                    await
                    Customer3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCustomerWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Customer0 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Customer0?.setOrganization)
                {
                    await
                    Customer0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Customer1 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Customer1?.setOrganization)
                {
                    await
                    Customer1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Customer2 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Customer2?.setOrganization)
                {
                    await
                    Customer2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Customer3 = await Customers.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Customer3?.setOrganization)
                {
                    await
                    Customer3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateAddressWithCustomer() {
            
                const relatedCustomer0 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Address0 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Address0?.setCustomer)
                {
                    await
                    Address0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Address1 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Address1?.setCustomer)
                {
                    await
                    Address1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Address2 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Address2?.setCustomer)
                {
                    await
                    Address2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Address3 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Address3?.setCustomer)
                {
                    await
                    Address3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAddressWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address0 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Address0?.setOrganization)
                {
                    await
                    Address0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address1 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Address1?.setOrganization)
                {
                    await
                    Address1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address2 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Address2?.setOrganization)
                {
                    await
                    Address2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address3 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Address3?.setOrganization)
                {
                    await
                    Address3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateOrderWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setStore)
                {
                    await
                    Order0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setStore)
                {
                    await
                    Order1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setStore)
                {
                    await
                    Order2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setStore)
                {
                    await
                    Order3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateOrderWithCustomer() {
            
                const relatedCustomer0 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setCustomer)
                {
                    await
                    Order0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setCustomer)
                {
                    await
                    Order1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setCustomer)
                {
                    await
                    Order2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setCustomer)
                {
                    await
                    Order3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateOrderWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setOrganization)
                {
                    await
                    Order0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setOrganization)
                {
                    await
                    Order1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setOrganization)
                {
                    await
                    Order2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setOrganization)
                {
                    await
                    Order3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateOrderItemWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setOrder)
                {
                    await
                    OrderItem0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setOrder)
                {
                    await
                    OrderItem1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setOrder)
                {
                    await
                    OrderItem2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setOrder)
                {
                    await
                    OrderItem3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateOrderItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setProduct)
                {
                    await
                    OrderItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setProduct)
                {
                    await
                    OrderItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setProduct)
                {
                    await
                    OrderItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setProduct)
                {
                    await
                    OrderItem3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
            
            async function associateOrderItemWithVariant() {
            
                const relatedVariant0 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setVariant)
                {
                    await
                    OrderItem0.
                    setVariant(relatedVariant0);
                }
            
                const relatedVariant1 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setVariant)
                {
                    await
                    OrderItem1.
                    setVariant(relatedVariant1);
                }
            
                const relatedVariant2 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setVariant)
                {
                    await
                    OrderItem2.
                    setVariant(relatedVariant2);
                }
            
                const relatedVariant3 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setVariant)
                {
                    await
                    OrderItem3.
                    setVariant(relatedVariant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateOrderItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setOrganization)
                {
                    await
                    OrderItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setOrganization)
                {
                    await
                    OrderItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setOrganization)
                {
                    await
                    OrderItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setOrganization)
                {
                    await
                    OrderItem3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFulfillmentWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Fulfillment0 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Fulfillment0?.setOrder)
                {
                    await
                    Fulfillment0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Fulfillment1 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Fulfillment1?.setOrder)
                {
                    await
                    Fulfillment1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Fulfillment2 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Fulfillment2?.setOrder)
                {
                    await
                    Fulfillment2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Fulfillment3 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Fulfillment3?.setOrder)
                {
                    await
                    Fulfillment3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFulfillmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Fulfillment0 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Fulfillment0?.setOrganization)
                {
                    await
                    Fulfillment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Fulfillment1 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Fulfillment1?.setOrganization)
                {
                    await
                    Fulfillment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Fulfillment2 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Fulfillment2?.setOrganization)
                {
                    await
                    Fulfillment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Fulfillment3 = await Fulfillments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Fulfillment3?.setOrganization)
                {
                    await
                    Fulfillment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePaymentWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrder)
                {
                    await
                    Payment0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrder)
                {
                    await
                    Payment1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrder)
                {
                    await
                    Payment2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setOrder)
                {
                    await
                    Payment3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrganization)
                {
                    await
                    Payment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrganization)
                {
                    await
                    Payment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrganization)
                {
                    await
                    Payment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setOrganization)
                {
                    await
                    Payment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDiscountCodeWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const DiscountCode0 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DiscountCode0?.setStore)
                {
                    await
                    DiscountCode0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const DiscountCode1 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DiscountCode1?.setStore)
                {
                    await
                    DiscountCode1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const DiscountCode2 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DiscountCode2?.setStore)
                {
                    await
                    DiscountCode2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const DiscountCode3 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DiscountCode3?.setStore)
                {
                    await
                    DiscountCode3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDiscountCodeWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DiscountCode0 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DiscountCode0?.setOrganization)
                {
                    await
                    DiscountCode0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DiscountCode1 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DiscountCode1?.setOrganization)
                {
                    await
                    DiscountCode1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DiscountCode2 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DiscountCode2?.setOrganization)
                {
                    await
                    DiscountCode2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DiscountCode3 = await DiscountCodes.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DiscountCode3?.setOrganization)
                {
                    await
                    DiscountCode3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateRefundWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setOrder)
                {
                    await
                    Refund0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setOrder)
                {
                    await
                    Refund1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setOrder)
                {
                    await
                    Refund2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Refund3 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Refund3?.setOrder)
                {
                    await
                    Refund3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateRefundWithPayment() {
            
                const relatedPayment0 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setPayment)
                {
                    await
                    Refund0.
                    setPayment(relatedPayment0);
                }
            
                const relatedPayment1 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setPayment)
                {
                    await
                    Refund1.
                    setPayment(relatedPayment1);
                }
            
                const relatedPayment2 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setPayment)
                {
                    await
                    Refund2.
                    setPayment(relatedPayment2);
                }
            
                const relatedPayment3 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund3 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Refund3?.setPayment)
                {
                    await
                    Refund3.
                    setPayment(relatedPayment3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateRefundWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setOrganization)
                {
                    await
                    Refund0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setOrganization)
                {
                    await
                    Refund1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setOrganization)
                {
                    await
                    Refund2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Refund3 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Refund3?.setOrganization)
                {
                    await
                    Refund3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInventoryAdjustmentWithVariant() {
            
                const relatedVariant0 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryAdjustment0 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryAdjustment0?.setVariant)
                {
                    await
                    InventoryAdjustment0.
                    setVariant(relatedVariant0);
                }
            
                const relatedVariant1 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryAdjustment1 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryAdjustment1?.setVariant)
                {
                    await
                    InventoryAdjustment1.
                    setVariant(relatedVariant1);
                }
            
                const relatedVariant2 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryAdjustment2 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryAdjustment2?.setVariant)
                {
                    await
                    InventoryAdjustment2.
                    setVariant(relatedVariant2);
                }
            
                const relatedVariant3 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryAdjustment3 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryAdjustment3?.setVariant)
                {
                    await
                    InventoryAdjustment3.
                    setVariant(relatedVariant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInventoryAdjustmentWithAdjusted_by_user() {
            
                const relatedAdjusted_by_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const InventoryAdjustment0 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryAdjustment0?.setAdjusted_by_user)
                {
                    await
                    InventoryAdjustment0.
                    setAdjusted_by_user(relatedAdjusted_by_user0);
                }
            
                const relatedAdjusted_by_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const InventoryAdjustment1 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryAdjustment1?.setAdjusted_by_user)
                {
                    await
                    InventoryAdjustment1.
                    setAdjusted_by_user(relatedAdjusted_by_user1);
                }
            
                const relatedAdjusted_by_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const InventoryAdjustment2 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryAdjustment2?.setAdjusted_by_user)
                {
                    await
                    InventoryAdjustment2.
                    setAdjusted_by_user(relatedAdjusted_by_user2);
                }
            
                const relatedAdjusted_by_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const InventoryAdjustment3 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryAdjustment3?.setAdjusted_by_user)
                {
                    await
                    InventoryAdjustment3.
                    setAdjusted_by_user(relatedAdjusted_by_user3);
                }
            
        }
        
    
        
    
        
            
            async function associateInventoryAdjustmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryAdjustment0 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryAdjustment0?.setOrganization)
                {
                    await
                    InventoryAdjustment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryAdjustment1 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryAdjustment1?.setOrganization)
                {
                    await
                    InventoryAdjustment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryAdjustment2 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryAdjustment2?.setOrganization)
                {
                    await
                    InventoryAdjustment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryAdjustment3 = await InventoryAdjustments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryAdjustment3?.setOrganization)
                {
                    await
                    InventoryAdjustment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFaqArticleWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const FaqArticle0 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FaqArticle0?.setStore)
                {
                    await
                    FaqArticle0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const FaqArticle1 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FaqArticle1?.setStore)
                {
                    await
                    FaqArticle1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const FaqArticle2 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FaqArticle2?.setStore)
                {
                    await
                    FaqArticle2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const FaqArticle3 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FaqArticle3?.setStore)
                {
                    await
                    FaqArticle3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFaqArticleWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FaqArticle0 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FaqArticle0?.setOrganization)
                {
                    await
                    FaqArticle0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FaqArticle1 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FaqArticle1?.setOrganization)
                {
                    await
                    FaqArticle1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FaqArticle2 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FaqArticle2?.setOrganization)
                {
                    await
                    FaqArticle2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FaqArticle3 = await FaqArticles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FaqArticle3?.setOrganization)
                {
                    await
                    FaqArticle3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateChatbotConfigWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatbotConfig0 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatbotConfig0?.setStore)
                {
                    await
                    ChatbotConfig0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatbotConfig1 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatbotConfig1?.setStore)
                {
                    await
                    ChatbotConfig1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatbotConfig2 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatbotConfig2?.setStore)
                {
                    await
                    ChatbotConfig2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatbotConfig3 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatbotConfig3?.setStore)
                {
                    await
                    ChatbotConfig3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateChatbotConfigWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotConfig0 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatbotConfig0?.setOrganization)
                {
                    await
                    ChatbotConfig0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotConfig1 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatbotConfig1?.setOrganization)
                {
                    await
                    ChatbotConfig1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotConfig2 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatbotConfig2?.setOrganization)
                {
                    await
                    ChatbotConfig2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotConfig3 = await ChatbotConfigs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatbotConfig3?.setOrganization)
                {
                    await
                    ChatbotConfig3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateChatSessionWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setStore)
                {
                    await
                    ChatSession0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setStore)
                {
                    await
                    ChatSession1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setStore)
                {
                    await
                    ChatSession2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setStore)
                {
                    await
                    ChatSession3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateChatSessionWithCustomer() {
            
                const relatedCustomer0 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setCustomer)
                {
                    await
                    ChatSession0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setCustomer)
                {
                    await
                    ChatSession1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setCustomer)
                {
                    await
                    ChatSession2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setCustomer)
                {
                    await
                    ChatSession3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateChatSessionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setOrganization)
                {
                    await
                    ChatSession0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setOrganization)
                {
                    await
                    ChatSession1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setOrganization)
                {
                    await
                    ChatSession2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setOrganization)
                {
                    await
                    ChatSession3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateChatMessageWithSession() {
            
                const relatedSession0 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatMessage0 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatMessage0?.setSession)
                {
                    await
                    ChatMessage0.
                    setSession(relatedSession0);
                }
            
                const relatedSession1 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatMessage1 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatMessage1?.setSession)
                {
                    await
                    ChatMessage1.
                    setSession(relatedSession1);
                }
            
                const relatedSession2 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatMessage2 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatMessage2?.setSession)
                {
                    await
                    ChatMessage2.
                    setSession(relatedSession2);
                }
            
                const relatedSession3 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatMessage3 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatMessage3?.setSession)
                {
                    await
                    ChatMessage3.
                    setSession(relatedSession3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateChatMessageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatMessage0 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatMessage0?.setOrganization)
                {
                    await
                    ChatMessage0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatMessage1 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatMessage1?.setOrganization)
                {
                    await
                    ChatMessage1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatMessage2 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatMessage2?.setOrganization)
                {
                    await
                    ChatMessage2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatMessage3 = await ChatMessages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatMessage3?.setOrganization)
                {
                    await
                    ChatMessage3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateSupportTicketWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setStore)
                {
                    await
                    SupportTicket0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setStore)
                {
                    await
                    SupportTicket1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setStore)
                {
                    await
                    SupportTicket2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setStore)
                {
                    await
                    SupportTicket3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithCustomer() {
            
                const relatedCustomer0 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setCustomer)
                {
                    await
                    SupportTicket0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setCustomer)
                {
                    await
                    SupportTicket1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setCustomer)
                {
                    await
                    SupportTicket2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Customers.findOne({
                    offset: Math.floor(Math.random() * (await Customers.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setCustomer)
                {
                    await
                    SupportTicket3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setOrder)
                {
                    await
                    SupportTicket0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setOrder)
                {
                    await
                    SupportTicket1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setOrder)
                {
                    await
                    SupportTicket2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setOrder)
                {
                    await
                    SupportTicket3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithAssigned_to_user() {
            
                const relatedAssigned_to_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setAssigned_to_user)
                {
                    await
                    SupportTicket0.
                    setAssigned_to_user(relatedAssigned_to_user0);
                }
            
                const relatedAssigned_to_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setAssigned_to_user)
                {
                    await
                    SupportTicket1.
                    setAssigned_to_user(relatedAssigned_to_user1);
                }
            
                const relatedAssigned_to_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setAssigned_to_user)
                {
                    await
                    SupportTicket2.
                    setAssigned_to_user(relatedAssigned_to_user2);
                }
            
                const relatedAssigned_to_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setAssigned_to_user)
                {
                    await
                    SupportTicket3.
                    setAssigned_to_user(relatedAssigned_to_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSupportTicketWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setOrganization)
                {
                    await
                    SupportTicket0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setOrganization)
                {
                    await
                    SupportTicket1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setOrganization)
                {
                    await
                    SupportTicket2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setOrganization)
                {
                    await
                    SupportTicket3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateShopifySyncJobWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ShopifySyncJob0 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ShopifySyncJob0?.setStore)
                {
                    await
                    ShopifySyncJob0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ShopifySyncJob1 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ShopifySyncJob1?.setStore)
                {
                    await
                    ShopifySyncJob1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ShopifySyncJob2 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ShopifySyncJob2?.setStore)
                {
                    await
                    ShopifySyncJob2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const ShopifySyncJob3 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ShopifySyncJob3?.setStore)
                {
                    await
                    ShopifySyncJob3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateShopifySyncJobWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShopifySyncJob0 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ShopifySyncJob0?.setOrganization)
                {
                    await
                    ShopifySyncJob0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShopifySyncJob1 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ShopifySyncJob1?.setOrganization)
                {
                    await
                    ShopifySyncJob1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShopifySyncJob2 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ShopifySyncJob2?.setOrganization)
                {
                    await
                    ShopifySyncJob2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShopifySyncJob3 = await ShopifySyncJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ShopifySyncJob3?.setOrganization)
                {
                    await
                    ShopifySyncJob3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Stores.bulkCreate(StoresData);
                
            
            
                
                await Pages.bulkCreate(PagesData);
                
            
            
                
                await Collections.bulkCreate(CollectionsData);
                
            
            
                
                await Products.bulkCreate(ProductsData);
                
            
            
                
                await ProductVariants.bulkCreate(ProductVariantsData);
                
            
            
                
                await Customers.bulkCreate(CustomersData);
                
            
            
                
                await Addresses.bulkCreate(AddressesData);
                
            
            
                
                await Orders.bulkCreate(OrdersData);
                
            
            
                
                await OrderItems.bulkCreate(OrderItemsData);
                
            
            
                
                await Fulfillments.bulkCreate(FulfillmentsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await DiscountCodes.bulkCreate(DiscountCodesData);
                
            
            
                
                await Refunds.bulkCreate(RefundsData);
                
            
            
                
                await InventoryAdjustments.bulkCreate(InventoryAdjustmentsData);
                
            
            
                
                await FaqArticles.bulkCreate(FaqArticlesData);
                
            
            
                
                await ChatbotConfigs.bulkCreate(ChatbotConfigsData);
                
            
            
                
                await ChatSessions.bulkCreate(ChatSessionsData);
                
            
            
                
                await ChatMessages.bulkCreate(ChatMessagesData);
                
            
            
                
                await SupportTickets.bulkCreate(SupportTicketsData);
                
            
            
                
                await ShopifySyncJobs.bulkCreate(ShopifySyncJobsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStoreWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePageWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCollectionWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCollectionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProductWithStore(),
                    
                
                    
                        
                        await associateProductWithCollection(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProductVariantWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductVariantWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCustomerWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCustomerWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAddressWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAddressWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateOrderWithStore(),
                    
                
                    
                        
                        await associateOrderWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateOrderItemWithOrder(),
                    
                
                    
                        
                        await associateOrderItemWithProduct(),
                    
                
                    
                        
                        await associateOrderItemWithVariant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFulfillmentWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFulfillmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDiscountCodeWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDiscountCodeWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateRefundWithOrder(),
                    
                
                    
                        
                        await associateRefundWithPayment(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateRefundWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInventoryAdjustmentWithVariant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInventoryAdjustmentWithAdjusted_by_user(),
                    
                
                    
                
                    
                        
                        await associateInventoryAdjustmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFaqArticleWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFaqArticleWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateChatbotConfigWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateChatbotConfigWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateChatSessionWithStore(),
                    
                
                    
                        
                        await associateChatSessionWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateChatSessionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateChatMessageWithSession(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateChatMessageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateSupportTicketWithStore(),
                    
                
                    
                        
                        await associateSupportTicketWithCustomer(),
                    
                
                    
                        
                        await associateSupportTicketWithOrder(),
                    
                
                    
                        
                        await associateSupportTicketWithAssigned_to_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSupportTicketWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateShopifySyncJobWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateShopifySyncJobWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('stores', null, {});
            
            
            await queryInterface.bulkDelete('pages', null, {});
            
            
            await queryInterface.bulkDelete('collections', null, {});
            
            
            await queryInterface.bulkDelete('products', null, {});
            
            
            await queryInterface.bulkDelete('product_variants', null, {});
            
            
            await queryInterface.bulkDelete('customers', null, {});
            
            
            await queryInterface.bulkDelete('addresses', null, {});
            
            
            await queryInterface.bulkDelete('orders', null, {});
            
            
            await queryInterface.bulkDelete('order_items', null, {});
            
            
            await queryInterface.bulkDelete('fulfillments', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('discount_codes', null, {});
            
            
            await queryInterface.bulkDelete('refunds', null, {});
            
            
            await queryInterface.bulkDelete('inventory_adjustments', null, {});
            
            
            await queryInterface.bulkDelete('faq_articles', null, {});
            
            
            await queryInterface.bulkDelete('chatbot_configs', null, {});
            
            
            await queryInterface.bulkDelete('chat_sessions', null, {});
            
            
            await queryInterface.bulkDelete('chat_messages', null, {});
            
            
            await queryInterface.bulkDelete('support_tickets', null, {});
            
            
            await queryInterface.bulkDelete('shopify_sync_jobs', null, {});
            
        
    },
};