





















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






const Organizations = db.organizations;

const Tenants = db.tenants;

const UserMemberships = db.user_memberships;

const TenantLocations = db.tenant_locations;

const Ponds = db.ponds;

const Species = db.species;

const Batches = db.batches;

const FeedProducts = db.feed_products;

const InventoryItems = db.inventory_items;

const InventoryMovements = db.inventory_movements;

const FeedingLogs = db.feeding_logs;

const WaterQualityLogs = db.water_quality_logs;

const HealthEvents = db.health_events;

const Harvests = db.harvests;

const MarketplaceListings = db.marketplace_listings;

const Orders = db.orders;

const OrderItems = db.order_items;

const PaymentTransactions = db.payment_transactions;

const ShipmentUpdates = db.shipment_updates;

const Investments = db.investments;

const ApiKeys = db.api_keys;

const WebhookEndpoints = db.webhook_endpoints;

const WebhookDeliveries = db.webhook_deliveries;

const EmailNotifications = db.email_notifications;

const AuditLogs = db.audit_logs;

const CsvJobs = db.csv_jobs;







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



const TenantsData = [
    
    {
    
        
        
            
                "tenant_name": "Blue Harbor Aquaculture",
            
        
    
        
        
            
                "slug": "blue-harbor-aquaculture",
            
        
    
        
        
            
                "tenant_type": "investor",
            
        
    
        
        
            
                "contact_email": "ops@blueharbor.example",
            
        
    
        
        
            
                "contact_phone": "+1-415-555-0101",
            
        
    
        
        
            
                "billing_address": "125 Marina Way, San Rafael, CA",
            
        
    
        
        
            
                "subscription_status": "past_due",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-01-15T00:00:00Z'),
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "tenant_name": "Seacoast Buyers Co",
            
        
    
        
        
            
                "slug": "seacoast-buyers",
            
        
    
        
        
            
                "tenant_type": "admin",
            
        
    
        
        
            
                "contact_email": "purchasing@seacoastbuyers.example",
            
        
    
        
        
            
                "contact_phone": "+1-212-555-0133",
            
        
    
        
        
            
                "billing_address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "subscription_status": "past_due",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "tenant_name": "Tidal Capital Partners",
            
        
    
        
        
            
                "slug": "tidal-capital",
            
        
    
        
        
            
                "tenant_type": "admin",
            
        
    
        
        
            
                "contact_email": "ir@tidalcapital.example",
            
        
    
        
        
            
                "contact_phone": "+1-617-555-0117",
            
        
    
        
        
            
                "billing_address": "410 Atlantic Ave, Boston, MA",
            
        
    
        
        
            
                "subscription_status": "active",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-02-10T00:00:00Z'),
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "tenant_name": "Riverbend Hatchery",
            
        
    
        
        
            
                "slug": "riverbend-hatchery",
            
        
    
        
        
            
                "tenant_type": "farm",
            
        
    
        
        
            
                "contact_email": "manager@riverbend.example",
            
        
    
        
        
            
                "contact_phone": "+1-904-555-0160",
            
        
    
        
        
            
                "billing_address": "9 River Road, Jacksonville, FL",
            
        
    
        
        
            
                "subscription_status": "past_due",
            
        
    
        
        
            
                "trial_ends_at": new Date('2026-07-15T00:00:00Z'),
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const UserMembershipsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "membership_status": "suspended",
            
        
    
        
        
            
                "joined_at": new Date('2026-01-05T09: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
            
        
    
        
        
            
                "membership_status": "active",
            
        
    
        
        
            
                "joined_at": new Date('2026-02-10T12: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
            
        
    
        
        
            
                "membership_status": "invited",
            
        
    
        
        
            
                "joined_at": new Date('2026-02-10T12:10: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
            
        
    
        
        
            
                "membership_status": "suspended",
            
        
    
        
        
            
                "joined_at": new Date('2026-03-01T15:30:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const TenantLocationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "location_name": "North Farm Site",
            
        
    
        
        
            
                "address": "125 Marina Way, San Rafael, CA",
            
        
    
        
        
            
                "latitude": 37.9731,
            
        
    
        
        
            
                "longitude": -122.531,
            
        
    
        
        
            
                "timezone": "America/Los_Angeles",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "location_name": "South Nursery",
            
        
    
        
        
            
                "address": "44 Bayview Drive, San Rafael, CA",
            
        
    
        
        
            
                "latitude": 37.9492,
            
        
    
        
        
            
                "longitude": -122.5093,
            
        
    
        
        
            
                "timezone": "America/Los_Angeles",
            
        
    
        
        
            
                "is_primary": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "location_name": "Riverbend Main",
            
        
    
        
        
            
                "address": "9 River Road, Jacksonville, FL",
            
        
    
        
        
            
                "latitude": 30.3322,
            
        
    
        
        
            
                "longitude": -81.6557,
            
        
    
        
        
            
                "timezone": "America/New_York",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "location_name": "NYC Cold Storage",
            
        
    
        
        
            
                "address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "latitude": 40.7096,
            
        
    
        
        
            
                "longitude": -74.0066,
            
        
    
        
        
            
                "timezone": "America/New_York",
            
        
    
        
        
            
                "is_primary": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PondsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "pond_name": "Pond A1",
            
        
    
        
        
            
                "pond_type": "other",
            
        
    
        
        
            
                "area_sq_m": 1800.5,
            
        
    
        
        
            
                "avg_depth_m": 1.6,
            
        
    
        
        
            
                "notes": "Primary grow-out pond near inlet.",
            
        
    
        
        
            
                "status": "inactive",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "pond_name": "Pond A2",
            
        
    
        
        
            
                "pond_type": "lined",
            
        
    
        
        
            
                "area_sq_m": 1650.0,
            
        
    
        
        
            
                "avg_depth_m": 1.5,
            
        
    
        
        
            
                "notes": "Aerators installed along east bank.",
            
        
    
        
        
            
                "status": "maintenance",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "pond_name": "Nursery Tank 1",
            
        
    
        
        
            
                "pond_type": "earthen",
            
        
    
        
        
            
                "area_sq_m": 120.0,
            
        
    
        
        
            
                "avg_depth_m": 1.2,
            
        
    
        
        
            
                "notes": "Fingerling staging tank.",
            
        
    
        
        
            
                "status": "maintenance",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "pond_name": "RB Pond 3",
            
        
    
        
        
            
                "pond_type": "cage",
            
        
    
        
        
            
                "area_sq_m": 900.0,
            
        
    
        
        
            
                "avg_depth_m": 1.4,
            
        
    
        
        
            
                "notes": "Used for juvenile tilapia.",
            
        
    
        
        
            
                "status": "inactive",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SpeciesData = [
    
    {
    
        
        
            
                "species_name": "Nile Tilapia",
            
        
    
        
        
            
                "scientific_name": "Oreochromis niloticus",
            
        
    
        
        
            
                "typical_harvest_size": "500 to 800 g",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "species_name": "Pacific White Shrimp",
            
        
    
        
        
            
                "scientific_name": "Litopenaeus vannamei",
            
        
    
        
        
            
                "typical_harvest_size": "18 to 25 g",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "species_name": "Channel Catfish",
            
        
    
        
        
            
                "scientific_name": "Ictalurus punctatus",
            
        
    
        
        
            
                "typical_harvest_size": "900 to 1200 g",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "species_name": "Rainbow Trout",
            
        
    
        
        
            
                "scientific_name": "Oncorhynchus mykiss",
            
        
    
        
        
            
                "typical_harvest_size": "350 to 600 g",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const BatchesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "batch_code": "BHA-TIL-2026-01",
            
        
    
        
        
            
                "stocked_at": new Date('2026-03-05T08:00:00Z'),
            
        
    
        
        
            
                "initial_count": 12000,
            
        
    
        
        
            
                "initial_avg_weight_g": 12.5,
            
        
    
        
        
            
                "batch_status": "planned",
            
        
    
        
        
            
                "expected_harvest_at": new Date('2026-09-10T08:00:00Z'),
            
        
    
        
        
            
                "notes": "Stocked from certified hatchery shipment.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "batch_code": "BHA-SHR-2026-02",
            
        
    
        
        
            
                "stocked_at": new Date('2026-04-01T08:30:00Z'),
            
        
    
        
        
            
                "initial_count": 300000,
            
        
    
        
        
            
                "initial_avg_weight_g": 0.3,
            
        
    
        
        
            
                "batch_status": "active",
            
        
    
        
        
            
                "expected_harvest_at": new Date('2026-07-20T08:00:00Z'),
            
        
    
        
        
            
                "notes": "PL stocked after pond prep and disinfection.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "batch_code": "BHA-NUR-2026-03",
            
        
    
        
        
            
                "stocked_at": new Date('2026-05-12T09:00:00Z'),
            
        
    
        
        
            
                "initial_count": 25000,
            
        
    
        
        
            
                "initial_avg_weight_g": 2.1,
            
        
    
        
        
            
                "batch_status": "lost",
            
        
    
        
        
            
                "expected_harvest_at": new Date('2026-08-25T08:00:00Z'),
            
        
    
        
        
            
                "notes": "Nursery batch to be graded and moved to ponds.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "batch_code": "RB-TIL-2026-01",
            
        
    
        
        
            
                "stocked_at": new Date('2026-02-18T13:00:00Z'),
            
        
    
        
        
            
                "initial_count": 9000,
            
        
    
        
        
            
                "initial_avg_weight_g": 10.0,
            
        
    
        
        
            
                "batch_status": "closed",
            
        
    
        
        
            
                "expected_harvest_at": new Date('2026-08-15T08:00:00Z'),
            
        
    
        
        
            
                "notes": "Mixed-sex juvenile batch under monitoring.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FeedProductsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "AquaGrow 32 Protein Pellets",
            
        
    
        
        
            
                "brand": "AquaGrow",
            
        
    
        
        
            
                "feed_type": "pellet",
            
        
    
        
        
            
                "protein_percent": 32.0,
            
        
    
        
        
            
                "fat_percent": 6.0,
            
        
    
        
        
            
                "pellet_size_mm": 3.0,
            
        
    
        
        
            
                "notes": "Used for mid-stage tilapia growth.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "AquaGrow Starter Crumble",
            
        
    
        
        
            
                "brand": "AquaGrow",
            
        
    
        
        
            
                "feed_type": "crumble",
            
        
    
        
        
            
                "protein_percent": 40.0,
            
        
    
        
        
            
                "fat_percent": 8.0,
            
        
    
        
        
            
                "pellet_size_mm": 1.0,
            
        
    
        
        
            
                "notes": "Nursery feed for fingerlings.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "ShrimpMax 38 Sinking Pellets",
            
        
    
        
        
            
                "brand": "ShrimpMax",
            
        
    
        
        
            
                "feed_type": "pellet",
            
        
    
        
        
            
                "protein_percent": 38.0,
            
        
    
        
        
            
                "fat_percent": 7.0,
            
        
    
        
        
            
                "pellet_size_mm": 2.0,
            
        
    
        
        
            
                "notes": "Sinking feed for shrimp ponds.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "RiverFeed Catfish 28 Floating",
            
        
    
        
        
            
                "brand": "RiverFeed",
            
        
    
        
        
            
                "feed_type": "pellet",
            
        
    
        
        
            
                "protein_percent": 28.0,
            
        
    
        
        
            
                "fat_percent": 5.0,
            
        
    
        
        
            
                "pellet_size_mm": 5.0,
            
        
    
        
        
            
                "notes": "Floating ration for catfish grow-out.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InventoryItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "item_category": "packaging",
            
        
    
        
        
            
                "item_name": "AquaGrow 32 Protein Pellets 25kg",
            
        
    
        
        
            
                "sku": "AG-32-25KG",
            
        
    
        
        
            
                "unit": "bag",
            
        
    
        
        
            
                "quantity_on_hand": 180.0,
            
        
    
        
        
            
                "reorder_level": 60.0,
            
        
    
        
        
            
                "unit_cost": 22.5,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "item_category": "equipment",
            
        
    
        
        
            
                "item_name": "AquaGrow Starter Crumble 20kg",
            
        
    
        
        
            
                "sku": "AG-START-20KG",
            
        
    
        
        
            
                "unit": "bag",
            
        
    
        
        
            
                "quantity_on_hand": 75.0,
            
        
    
        
        
            
                "reorder_level": 25.0,
            
        
    
        
        
            
                "unit_cost": 24.0,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "item_category": "other",
            
        
    
        
        
            
                "item_name": "Agricultural Lime",
            
        
    
        
        
            
                "sku": "CHEM-LIME-50",
            
        
    
        
        
            
                "unit": "bag",
            
        
    
        
        
            
                "quantity_on_hand": 40.0,
            
        
    
        
        
            
                "reorder_level": 15.0,
            
        
    
        
        
            
                "unit_cost": 9.5,
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "item_category": "packaging",
            
        
    
        
        
            
                "item_name": "RiverFeed Tilapia 30 Pellets 25kg",
            
        
    
        
        
            
                "sku": "RF-TIL-30-25",
            
        
    
        
        
            
                "unit": "bag",
            
        
    
        
        
            
                "quantity_on_hand": 95.0,
            
        
    
        
        
            
                "reorder_level": 30.0,
            
        
    
        
        
            
                "unit_cost": 19.8,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InventoryMovementsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "purchase",
            
        
    
        
        
            
                "quantity": 50.0,
            
        
    
        
        
            
                "moved_at": new Date('2026-06-01T10:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reference": "PO-2026-0601-AG32",
            
        
    
        
        
            
                "notes": "Monthly feed replenishment.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "return",
            
        
    
        
        
            
                "quantity": 18.0,
            
        
    
        
        
            
                "moved_at": new Date('2026-06-10T16:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reference": "USE-2026-0610-A1",
            
        
    
        
        
            
                "notes": "Consumed for Pond A1 feeding schedule.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "usage",
            
        
    
        
        
            
                "quantity": 6.0,
            
        
    
        
        
            
                "moved_at": new Date('2026-06-11T15:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reference": "USE-2026-0611-NUR1",
            
        
    
        
        
            
                "notes": "Nursery ration.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "purchase",
            
        
    
        
        
            
                "quantity": 30.0,
            
        
    
        
        
            
                "moved_at": new Date('2026-06-03T11:30:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reference": "PO-2026-0603-RF30",
            
        
    
        
        
            
                "notes": "Supplier delivery received and checked.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FeedingLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "fed_at": new Date('2026-06-12T07:00:00Z'),
            
        
    
        
        
            
                "quantity_kg": 85.0,
            
        
    
        
        
            
                "feeding_method": "other",
            
        
    
        
        
            
                "appetite": "high",
            
        
    
        
        
            
                "notes": "Even distribution, no surface stress observed.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "fed_at": new Date('2026-06-13T07:05:00Z'),
            
        
    
        
        
            
                "quantity_kg": 88.0,
            
        
    
        
        
            
                "feeding_method": "tray",
            
        
    
        
        
            
                "appetite": "low",
            
        
    
        
        
            
                "notes": "Strong feeding response in first 10 minutes.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "fed_at": new Date('2026-06-12T18:00:00Z'),
            
        
    
        
        
            
                "quantity_kg": 62.0,
            
        
    
        
        
            
                "feeding_method": "manual",
            
        
    
        
        
            
                "appetite": "normal",
            
        
    
        
        
            
                "notes": "Tray check at 2 hours shows moderate leftovers.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "fed_at": new Date('2026-06-12T12:00:00Z'),
            
        
    
        
        
            
                "quantity_kg": 14.5,
            
        
    
        
        
            
                "feeding_method": "manual",
            
        
    
        
        
            
                "appetite": "low",
            
        
    
        
        
            
                "notes": "Split into 3 rounds to reduce waste.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const WaterQualityLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sampled_at": new Date('2026-06-12T06:30:00Z'),
            
        
    
        
        
            
                "temperature_c": 26.8,
            
        
    
        
        
            
                "ph": 7.6,
            
        
    
        
        
            
                "dissolved_oxygen_mg_l": 5.4,
            
        
    
        
        
            
                "salinity_ppt": 3.2,
            
        
    
        
        
            
                "ammonia_mg_l": 0.12,
            
        
    
        
        
            
                "nitrite_mg_l": 0.05,
            
        
    
        
        
            
                "nitrate_mg_l": 12.0,
            
        
    
        
        
            
                "turbidity_ntu": 18.0,
            
        
    
        
        
            
                "notes": "Morning DO acceptable, monitor ammonia trend.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "sampled_at": new Date('2026-06-12T06:45:00Z'),
            
        
    
        
        
            
                "temperature_c": 27.2,
            
        
    
        
        
            
                "ph": 7.8,
            
        
    
        
        
            
                "dissolved_oxygen_mg_l": 4.9,
            
        
    
        
        
            
                "salinity_ppt": 4.1,
            
        
    
        
        
            
                "ammonia_mg_l": 0.15,
            
        
    
        
        
            
                "nitrite_mg_l": 0.07,
            
        
    
        
        
            
                "nitrate_mg_l": 10.5,
            
        
    
        
        
            
                "turbidity_ntu": 22.0,
            
        
    
        
        
            
                "notes": "Slightly lower DO, aerators on for 2 hours.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "sampled_at": new Date('2026-06-12T07:10:00Z'),
            
        
    
        
        
            
                "temperature_c": 27.0,
            
        
    
        
        
            
                "ph": 7.5,
            
        
    
        
        
            
                "dissolved_oxygen_mg_l": 6.1,
            
        
    
        
        
            
                "salinity_ppt": 2.8,
            
        
    
        
        
            
                "ammonia_mg_l": 0.08,
            
        
    
        
        
            
                "nitrite_mg_l": 0.03,
            
        
    
        
        
            
                "nitrate_mg_l": 8.0,
            
        
    
        
        
            
                "turbidity_ntu": 10.0,
            
        
    
        
        
            
                "notes": "Stable readings, good flow rate.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "sampled_at": new Date('2026-06-12T07:00:00Z'),
            
        
    
        
        
            
                "temperature_c": 24.4,
            
        
    
        
        
            
                "ph": 7.3,
            
        
    
        
        
            
                "dissolved_oxygen_mg_l": 5.9,
            
        
    
        
        
            
                "salinity_ppt": 0.4,
            
        
    
        
        
            
                "ammonia_mg_l": 0.09,
            
        
    
        
        
            
                "nitrite_mg_l": 0.04,
            
        
    
        
        
            
                "nitrate_mg_l": 9.5,
            
        
    
        
        
            
                "turbidity_ntu": 15.0,
            
        
    
        
        
            
                "notes": "All parameters in normal range.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const HealthEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "observed_at": new Date('2026-06-14T09:00:00Z'),
            
        
    
        
        
            
                "event_type": "disease",
            
        
    
        
        
            
                "severity": "medium",
            
        
    
        
        
            
                "mortality_count": 0,
            
        
    
        
        
            
                "symptoms": "Routine seine check, fish active and responsive.",
            
        
    
        
        
            
                "treatment": "No treatment required.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resolution_status": "open",
            
        
    
        
        
            
                "resolved_at": new Date('2026-06-14T12:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "observed_at": new Date('2026-06-15T07:30:00Z'),
            
        
    
        
        
            
                "event_type": "other",
            
        
    
        
        
            
                "severity": "medium",
            
        
    
        
        
            
                "mortality_count": 250,
            
        
    
        
        
            
                "symptoms": "Small spike in morning mortality near inlet.",
            
        
    
        
        
            
                "treatment": "Increase aeration and verify feed trays for overfeeding.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resolution_status": "closed",
            
        
    
        
        
            
                "resolved_at": new Date('2026-06-18T08:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "observed_at": new Date('2026-06-16T11:10:00Z'),
            
        
    
        
        
            
                "event_type": "mortality",
            
        
    
        
        
            
                "severity": "high",
            
        
    
        
        
            
                "mortality_count": 20,
            
        
    
        
        
            
                "symptoms": "Mild flashing observed, possible external parasites.",
            
        
    
        
        
            
                "treatment": "Salt dip protocol implemented under SOP.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resolution_status": "open",
            
        
    
        
        
            
                "resolved_at": new Date('2026-06-17T10:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "observed_at": new Date('2026-06-13T10:20:00Z'),
            
        
    
        
        
            
                "event_type": "inspection",
            
        
    
        
        
            
                "severity": "low",
            
        
    
        
        
            
                "mortality_count": 0,
            
        
    
        
        
            
                "symptoms": "Visitor entry audit completed, footbath refilled.",
            
        
    
        
        
            
                "treatment": "Replace signage and restock PPE at gate.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "resolution_status": "resolved",
            
        
    
        
        
            
                "resolved_at": new Date('2026-06-13T13:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const HarvestsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "harvested_at": new Date('2026-06-25T06:00:00Z'),
            
        
    
        
        
            
                "total_weight_kg": 820.0,
            
        
    
        
        
            
                "total_count": 1450,
            
        
    
        
        
            
                "avg_weight_g": 565.0,
            
        
    
        
        
            
                "grade": "medium",
            
        
    
        
        
            
                "notes": "Partial harvest for standing order; iced and packed same day.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "harvested_at": new Date('2026-06-26T05:30:00Z'),
            
        
    
        
        
            
                "total_weight_kg": 540.0,
            
        
    
        
        
            
                "total_count": 27000,
            
        
    
        
        
            
                "avg_weight_g": 20.0,
            
        
    
        
        
            
                "grade": "small",
            
        
    
        
        
            
                "notes": "Trial harvest to confirm size distribution.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "harvested_at": new Date('2026-06-22T07:00:00Z'),
            
        
    
        
        
            
                "total_weight_kg": 610.0,
            
        
    
        
        
            
                "total_count": 1100,
            
        
    
        
        
            
                "avg_weight_g": 554.0,
            
        
    
        
        
            
                "grade": "medium",
            
        
    
        
        
            
                "notes": "Harvest conducted after water quality stabilized.",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "harvested_at": new Date('2026-06-28T09:00:00Z'),
            
        
    
        
        
            
                "total_weight_kg": 120.0,
            
        
    
        
        
            
                "total_count": 18000,
            
        
    
        
        
            
                "avg_weight_g": 6.7,
            
        
    
        
        
            
                "grade": "mixed",
            
        
    
        
        
            
                "notes": "Grading and transfer harvest; counted for relocation.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MarketplaceListingsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "listing_title": "Fresh Tilapia Whole 500 to 700g",
            
        
    
        
        
            
                "description": "Farm-raised tilapia, whole and chilled, packed for same-day dispatch.",
            
        
    
        
        
            
                "product_form": "fillet",
            
        
    
        
        
            
                "available_quantity_kg": 600.0,
            
        
    
        
        
            
                "price_per_kg": 5.9,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "available_from": new Date('2026-06-25T08:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2026-07-02T08:00:00Z'),
            
        
    
        
        
            
                "listing_status": "active",
            
        
    
        
        
            
                // type code here for "images" 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "listing_title": "Chilled Shrimp 20g Avg Size",
            
        
    
        
        
            
                "description": "Chilled shrimp, medium grade, suitable for restaurants and wholesalers.",
            
        
    
        
        
            
                "product_form": "whole",
            
        
    
        
        
            
                "available_quantity_kg": 400.0,
            
        
    
        
        
            
                "price_per_kg": 8.4,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "available_from": new Date('2026-06-26T09:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2026-07-01T09:00:00Z'),
            
        
    
        
        
            
                "listing_status": "sold_out",
            
        
    
        
        
            
                // type code here for "images" 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "listing_title": "Tilapia Mixed Grade Bulk Lot",
            
        
    
        
        
            
                "description": "Mixed grade tilapia, chilled, ideal for processing buyers.",
            
        
    
        
        
            
                "product_form": "fillet",
            
        
    
        
        
            
                "available_quantity_kg": 500.0,
            
        
    
        
        
            
                "price_per_kg": 5.5,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "available_from": new Date('2026-06-22T10:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2026-06-30T10:00:00Z'),
            
        
    
        
        
            
                "listing_status": "active",
            
        
    
        
        
            
                // type code here for "images" 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
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "listing_title": "Large Tilapia Whole 650 to 800g",
            
        
    
        
        
            
                "description": "Large grade tilapia, whole, chilled, packed in insulated boxes.",
            
        
    
        
        
            
                "product_form": "live",
            
        
    
        
        
            
                "available_quantity_kg": 550.0,
            
        
    
        
        
            
                "price_per_kg": 6.2,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "available_from": new Date('2026-06-29T09:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2026-07-05T09:00:00Z'),
            
        
    
        
        
            
                "listing_status": "active",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrdersData = [
    
    {
    
        
        
            
                "order_number": "ORD-2026-10021",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ordered_at": new Date('2026-06-25T12:30:00Z'),
            
        
    
        
        
            
                "order_status": "canceled",
            
        
    
        
        
            
                "subtotal_amount": 3540.0,
            
        
    
        
        
            
                "tax_amount": 0.0,
            
        
    
        
        
            
                "shipping_amount": 220.0,
            
        
    
        
        
            
                "total_amount": 3760.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "delivery_address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "buyer_notes": "Deliver before 9am, call upon arrival.",
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-06-27T13:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-10022",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ordered_at": new Date('2026-06-26T10:10:00Z'),
            
        
    
        
        
            
                "order_status": "packed",
            
        
    
        
        
            
                "subtotal_amount": 1680.0,
            
        
    
        
        
            
                "tax_amount": 0.0,
            
        
    
        
        
            
                "shipping_amount": 180.0,
            
        
    
        
        
            
                "total_amount": 1860.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "delivery_address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "buyer_notes": "Use insulated packaging and gel packs.",
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-06-28T13:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-10023",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ordered_at": new Date('2026-06-22T13:00:00Z'),
            
        
    
        
        
            
                "order_status": "refunded",
            
        
    
        
        
            
                "subtotal_amount": 1100.0,
            
        
    
        
        
            
                "tax_amount": 0.0,
            
        
    
        
        
            
                "shipping_amount": 200.0,
            
        
    
        
        
            
                "total_amount": 1300.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "delivery_address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "buyer_notes": "Cancel if not shipped within 48 hours.",
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-06-25T13:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-10024",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "ordered_at": new Date('2026-06-29T11:05:00Z'),
            
        
    
        
        
            
                "order_status": "canceled",
            
        
    
        
        
            
                "subtotal_amount": 3410.0,
            
        
    
        
        
            
                "tax_amount": 0.0,
            
        
    
        
        
            
                "shipping_amount": 240.0,
            
        
    
        
        
            
                "total_amount": 3650.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "delivery_address": "88 Fulton Street, New York, NY",
            
        
    
        
        
            
                "buyer_notes": "Please include lot and harvest dates on labels.",
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-07-01T13:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_kg": 600.0,
            
        
    
        
        
            
                "unit_price": 5.9,
            
        
    
        
        
            
                "line_total": 3540.0,
            
        
    
        
        
            
                "notes": "Whole fish, chilled.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_kg": 200.0,
            
        
    
        
        
            
                "unit_price": 8.4,
            
        
    
        
        
            
                "line_total": 1680.0,
            
        
    
        
        
            
                "notes": "Medium grade shrimp.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_kg": 200.0,
            
        
    
        
        
            
                "unit_price": 5.5,
            
        
    
        
        
            
                "line_total": 1100.0,
            
        
    
        
        
            
                "notes": "Bulk lot, mixed grade.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity_kg": 550.0,
            
        
    
        
        
            
                "unit_price": 6.2,
            
        
    
        
        
            
                "line_total": 3410.0,
            
        
    
        
        
            
                "notes": "Large grade, label harvest date.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PaymentTransactionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "transaction_type": "payout",
            
        
    
        
        
            
                "transaction_status": "succeeded",
            
        
    
        
        
            
                "amount": 3760.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "provider": "Stripe",
            
        
    
        
        
            
                "provider_reference": "pi_3Q9A2B8X2Z1K7",
            
        
    
        
        
            
                "processed_at": new Date('2026-06-25T12:35:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "transaction_type": "payout",
            
        
    
        
        
            
                "transaction_status": "canceled",
            
        
    
        
        
            
                "amount": 1860.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "provider": "Stripe",
            
        
    
        
        
            
                "provider_reference": "pi_3Q9A2C9Y5M2L8",
            
        
    
        
        
            
                "processed_at": new Date('2026-06-26T10:12:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "transaction_type": "payout",
            
        
    
        
        
            
                "transaction_status": "canceled",
            
        
    
        
        
            
                "amount": 1300.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "provider": "Stripe",
            
        
    
        
        
            
                "provider_reference": "pi_3Q9A2D1N9P3R4",
            
        
    
        
        
            
                "processed_at": new Date('2026-06-22T13:02:00Z'),
            
        
    
        
        
            
                "failure_reason": "Order canceled before capture",
            
        
    
        
        
            
                // 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
            
        
    
        
        
            
                "transaction_type": "capture",
            
        
    
        
        
            
                "transaction_status": "pending",
            
        
    
        
        
            
                "amount": 3570.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "provider": "Stripe",
            
        
    
        
        
            
                "provider_reference": "pi_3Q9A2E2T7V6W1",
            
        
    
        
        
            
                "processed_at": new Date('2026-06-28T09:25:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ShipmentUpdatesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "shipment_status": "picked_up",
            
        
    
        
        
            
                "carrier": "FedEx",
            
        
    
        
        
            
                "tracking_number": "784512309876",
            
        
    
        
        
            
                "status_at": new Date('2026-06-28T12:00:00Z'),
            
        
    
        
        
            
                "status_details": "Label created and pickup scheduled.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "shipment_status": "label_created",
            
        
    
        
        
            
                "carrier": "FedEx",
            
        
    
        
        
            
                "tracking_number": "784512309876",
            
        
    
        
        
            
                "status_at": new Date('2026-06-28T17:30:00Z'),
            
        
    
        
        
            
                "status_details": "Package picked up at North Farm Site.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "shipment_status": "exception",
            
        
    
        
        
            
                "carrier": "FedEx",
            
        
    
        
        
            
                "tracking_number": "784512309876",
            
        
    
        
        
            
                "status_at": new Date('2026-06-29T09:15:00Z'),
            
        
    
        
        
            
                "status_details": "Departed regional hub, en route to destination.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "shipment_status": "label_created",
            
        
    
        
        
            
                "carrier": "UPS",
            
        
    
        
        
            
                "tracking_number": "1Z999AA10123456784",
            
        
    
        
        
            
                "status_at": new Date('2026-06-25T16:00:00Z'),
            
        
    
        
        
            
                "status_details": "Shipment created for next-day delivery.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InvestmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "investment_name": "Blue Harbor Expansion Note 2026",
            
        
    
        
        
            
                "instrument_type": "other",
            
        
    
        
        
            
                "amount_committed": 250000.0,
            
        
    
        
        
            
                "amount_funded": 150000.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "committed_at": new Date('2026-03-10T14:00:00Z'),
            
        
    
        
        
            
                "funded_at": new Date('2026-04-01T14:00:00Z'),
            
        
    
        
        
            
                "investment_status": "proposed",
            
        
    
        
        
            
                "notes": "Funds earmarked for aeration upgrades and cold storage.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "investment_name": "Riverbend Working Capital Facility",
            
        
    
        
        
            
                "instrument_type": "debt",
            
        
    
        
        
            
                "amount_committed": 120000.0,
            
        
    
        
        
            
                "amount_funded": 60000.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "committed_at": new Date('2026-02-20T16:00:00Z'),
            
        
    
        
        
            
                "funded_at": new Date('2026-03-05T16:00:00Z'),
            
        
    
        
        
            
                "investment_status": "completed",
            
        
    
        
        
            
                "notes": "Draws tied to inventory and feed procurement.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "investment_name": "Blue Harbor Revenue Share",
            
        
    
        
        
            
                "instrument_type": "debt",
            
        
    
        
        
            
                "amount_committed": 80000.0,
            
        
    
        
        
            
                "amount_funded": 80000.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "committed_at": new Date('2026-01-25T10:00:00Z'),
            
        
    
        
        
            
                "funded_at": new Date('2026-01-28T10:00:00Z'),
            
        
    
        
        
            
                "investment_status": "canceled",
            
        
    
        
        
            
                "notes": "Short-term facility repaid from Q2 marketplace sales.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "investment_name": "Riverbend Biosecurity Grant",
            
        
    
        
        
            
                "instrument_type": "revenue_share",
            
        
    
        
        
            
                "amount_committed": 25000.0,
            
        
    
        
        
            
                "amount_funded": 25000.0,
            
        
    
        
        
            
                "currency": "USD",
            
        
    
        
        
            
                "committed_at": new Date('2026-05-01T09:00:00Z'),
            
        
    
        
        
            
                "funded_at": new Date('2026-05-03T09:00:00Z'),
            
        
    
        
        
            
                "investment_status": "proposed",
            
        
    
        
        
            
                "notes": "Grant supports training and gate controls improvements.",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ApiKeysData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "key_name": "Blue Harbor ERP Integration",
            
        
    
        
        
            
                "key_prefix": "bh_erp_",
            
        
    
        
        
            
                "access_level": "write",
            
        
    
        
        
            
                "last_used_at": new Date('2026-06-24T10:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2027-06-24T00:00:00Z'),
            
        
    
        
        
            
                "is_revoked": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "key_name": "Seacoast Purchasing Bot",
            
        
    
        
        
            
                "key_prefix": "sc_buy_",
            
        
    
        
        
            
                "access_level": "write",
            
        
    
        
        
            
                "last_used_at": new Date('2026-06-23T13:20:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2027-01-01T00:00:00Z'),
            
        
    
        
        
            
                "is_revoked": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "key_name": "Support Diagnostics Key",
            
        
    
        
        
            
                "key_prefix": "plat_sup_",
            
        
    
        
        
            
                "access_level": "read",
            
        
    
        
        
            
                "last_used_at": new Date('2026-06-25T18:05:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2026-12-31T00:00:00Z'),
            
        
    
        
        
            
                "is_revoked": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "key_name": "Riverbend CSV Loader",
            
        
    
        
        
            
                "key_prefix": "rb_csv_",
            
        
    
        
        
            
                "access_level": "write",
            
        
    
        
        
            
                "last_used_at": new Date('2026-06-10T09:00:00Z'),
            
        
    
        
        
            
                "expires_at": new Date('2027-06-10T00:00:00Z'),
            
        
    
        
        
            
                "is_revoked": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const WebhookEndpointsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "endpoint_name": "Blue Harbor Order Events",
            
        
    
        
        
            
                "url": "https://blueharbor.example/webhooks/orders",
            
        
    
        
        
            
                "secret": "bh_orders_secret_2026",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "event_types": "order.created,order.updated,transaction.succeeded",
            
        
    
        
        
            
                "last_delivery_at": new Date('2026-06-25T12:40:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "endpoint_name": "Seacoast Shipment Updates",
            
        
    
        
        
            
                "url": "https://seacoastbuyers.example/webhooks/shipments",
            
        
    
        
        
            
                "secret": "sc_ship_secret_2026",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "event_types": "shipment.updated,order.delivered",
            
        
    
        
        
            
                "last_delivery_at": new Date('2026-06-27T08:25:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "endpoint_name": "Platform Audit Stream",
            
        
    
        
        
            
                "url": "https://platform.example/webhooks/audit",
            
        
    
        
        
            
                "secret": "plat_audit_secret_2026",
            
        
    
        
        
            
                "is_enabled": true,
            
        
    
        
        
            
                "event_types": "audit.created,login.failed",
            
        
    
        
        
            
                "last_delivery_at": new Date('2026-06-24T16:11:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "endpoint_name": "Riverbend Inventory Alerts",
            
        
    
        
        
            
                "url": "https://riverbend.example/webhooks/inventory",
            
        
    
        
        
            
                "secret": "rb_inv_secret_2026",
            
        
    
        
        
            
                "is_enabled": false,
            
        
    
        
        
            
                "event_types": "inventory.low,inventory.movement",
            
        
    
        
        
            
                "last_delivery_at": new Date('2026-06-05T09:20:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const WebhookDeliveriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "transaction.succeeded",
            
        
    
        
        
            
                "event_reference": "ORD-2026-10021",
            
        
    
        
        
            
                "delivered_at": new Date('2026-06-25T12:41:00Z'),
            
        
    
        
        
            
                "delivery_status": "pending",
            
        
    
        
        
            
                "http_status": 200,
            
        
    
        
        
            
                "request_payload": "{orderNumber:ORD-2026-10021,status:paid}",
            
        
    
        
        
            
                "response_body": "{ok:true}",
            
        
    
        
        
            
                "attempt_count": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "order.delivered",
            
        
    
        
        
            
                "event_reference": "ORD-2026-10021",
            
        
    
        
        
            
                "delivered_at": new Date('2026-06-27T08:26:00Z'),
            
        
    
        
        
            
                "delivery_status": "pending",
            
        
    
        
        
            
                "http_status": 200,
            
        
    
        
        
            
                "request_payload": "{orderNumber:ORD-2026-10021,status:delivered}",
            
        
    
        
        
            
                "response_body": "{received:true}",
            
        
    
        
        
            
                "attempt_count": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "audit.created",
            
        
    
        
        
            
                "event_reference": "AUD-2026-00088",
            
        
    
        
        
            
                "delivered_at": new Date('2026-06-24T16:12:00Z'),
            
        
    
        
        
            
                "delivery_status": "pending",
            
        
    
        
        
            
                "http_status": 200,
            
        
    
        
        
            
                "request_payload": "{action:user.login,actor:Sarah Whitaker}",
            
        
    
        
        
            
                "response_body": "{ok:true}",
            
        
    
        
        
            
                "attempt_count": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "inventory.low",
            
        
    
        
        
            
                "event_reference": "INV-RB-ALERT-0003",
            
        
    
        
        
            
                "delivered_at": new Date('2026-06-05T09:22:00Z'),
            
        
    
        
        
            
                "delivery_status": "succeeded",
            
        
    
        
        
            
                "http_status": 503,
            
        
    
        
        
            
                "request_payload": "{item:RiverFeed Tilapia 30 Pellets 25kg,level:28}",
            
        
    
        
        
            
                "response_body": "Service unavailable",
            
        
    
        
        
            
                "attempt_count": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const EmailNotificationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "to_email": "amina.ndlovu@blueharbor.example",
            
        
    
        
        
            
                "subject": "Order ORD-2026-10021 Confirmed",
            
        
    
        
        
            
                "template_key": "order_confirmed",
            
        
    
        
        
            
                "payload": "{orderNumber:ORD-2026-10021,total:3760.00}",
            
        
    
        
        
            
                "send_status": "sent",
            
        
    
        
        
            
                "sent_at": new Date('2026-06-25T12:36:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "to_email": "mei.tan@seacoastbuyers.example",
            
        
    
        
        
            
                "subject": "Shipment Delivered ORD-2026-10021",
            
        
    
        
        
            
                "template_key": "order_delivered",
            
        
    
        
        
            
                "payload": "{orderNumber:ORD-2026-10021,deliveredAt:2026-06-27T08:20:00Z}",
            
        
    
        
        
            
                "send_status": "sent",
            
        
    
        
        
            
                "sent_at": new Date('2026-06-27T08:30:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "to_email": "diego.santos@blueharbor.example",
            
        
    
        
        
            
                "subject": "Webhook Delivery Failed",
            
        
    
        
        
            
                "template_key": "webhook_failed",
            
        
    
        
        
            
                "payload": "{endpoint:Riverbend Inventory Alerts,httpStatus:503}",
            
        
    
        
        
            
                "send_status": "failed",
            
        
    
        
        
            
                "sent_at": new Date('2026-06-05T09:30:00Z'),
            
        
    
        
        
            
                "failure_reason": "SMTP timeout",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "to_email": "sarah.whitaker@platform.example",
            
        
    
        
        
            
                "subject": "CSV Export Completed",
            
        
    
        
        
            
                "template_key": "csv_export_completed",
            
        
    
        
        
            
                "payload": "{entity:orders,status:completed}",
            
        
    
        
        
            
                "send_status": "failed",
            
        
    
        
        
            
                "sent_at": new Date('2026-06-26T18:05:00Z'),
            
        
    
        
        
            
                "failure_reason": "None",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const AuditLogsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "user.login",
            
        
    
        
        
            
                "entity_name": "users",
            
        
    
        
        
            
                "entity_reference": "Sarah Whitaker",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-24T16:10:00Z'),
            
        
    
        
        
            
                "ip_address": "203.0.113.10",
            
        
    
        
        
            
                "user_agent": "Mozilla/5.0 MacIntel Chrome",
            
        
    
        
        
            
                "change_summary": "User logged in successfully",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "batch.update",
            
        
    
        
        
            
                "entity_name": "batches",
            
        
    
        
        
            
                "entity_reference": "BHA-TIL-2026-01",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-13T08:00:00Z'),
            
        
    
        
        
            
                "ip_address": "198.51.100.24",
            
        
    
        
        
            
                "user_agent": "Mozilla/5.0 Windows Chrome",
            
        
    
        
        
            
                "change_summary": "Updated expected harvest date and notes",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "feeding_log.create",
            
        
    
        
        
            
                "entity_name": "feeding_logs",
            
        
    
        
        
            
                "entity_reference": "BHA-TIL-2026-01 2026-06-12",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-12T07:02:00Z'),
            
        
    
        
        
            
                "ip_address": "198.51.100.18",
            
        
    
        
        
            
                "user_agent": "Mozilla/5.0 iPad Safari",
            
        
    
        
        
            
                "change_summary": "Created feeding log for Pond A1 batch",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "action": "order.create",
            
        
    
        
        
            
                "entity_name": "orders",
            
        
    
        
        
            
                "entity_reference": "ORD-2026-10024",
            
        
    
        
        
            
                "occurred_at": new Date('2026-06-29T11:05:00Z'),
            
        
    
        
        
            
                "ip_address": "192.0.2.55",
            
        
    
        
        
            
                "user_agent": "Mozilla/5.0 MacIntel Safari",
            
        
    
        
        
            
                "change_summary": "Placed order for large tilapia listing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CsvJobsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "export",
            
        
    
        
        
            
                "entity_name": "inventory_items",
            
        
    
        
        
            
                "job_status": "completed",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 120,
            
        
    
        
        
            
                "processed_rows": 120,
            
        
    
        
        
            
                "error_rows": 0,
            
        
    
        
        
            
                "error_report": "No errors",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-06-02T09:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-06-02T09:02:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "import",
            
        
    
        
        
            
                "entity_name": "feeding_logs",
            
        
    
        
        
            
                "job_status": "queued",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 450,
            
        
    
        
        
            
                "processed_rows": 450,
            
        
    
        
        
            
                "error_rows": 0,
            
        
    
        
        
            
                "error_report": "No errors",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-06-15T18:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-06-15T18:01:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "import",
            
        
    
        
        
            
                "entity_name": "orders",
            
        
    
        
        
            
                "job_status": "failed",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 85,
            
        
    
        
        
            
                "processed_rows": 85,
            
        
    
        
        
            
                "error_rows": 0,
            
        
    
        
        
            
                "error_report": "No errors",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-06-26T18:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-06-26T18:01:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "job_type": "import",
            
        
    
        
        
            
                "entity_name": "water_quality_logs",
            
        
    
        
        
            
                "job_status": "queued",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "total_rows": 60,
            
        
    
        
        
            
                "processed_rows": 42,
            
        
    
        
        
            
                "error_rows": 18,
            
        
    
        
        
            
                "error_report": "Invalid pH values in rows 12 to 18",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-06-12T12:00:00Z'),
            
        
    
        
        
            
                "finished_at": new Date('2026-06-12T12:03:00Z'),
            
        
    
        
        
            
                // 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 associateTenantWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant0 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Tenant0?.setOrganization)
                {
                    await
                    Tenant0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant1 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Tenant1?.setOrganization)
                {
                    await
                    Tenant1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant2 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Tenant2?.setOrganization)
                {
                    await
                    Tenant2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Tenant3 = await Tenants.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Tenant3?.setOrganization)
                {
                    await
                    Tenant3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateUserMembershipWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const UserMembership0 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (UserMembership0?.setUser)
                {
                    await
                    UserMembership0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const UserMembership1 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (UserMembership1?.setUser)
                {
                    await
                    UserMembership1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const UserMembership2 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (UserMembership2?.setUser)
                {
                    await
                    UserMembership2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const UserMembership3 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (UserMembership3?.setUser)
                {
                    await
                    UserMembership3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
            
            async function associateUserMembershipWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const UserMembership0 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (UserMembership0?.setTenant)
                {
                    await
                    UserMembership0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const UserMembership1 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (UserMembership1?.setTenant)
                {
                    await
                    UserMembership1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const UserMembership2 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (UserMembership2?.setTenant)
                {
                    await
                    UserMembership2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const UserMembership3 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (UserMembership3?.setTenant)
                {
                    await
                    UserMembership3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateUserMembershipWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const UserMembership0 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (UserMembership0?.setOrganization)
                {
                    await
                    UserMembership0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const UserMembership1 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (UserMembership1?.setOrganization)
                {
                    await
                    UserMembership1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const UserMembership2 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (UserMembership2?.setOrganization)
                {
                    await
                    UserMembership2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const UserMembership3 = await UserMemberships.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (UserMembership3?.setOrganization)
                {
                    await
                    UserMembership3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTenantLocationWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TenantLocation0 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TenantLocation0?.setTenant)
                {
                    await
                    TenantLocation0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TenantLocation1 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TenantLocation1?.setTenant)
                {
                    await
                    TenantLocation1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TenantLocation2 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TenantLocation2?.setTenant)
                {
                    await
                    TenantLocation2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const TenantLocation3 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TenantLocation3?.setTenant)
                {
                    await
                    TenantLocation3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateTenantLocationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TenantLocation0 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TenantLocation0?.setOrganization)
                {
                    await
                    TenantLocation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TenantLocation1 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TenantLocation1?.setOrganization)
                {
                    await
                    TenantLocation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TenantLocation2 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TenantLocation2?.setOrganization)
                {
                    await
                    TenantLocation2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TenantLocation3 = await TenantLocations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TenantLocation3?.setOrganization)
                {
                    await
                    TenantLocation3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePondWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pond0 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Pond0?.setTenant)
                {
                    await
                    Pond0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pond1 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Pond1?.setTenant)
                {
                    await
                    Pond1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pond2 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Pond2?.setTenant)
                {
                    await
                    Pond2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Pond3 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Pond3?.setTenant)
                {
                    await
                    Pond3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associatePondWithLocation() {
            
                const relatedLocation0 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const Pond0 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Pond0?.setLocation)
                {
                    await
                    Pond0.
                    setLocation(relatedLocation0);
                }
            
                const relatedLocation1 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const Pond1 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Pond1?.setLocation)
                {
                    await
                    Pond1.
                    setLocation(relatedLocation1);
                }
            
                const relatedLocation2 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const Pond2 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Pond2?.setLocation)
                {
                    await
                    Pond2.
                    setLocation(relatedLocation2);
                }
            
                const relatedLocation3 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const Pond3 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Pond3?.setLocation)
                {
                    await
                    Pond3.
                    setLocation(relatedLocation3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePondWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pond0 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Pond0?.setOrganization)
                {
                    await
                    Pond0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pond1 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Pond1?.setOrganization)
                {
                    await
                    Pond1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pond2 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Pond2?.setOrganization)
                {
                    await
                    Pond2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Pond3 = await Ponds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Pond3?.setOrganization)
                {
                    await
                    Pond3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
            
            async function associateSpecyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Specy0 = await Species.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Specy0?.setOrganization)
                {
                    await
                    Specy0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Specy1 = await Species.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Specy1?.setOrganization)
                {
                    await
                    Specy1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Specy2 = await Species.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Specy2?.setOrganization)
                {
                    await
                    Specy2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Specy3 = await Species.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Specy3?.setOrganization)
                {
                    await
                    Specy3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateBatcheWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Batche0 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Batche0?.setTenant)
                {
                    await
                    Batche0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Batche1 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Batche1?.setTenant)
                {
                    await
                    Batche1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Batche2 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Batche2?.setTenant)
                {
                    await
                    Batche2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Batche3 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Batche3?.setTenant)
                {
                    await
                    Batche3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateBatcheWithPond() {
            
                const relatedPond0 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const Batche0 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Batche0?.setPond)
                {
                    await
                    Batche0.
                    setPond(relatedPond0);
                }
            
                const relatedPond1 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const Batche1 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Batche1?.setPond)
                {
                    await
                    Batche1.
                    setPond(relatedPond1);
                }
            
                const relatedPond2 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const Batche2 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Batche2?.setPond)
                {
                    await
                    Batche2.
                    setPond(relatedPond2);
                }
            
                const relatedPond3 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const Batche3 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Batche3?.setPond)
                {
                    await
                    Batche3.
                    setPond(relatedPond3);
                }
            
        }
        
    
        
            
            async function associateBatcheWithSpecy() {
            
                const relatedSpecy0 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const Batche0 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Batche0?.setSpecy)
                {
                    await
                    Batche0.
                    setSpecy(relatedSpecy0);
                }
            
                const relatedSpecy1 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const Batche1 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Batche1?.setSpecy)
                {
                    await
                    Batche1.
                    setSpecy(relatedSpecy1);
                }
            
                const relatedSpecy2 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const Batche2 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Batche2?.setSpecy)
                {
                    await
                    Batche2.
                    setSpecy(relatedSpecy2);
                }
            
                const relatedSpecy3 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const Batche3 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Batche3?.setSpecy)
                {
                    await
                    Batche3.
                    setSpecy(relatedSpecy3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateBatcheWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Batche0 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Batche0?.setOrganization)
                {
                    await
                    Batche0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Batche1 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Batche1?.setOrganization)
                {
                    await
                    Batche1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Batche2 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Batche2?.setOrganization)
                {
                    await
                    Batche2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Batche3 = await Batches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Batche3?.setOrganization)
                {
                    await
                    Batche3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFeedProductWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedProduct0 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedProduct0?.setTenant)
                {
                    await
                    FeedProduct0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedProduct1 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedProduct1?.setTenant)
                {
                    await
                    FeedProduct1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedProduct2 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedProduct2?.setTenant)
                {
                    await
                    FeedProduct2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedProduct3 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedProduct3?.setTenant)
                {
                    await
                    FeedProduct3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFeedProductWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedProduct0 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedProduct0?.setOrganization)
                {
                    await
                    FeedProduct0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedProduct1 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedProduct1?.setOrganization)
                {
                    await
                    FeedProduct1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedProduct2 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedProduct2?.setOrganization)
                {
                    await
                    FeedProduct2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedProduct3 = await FeedProducts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedProduct3?.setOrganization)
                {
                    await
                    FeedProduct3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInventoryItemWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setTenant)
                {
                    await
                    InventoryItem0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setTenant)
                {
                    await
                    InventoryItem1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setTenant)
                {
                    await
                    InventoryItem2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setTenant)
                {
                    await
                    InventoryItem3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateInventoryItemWithLocation() {
            
                const relatedLocation0 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setLocation)
                {
                    await
                    InventoryItem0.
                    setLocation(relatedLocation0);
                }
            
                const relatedLocation1 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setLocation)
                {
                    await
                    InventoryItem1.
                    setLocation(relatedLocation1);
                }
            
                const relatedLocation2 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setLocation)
                {
                    await
                    InventoryItem2.
                    setLocation(relatedLocation2);
                }
            
                const relatedLocation3 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setLocation)
                {
                    await
                    InventoryItem3.
                    setLocation(relatedLocation3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInventoryItemWithFeed_product() {
            
                const relatedFeed_product0 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setFeed_product)
                {
                    await
                    InventoryItem0.
                    setFeed_product(relatedFeed_product0);
                }
            
                const relatedFeed_product1 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setFeed_product)
                {
                    await
                    InventoryItem1.
                    setFeed_product(relatedFeed_product1);
                }
            
                const relatedFeed_product2 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setFeed_product)
                {
                    await
                    InventoryItem2.
                    setFeed_product(relatedFeed_product2);
                }
            
                const relatedFeed_product3 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setFeed_product)
                {
                    await
                    InventoryItem3.
                    setFeed_product(relatedFeed_product3);
                }
            
        }
        
    
        
            
            async function associateInventoryItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setOrganization)
                {
                    await
                    InventoryItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setOrganization)
                {
                    await
                    InventoryItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setOrganization)
                {
                    await
                    InventoryItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setOrganization)
                {
                    await
                    InventoryItem3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInventoryMovementWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setTenant)
                {
                    await
                    InventoryMovement0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setTenant)
                {
                    await
                    InventoryMovement1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setTenant)
                {
                    await
                    InventoryMovement2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setTenant)
                {
                    await
                    InventoryMovement3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateInventoryMovementWithInventory_item() {
            
                const relatedInventory_item0 = await InventoryItems.findOne({
                    offset: Math.floor(Math.random() * (await InventoryItems.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setInventory_item)
                {
                    await
                    InventoryMovement0.
                    setInventory_item(relatedInventory_item0);
                }
            
                const relatedInventory_item1 = await InventoryItems.findOne({
                    offset: Math.floor(Math.random() * (await InventoryItems.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setInventory_item)
                {
                    await
                    InventoryMovement1.
                    setInventory_item(relatedInventory_item1);
                }
            
                const relatedInventory_item2 = await InventoryItems.findOne({
                    offset: Math.floor(Math.random() * (await InventoryItems.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setInventory_item)
                {
                    await
                    InventoryMovement2.
                    setInventory_item(relatedInventory_item2);
                }
            
                const relatedInventory_item3 = await InventoryItems.findOne({
                    offset: Math.floor(Math.random() * (await InventoryItems.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setInventory_item)
                {
                    await
                    InventoryMovement3.
                    setInventory_item(relatedInventory_item3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateInventoryMovementWithBatch() {
            
                const relatedBatch0 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setBatch)
                {
                    await
                    InventoryMovement0.
                    setBatch(relatedBatch0);
                }
            
                const relatedBatch1 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setBatch)
                {
                    await
                    InventoryMovement1.
                    setBatch(relatedBatch1);
                }
            
                const relatedBatch2 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setBatch)
                {
                    await
                    InventoryMovement2.
                    setBatch(relatedBatch2);
                }
            
                const relatedBatch3 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setBatch)
                {
                    await
                    InventoryMovement3.
                    setBatch(relatedBatch3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateInventoryMovementWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setOrganization)
                {
                    await
                    InventoryMovement0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setOrganization)
                {
                    await
                    InventoryMovement1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setOrganization)
                {
                    await
                    InventoryMovement2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setOrganization)
                {
                    await
                    InventoryMovement3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFeedingLogWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedingLog0 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedingLog0?.setTenant)
                {
                    await
                    FeedingLog0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedingLog1 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedingLog1?.setTenant)
                {
                    await
                    FeedingLog1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedingLog2 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedingLog2?.setTenant)
                {
                    await
                    FeedingLog2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const FeedingLog3 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedingLog3?.setTenant)
                {
                    await
                    FeedingLog3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateFeedingLogWithBatch() {
            
                const relatedBatch0 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const FeedingLog0 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedingLog0?.setBatch)
                {
                    await
                    FeedingLog0.
                    setBatch(relatedBatch0);
                }
            
                const relatedBatch1 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const FeedingLog1 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedingLog1?.setBatch)
                {
                    await
                    FeedingLog1.
                    setBatch(relatedBatch1);
                }
            
                const relatedBatch2 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const FeedingLog2 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedingLog2?.setBatch)
                {
                    await
                    FeedingLog2.
                    setBatch(relatedBatch2);
                }
            
                const relatedBatch3 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const FeedingLog3 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedingLog3?.setBatch)
                {
                    await
                    FeedingLog3.
                    setBatch(relatedBatch3);
                }
            
        }
        
    
        
            
            async function associateFeedingLogWithFeed_product() {
            
                const relatedFeed_product0 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const FeedingLog0 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedingLog0?.setFeed_product)
                {
                    await
                    FeedingLog0.
                    setFeed_product(relatedFeed_product0);
                }
            
                const relatedFeed_product1 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const FeedingLog1 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedingLog1?.setFeed_product)
                {
                    await
                    FeedingLog1.
                    setFeed_product(relatedFeed_product1);
                }
            
                const relatedFeed_product2 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const FeedingLog2 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedingLog2?.setFeed_product)
                {
                    await
                    FeedingLog2.
                    setFeed_product(relatedFeed_product2);
                }
            
                const relatedFeed_product3 = await FeedProducts.findOne({
                    offset: Math.floor(Math.random() * (await FeedProducts.count())),
                });
                const FeedingLog3 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedingLog3?.setFeed_product)
                {
                    await
                    FeedingLog3.
                    setFeed_product(relatedFeed_product3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFeedingLogWithRecorded_by() {
            
                const relatedRecorded_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedingLog0 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedingLog0?.setRecorded_by)
                {
                    await
                    FeedingLog0.
                    setRecorded_by(relatedRecorded_by0);
                }
            
                const relatedRecorded_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedingLog1 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedingLog1?.setRecorded_by)
                {
                    await
                    FeedingLog1.
                    setRecorded_by(relatedRecorded_by1);
                }
            
                const relatedRecorded_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedingLog2 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedingLog2?.setRecorded_by)
                {
                    await
                    FeedingLog2.
                    setRecorded_by(relatedRecorded_by2);
                }
            
                const relatedRecorded_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const FeedingLog3 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedingLog3?.setRecorded_by)
                {
                    await
                    FeedingLog3.
                    setRecorded_by(relatedRecorded_by3);
                }
            
        }
        
    
        
            
            async function associateFeedingLogWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedingLog0 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (FeedingLog0?.setOrganization)
                {
                    await
                    FeedingLog0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedingLog1 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (FeedingLog1?.setOrganization)
                {
                    await
                    FeedingLog1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedingLog2 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (FeedingLog2?.setOrganization)
                {
                    await
                    FeedingLog2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const FeedingLog3 = await FeedingLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (FeedingLog3?.setOrganization)
                {
                    await
                    FeedingLog3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateWaterQualityLogWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WaterQualityLog0 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WaterQualityLog0?.setTenant)
                {
                    await
                    WaterQualityLog0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WaterQualityLog1 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WaterQualityLog1?.setTenant)
                {
                    await
                    WaterQualityLog1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WaterQualityLog2 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WaterQualityLog2?.setTenant)
                {
                    await
                    WaterQualityLog2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WaterQualityLog3 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WaterQualityLog3?.setTenant)
                {
                    await
                    WaterQualityLog3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateWaterQualityLogWithPond() {
            
                const relatedPond0 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const WaterQualityLog0 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WaterQualityLog0?.setPond)
                {
                    await
                    WaterQualityLog0.
                    setPond(relatedPond0);
                }
            
                const relatedPond1 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const WaterQualityLog1 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WaterQualityLog1?.setPond)
                {
                    await
                    WaterQualityLog1.
                    setPond(relatedPond1);
                }
            
                const relatedPond2 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const WaterQualityLog2 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WaterQualityLog2?.setPond)
                {
                    await
                    WaterQualityLog2.
                    setPond(relatedPond2);
                }
            
                const relatedPond3 = await Ponds.findOne({
                    offset: Math.floor(Math.random() * (await Ponds.count())),
                });
                const WaterQualityLog3 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WaterQualityLog3?.setPond)
                {
                    await
                    WaterQualityLog3.
                    setPond(relatedPond3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateWaterQualityLogWithRecorded_by() {
            
                const relatedRecorded_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WaterQualityLog0 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WaterQualityLog0?.setRecorded_by)
                {
                    await
                    WaterQualityLog0.
                    setRecorded_by(relatedRecorded_by0);
                }
            
                const relatedRecorded_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WaterQualityLog1 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WaterQualityLog1?.setRecorded_by)
                {
                    await
                    WaterQualityLog1.
                    setRecorded_by(relatedRecorded_by1);
                }
            
                const relatedRecorded_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WaterQualityLog2 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WaterQualityLog2?.setRecorded_by)
                {
                    await
                    WaterQualityLog2.
                    setRecorded_by(relatedRecorded_by2);
                }
            
                const relatedRecorded_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const WaterQualityLog3 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WaterQualityLog3?.setRecorded_by)
                {
                    await
                    WaterQualityLog3.
                    setRecorded_by(relatedRecorded_by3);
                }
            
        }
        
    
        
            
            async function associateWaterQualityLogWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WaterQualityLog0 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WaterQualityLog0?.setOrganization)
                {
                    await
                    WaterQualityLog0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WaterQualityLog1 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WaterQualityLog1?.setOrganization)
                {
                    await
                    WaterQualityLog1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WaterQualityLog2 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WaterQualityLog2?.setOrganization)
                {
                    await
                    WaterQualityLog2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WaterQualityLog3 = await WaterQualityLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WaterQualityLog3?.setOrganization)
                {
                    await
                    WaterQualityLog3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateHealthEventWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const HealthEvent0 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HealthEvent0?.setTenant)
                {
                    await
                    HealthEvent0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const HealthEvent1 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HealthEvent1?.setTenant)
                {
                    await
                    HealthEvent1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const HealthEvent2 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HealthEvent2?.setTenant)
                {
                    await
                    HealthEvent2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const HealthEvent3 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (HealthEvent3?.setTenant)
                {
                    await
                    HealthEvent3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateHealthEventWithBatch() {
            
                const relatedBatch0 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const HealthEvent0 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HealthEvent0?.setBatch)
                {
                    await
                    HealthEvent0.
                    setBatch(relatedBatch0);
                }
            
                const relatedBatch1 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const HealthEvent1 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HealthEvent1?.setBatch)
                {
                    await
                    HealthEvent1.
                    setBatch(relatedBatch1);
                }
            
                const relatedBatch2 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const HealthEvent2 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HealthEvent2?.setBatch)
                {
                    await
                    HealthEvent2.
                    setBatch(relatedBatch2);
                }
            
                const relatedBatch3 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const HealthEvent3 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (HealthEvent3?.setBatch)
                {
                    await
                    HealthEvent3.
                    setBatch(relatedBatch3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateHealthEventWithReported_by() {
            
                const relatedReported_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const HealthEvent0 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HealthEvent0?.setReported_by)
                {
                    await
                    HealthEvent0.
                    setReported_by(relatedReported_by0);
                }
            
                const relatedReported_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const HealthEvent1 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HealthEvent1?.setReported_by)
                {
                    await
                    HealthEvent1.
                    setReported_by(relatedReported_by1);
                }
            
                const relatedReported_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const HealthEvent2 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HealthEvent2?.setReported_by)
                {
                    await
                    HealthEvent2.
                    setReported_by(relatedReported_by2);
                }
            
                const relatedReported_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const HealthEvent3 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (HealthEvent3?.setReported_by)
                {
                    await
                    HealthEvent3.
                    setReported_by(relatedReported_by3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateHealthEventWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HealthEvent0 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (HealthEvent0?.setOrganization)
                {
                    await
                    HealthEvent0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HealthEvent1 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (HealthEvent1?.setOrganization)
                {
                    await
                    HealthEvent1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HealthEvent2 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (HealthEvent2?.setOrganization)
                {
                    await
                    HealthEvent2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const HealthEvent3 = await HealthEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (HealthEvent3?.setOrganization)
                {
                    await
                    HealthEvent3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateHarvestWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Harvest0 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Harvest0?.setTenant)
                {
                    await
                    Harvest0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Harvest1 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Harvest1?.setTenant)
                {
                    await
                    Harvest1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Harvest2 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Harvest2?.setTenant)
                {
                    await
                    Harvest2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Harvest3 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Harvest3?.setTenant)
                {
                    await
                    Harvest3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateHarvestWithBatch() {
            
                const relatedBatch0 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const Harvest0 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Harvest0?.setBatch)
                {
                    await
                    Harvest0.
                    setBatch(relatedBatch0);
                }
            
                const relatedBatch1 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const Harvest1 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Harvest1?.setBatch)
                {
                    await
                    Harvest1.
                    setBatch(relatedBatch1);
                }
            
                const relatedBatch2 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const Harvest2 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Harvest2?.setBatch)
                {
                    await
                    Harvest2.
                    setBatch(relatedBatch2);
                }
            
                const relatedBatch3 = await Batches.findOne({
                    offset: Math.floor(Math.random() * (await Batches.count())),
                });
                const Harvest3 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Harvest3?.setBatch)
                {
                    await
                    Harvest3.
                    setBatch(relatedBatch3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateHarvestWithRecorded_by() {
            
                const relatedRecorded_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Harvest0 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Harvest0?.setRecorded_by)
                {
                    await
                    Harvest0.
                    setRecorded_by(relatedRecorded_by0);
                }
            
                const relatedRecorded_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Harvest1 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Harvest1?.setRecorded_by)
                {
                    await
                    Harvest1.
                    setRecorded_by(relatedRecorded_by1);
                }
            
                const relatedRecorded_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Harvest2 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Harvest2?.setRecorded_by)
                {
                    await
                    Harvest2.
                    setRecorded_by(relatedRecorded_by2);
                }
            
                const relatedRecorded_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Harvest3 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Harvest3?.setRecorded_by)
                {
                    await
                    Harvest3.
                    setRecorded_by(relatedRecorded_by3);
                }
            
        }
        
    
        
            
            async function associateHarvestWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Harvest0 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Harvest0?.setOrganization)
                {
                    await
                    Harvest0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Harvest1 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Harvest1?.setOrganization)
                {
                    await
                    Harvest1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Harvest2 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Harvest2?.setOrganization)
                {
                    await
                    Harvest2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Harvest3 = await Harvests.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Harvest3?.setOrganization)
                {
                    await
                    Harvest3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMarketplaceListingWithSeller_tenant() {
            
                const relatedSeller_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const MarketplaceListing0 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MarketplaceListing0?.setSeller_tenant)
                {
                    await
                    MarketplaceListing0.
                    setSeller_tenant(relatedSeller_tenant0);
                }
            
                const relatedSeller_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const MarketplaceListing1 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MarketplaceListing1?.setSeller_tenant)
                {
                    await
                    MarketplaceListing1.
                    setSeller_tenant(relatedSeller_tenant1);
                }
            
                const relatedSeller_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const MarketplaceListing2 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MarketplaceListing2?.setSeller_tenant)
                {
                    await
                    MarketplaceListing2.
                    setSeller_tenant(relatedSeller_tenant2);
                }
            
                const relatedSeller_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const MarketplaceListing3 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MarketplaceListing3?.setSeller_tenant)
                {
                    await
                    MarketplaceListing3.
                    setSeller_tenant(relatedSeller_tenant3);
                }
            
        }
        
    
        
            
            async function associateMarketplaceListingWithHarvest() {
            
                const relatedHarvest0 = await Harvests.findOne({
                    offset: Math.floor(Math.random() * (await Harvests.count())),
                });
                const MarketplaceListing0 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MarketplaceListing0?.setHarvest)
                {
                    await
                    MarketplaceListing0.
                    setHarvest(relatedHarvest0);
                }
            
                const relatedHarvest1 = await Harvests.findOne({
                    offset: Math.floor(Math.random() * (await Harvests.count())),
                });
                const MarketplaceListing1 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MarketplaceListing1?.setHarvest)
                {
                    await
                    MarketplaceListing1.
                    setHarvest(relatedHarvest1);
                }
            
                const relatedHarvest2 = await Harvests.findOne({
                    offset: Math.floor(Math.random() * (await Harvests.count())),
                });
                const MarketplaceListing2 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MarketplaceListing2?.setHarvest)
                {
                    await
                    MarketplaceListing2.
                    setHarvest(relatedHarvest2);
                }
            
                const relatedHarvest3 = await Harvests.findOne({
                    offset: Math.floor(Math.random() * (await Harvests.count())),
                });
                const MarketplaceListing3 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MarketplaceListing3?.setHarvest)
                {
                    await
                    MarketplaceListing3.
                    setHarvest(relatedHarvest3);
                }
            
        }
        
    
        
            
            async function associateMarketplaceListingWithSpecy() {
            
                const relatedSpecy0 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const MarketplaceListing0 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MarketplaceListing0?.setSpecy)
                {
                    await
                    MarketplaceListing0.
                    setSpecy(relatedSpecy0);
                }
            
                const relatedSpecy1 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const MarketplaceListing1 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MarketplaceListing1?.setSpecy)
                {
                    await
                    MarketplaceListing1.
                    setSpecy(relatedSpecy1);
                }
            
                const relatedSpecy2 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const MarketplaceListing2 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MarketplaceListing2?.setSpecy)
                {
                    await
                    MarketplaceListing2.
                    setSpecy(relatedSpecy2);
                }
            
                const relatedSpecy3 = await Species.findOne({
                    offset: Math.floor(Math.random() * (await Species.count())),
                });
                const MarketplaceListing3 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MarketplaceListing3?.setSpecy)
                {
                    await
                    MarketplaceListing3.
                    setSpecy(relatedSpecy3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMarketplaceListingWithFulfillment_location() {
            
                const relatedFulfillment_location0 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const MarketplaceListing0 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MarketplaceListing0?.setFulfillment_location)
                {
                    await
                    MarketplaceListing0.
                    setFulfillment_location(relatedFulfillment_location0);
                }
            
                const relatedFulfillment_location1 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const MarketplaceListing1 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MarketplaceListing1?.setFulfillment_location)
                {
                    await
                    MarketplaceListing1.
                    setFulfillment_location(relatedFulfillment_location1);
                }
            
                const relatedFulfillment_location2 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const MarketplaceListing2 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MarketplaceListing2?.setFulfillment_location)
                {
                    await
                    MarketplaceListing2.
                    setFulfillment_location(relatedFulfillment_location2);
                }
            
                const relatedFulfillment_location3 = await TenantLocations.findOne({
                    offset: Math.floor(Math.random() * (await TenantLocations.count())),
                });
                const MarketplaceListing3 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MarketplaceListing3?.setFulfillment_location)
                {
                    await
                    MarketplaceListing3.
                    setFulfillment_location(relatedFulfillment_location3);
                }
            
        }
        
    
        
            
            async function associateMarketplaceListingWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MarketplaceListing0 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MarketplaceListing0?.setOrganization)
                {
                    await
                    MarketplaceListing0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MarketplaceListing1 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MarketplaceListing1?.setOrganization)
                {
                    await
                    MarketplaceListing1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MarketplaceListing2 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MarketplaceListing2?.setOrganization)
                {
                    await
                    MarketplaceListing2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MarketplaceListing3 = await MarketplaceListings.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MarketplaceListing3?.setOrganization)
                {
                    await
                    MarketplaceListing3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
            
            async function associateOrderWithBuyer_tenant() {
            
                const relatedBuyer_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setBuyer_tenant)
                {
                    await
                    Order0.
                    setBuyer_tenant(relatedBuyer_tenant0);
                }
            
                const relatedBuyer_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setBuyer_tenant)
                {
                    await
                    Order1.
                    setBuyer_tenant(relatedBuyer_tenant1);
                }
            
                const relatedBuyer_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setBuyer_tenant)
                {
                    await
                    Order2.
                    setBuyer_tenant(relatedBuyer_tenant2);
                }
            
                const relatedBuyer_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setBuyer_tenant)
                {
                    await
                    Order3.
                    setBuyer_tenant(relatedBuyer_tenant3);
                }
            
        }
        
    
        
            
            async function associateOrderWithSeller_tenant() {
            
                const relatedSeller_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setSeller_tenant)
                {
                    await
                    Order0.
                    setSeller_tenant(relatedSeller_tenant0);
                }
            
                const relatedSeller_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setSeller_tenant)
                {
                    await
                    Order1.
                    setSeller_tenant(relatedSeller_tenant1);
                }
            
                const relatedSeller_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setSeller_tenant)
                {
                    await
                    Order2.
                    setSeller_tenant(relatedSeller_tenant2);
                }
            
                const relatedSeller_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setSeller_tenant)
                {
                    await
                    Order3.
                    setSeller_tenant(relatedSeller_tenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            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 associateOrderItemWithListing() {
            
                const relatedListing0 = await MarketplaceListings.findOne({
                    offset: Math.floor(Math.random() * (await MarketplaceListings.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setListing)
                {
                    await
                    OrderItem0.
                    setListing(relatedListing0);
                }
            
                const relatedListing1 = await MarketplaceListings.findOne({
                    offset: Math.floor(Math.random() * (await MarketplaceListings.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setListing)
                {
                    await
                    OrderItem1.
                    setListing(relatedListing1);
                }
            
                const relatedListing2 = await MarketplaceListings.findOne({
                    offset: Math.floor(Math.random() * (await MarketplaceListings.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setListing)
                {
                    await
                    OrderItem2.
                    setListing(relatedListing2);
                }
            
                const relatedListing3 = await MarketplaceListings.findOne({
                    offset: Math.floor(Math.random() * (await MarketplaceListings.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setListing)
                {
                    await
                    OrderItem3.
                    setListing(relatedListing3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            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 associatePaymentTransactionWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const PaymentTransaction0 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentTransaction0?.setOrder)
                {
                    await
                    PaymentTransaction0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const PaymentTransaction1 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentTransaction1?.setOrder)
                {
                    await
                    PaymentTransaction1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const PaymentTransaction2 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentTransaction2?.setOrder)
                {
                    await
                    PaymentTransaction2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const PaymentTransaction3 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentTransaction3?.setOrder)
                {
                    await
                    PaymentTransaction3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associatePaymentTransactionWithBuyer_tenant() {
            
                const relatedBuyer_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction0 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentTransaction0?.setBuyer_tenant)
                {
                    await
                    PaymentTransaction0.
                    setBuyer_tenant(relatedBuyer_tenant0);
                }
            
                const relatedBuyer_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction1 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentTransaction1?.setBuyer_tenant)
                {
                    await
                    PaymentTransaction1.
                    setBuyer_tenant(relatedBuyer_tenant1);
                }
            
                const relatedBuyer_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction2 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentTransaction2?.setBuyer_tenant)
                {
                    await
                    PaymentTransaction2.
                    setBuyer_tenant(relatedBuyer_tenant2);
                }
            
                const relatedBuyer_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction3 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentTransaction3?.setBuyer_tenant)
                {
                    await
                    PaymentTransaction3.
                    setBuyer_tenant(relatedBuyer_tenant3);
                }
            
        }
        
    
        
            
            async function associatePaymentTransactionWithSeller_tenant() {
            
                const relatedSeller_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction0 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentTransaction0?.setSeller_tenant)
                {
                    await
                    PaymentTransaction0.
                    setSeller_tenant(relatedSeller_tenant0);
                }
            
                const relatedSeller_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction1 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentTransaction1?.setSeller_tenant)
                {
                    await
                    PaymentTransaction1.
                    setSeller_tenant(relatedSeller_tenant1);
                }
            
                const relatedSeller_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction2 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentTransaction2?.setSeller_tenant)
                {
                    await
                    PaymentTransaction2.
                    setSeller_tenant(relatedSeller_tenant2);
                }
            
                const relatedSeller_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const PaymentTransaction3 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentTransaction3?.setSeller_tenant)
                {
                    await
                    PaymentTransaction3.
                    setSeller_tenant(relatedSeller_tenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePaymentTransactionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTransaction0 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentTransaction0?.setOrganization)
                {
                    await
                    PaymentTransaction0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTransaction1 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentTransaction1?.setOrganization)
                {
                    await
                    PaymentTransaction1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTransaction2 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentTransaction2?.setOrganization)
                {
                    await
                    PaymentTransaction2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PaymentTransaction3 = await PaymentTransactions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentTransaction3?.setOrganization)
                {
                    await
                    PaymentTransaction3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateShipmentUpdateWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const ShipmentUpdate0 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ShipmentUpdate0?.setOrder)
                {
                    await
                    ShipmentUpdate0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const ShipmentUpdate1 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ShipmentUpdate1?.setOrder)
                {
                    await
                    ShipmentUpdate1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const ShipmentUpdate2 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ShipmentUpdate2?.setOrder)
                {
                    await
                    ShipmentUpdate2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const ShipmentUpdate3 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ShipmentUpdate3?.setOrder)
                {
                    await
                    ShipmentUpdate3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateShipmentUpdateWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShipmentUpdate0 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ShipmentUpdate0?.setOrganization)
                {
                    await
                    ShipmentUpdate0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShipmentUpdate1 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ShipmentUpdate1?.setOrganization)
                {
                    await
                    ShipmentUpdate1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShipmentUpdate2 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ShipmentUpdate2?.setOrganization)
                {
                    await
                    ShipmentUpdate2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ShipmentUpdate3 = await ShipmentUpdates.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ShipmentUpdate3?.setOrganization)
                {
                    await
                    ShipmentUpdate3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInvestmentWithInvestor_tenant() {
            
                const relatedInvestor_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment0 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Investment0?.setInvestor_tenant)
                {
                    await
                    Investment0.
                    setInvestor_tenant(relatedInvestor_tenant0);
                }
            
                const relatedInvestor_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment1 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Investment1?.setInvestor_tenant)
                {
                    await
                    Investment1.
                    setInvestor_tenant(relatedInvestor_tenant1);
                }
            
                const relatedInvestor_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment2 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Investment2?.setInvestor_tenant)
                {
                    await
                    Investment2.
                    setInvestor_tenant(relatedInvestor_tenant2);
                }
            
                const relatedInvestor_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment3 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Investment3?.setInvestor_tenant)
                {
                    await
                    Investment3.
                    setInvestor_tenant(relatedInvestor_tenant3);
                }
            
        }
        
    
        
            
            async function associateInvestmentWithFarm_tenant() {
            
                const relatedFarm_tenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment0 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Investment0?.setFarm_tenant)
                {
                    await
                    Investment0.
                    setFarm_tenant(relatedFarm_tenant0);
                }
            
                const relatedFarm_tenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment1 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Investment1?.setFarm_tenant)
                {
                    await
                    Investment1.
                    setFarm_tenant(relatedFarm_tenant1);
                }
            
                const relatedFarm_tenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment2 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Investment2?.setFarm_tenant)
                {
                    await
                    Investment2.
                    setFarm_tenant(relatedFarm_tenant2);
                }
            
                const relatedFarm_tenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const Investment3 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Investment3?.setFarm_tenant)
                {
                    await
                    Investment3.
                    setFarm_tenant(relatedFarm_tenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateInvestmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Investment0 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Investment0?.setOrganization)
                {
                    await
                    Investment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Investment1 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Investment1?.setOrganization)
                {
                    await
                    Investment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Investment2 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Investment2?.setOrganization)
                {
                    await
                    Investment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Investment3 = await Investments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Investment3?.setOrganization)
                {
                    await
                    Investment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateApiKeyWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ApiKey0 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ApiKey0?.setTenant)
                {
                    await
                    ApiKey0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ApiKey1 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ApiKey1?.setTenant)
                {
                    await
                    ApiKey1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ApiKey2 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ApiKey2?.setTenant)
                {
                    await
                    ApiKey2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const ApiKey3 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ApiKey3?.setTenant)
                {
                    await
                    ApiKey3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateApiKeyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ApiKey0 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ApiKey0?.setOrganization)
                {
                    await
                    ApiKey0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ApiKey1 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ApiKey1?.setOrganization)
                {
                    await
                    ApiKey1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ApiKey2 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ApiKey2?.setOrganization)
                {
                    await
                    ApiKey2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ApiKey3 = await ApiKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ApiKey3?.setOrganization)
                {
                    await
                    ApiKey3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateWebhookEndpointWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WebhookEndpoint0 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WebhookEndpoint0?.setTenant)
                {
                    await
                    WebhookEndpoint0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WebhookEndpoint1 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WebhookEndpoint1?.setTenant)
                {
                    await
                    WebhookEndpoint1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WebhookEndpoint2 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WebhookEndpoint2?.setTenant)
                {
                    await
                    WebhookEndpoint2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const WebhookEndpoint3 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WebhookEndpoint3?.setTenant)
                {
                    await
                    WebhookEndpoint3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateWebhookEndpointWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookEndpoint0 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WebhookEndpoint0?.setOrganization)
                {
                    await
                    WebhookEndpoint0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookEndpoint1 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WebhookEndpoint1?.setOrganization)
                {
                    await
                    WebhookEndpoint1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookEndpoint2 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WebhookEndpoint2?.setOrganization)
                {
                    await
                    WebhookEndpoint2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookEndpoint3 = await WebhookEndpoints.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WebhookEndpoint3?.setOrganization)
                {
                    await
                    WebhookEndpoint3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateWebhookDeliveryWithEndpoint() {
            
                const relatedEndpoint0 = await WebhookEndpoints.findOne({
                    offset: Math.floor(Math.random() * (await WebhookEndpoints.count())),
                });
                const WebhookDelivery0 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WebhookDelivery0?.setEndpoint)
                {
                    await
                    WebhookDelivery0.
                    setEndpoint(relatedEndpoint0);
                }
            
                const relatedEndpoint1 = await WebhookEndpoints.findOne({
                    offset: Math.floor(Math.random() * (await WebhookEndpoints.count())),
                });
                const WebhookDelivery1 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WebhookDelivery1?.setEndpoint)
                {
                    await
                    WebhookDelivery1.
                    setEndpoint(relatedEndpoint1);
                }
            
                const relatedEndpoint2 = await WebhookEndpoints.findOne({
                    offset: Math.floor(Math.random() * (await WebhookEndpoints.count())),
                });
                const WebhookDelivery2 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WebhookDelivery2?.setEndpoint)
                {
                    await
                    WebhookDelivery2.
                    setEndpoint(relatedEndpoint2);
                }
            
                const relatedEndpoint3 = await WebhookEndpoints.findOne({
                    offset: Math.floor(Math.random() * (await WebhookEndpoints.count())),
                });
                const WebhookDelivery3 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WebhookDelivery3?.setEndpoint)
                {
                    await
                    WebhookDelivery3.
                    setEndpoint(relatedEndpoint3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateWebhookDeliveryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookDelivery0 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WebhookDelivery0?.setOrganization)
                {
                    await
                    WebhookDelivery0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookDelivery1 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WebhookDelivery1?.setOrganization)
                {
                    await
                    WebhookDelivery1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookDelivery2 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WebhookDelivery2?.setOrganization)
                {
                    await
                    WebhookDelivery2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const WebhookDelivery3 = await WebhookDeliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WebhookDelivery3?.setOrganization)
                {
                    await
                    WebhookDelivery3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateEmailNotificationWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailNotification0 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (EmailNotification0?.setTenant)
                {
                    await
                    EmailNotification0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailNotification1 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (EmailNotification1?.setTenant)
                {
                    await
                    EmailNotification1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailNotification2 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (EmailNotification2?.setTenant)
                {
                    await
                    EmailNotification2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const EmailNotification3 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (EmailNotification3?.setTenant)
                {
                    await
                    EmailNotification3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateEmailNotificationWithRecipient_user() {
            
                const relatedRecipient_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const EmailNotification0 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (EmailNotification0?.setRecipient_user)
                {
                    await
                    EmailNotification0.
                    setRecipient_user(relatedRecipient_user0);
                }
            
                const relatedRecipient_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const EmailNotification1 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (EmailNotification1?.setRecipient_user)
                {
                    await
                    EmailNotification1.
                    setRecipient_user(relatedRecipient_user1);
                }
            
                const relatedRecipient_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const EmailNotification2 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (EmailNotification2?.setRecipient_user)
                {
                    await
                    EmailNotification2.
                    setRecipient_user(relatedRecipient_user2);
                }
            
                const relatedRecipient_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const EmailNotification3 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (EmailNotification3?.setRecipient_user)
                {
                    await
                    EmailNotification3.
                    setRecipient_user(relatedRecipient_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateEmailNotificationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailNotification0 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (EmailNotification0?.setOrganization)
                {
                    await
                    EmailNotification0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailNotification1 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (EmailNotification1?.setOrganization)
                {
                    await
                    EmailNotification1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailNotification2 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (EmailNotification2?.setOrganization)
                {
                    await
                    EmailNotification2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const EmailNotification3 = await EmailNotifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (EmailNotification3?.setOrganization)
                {
                    await
                    EmailNotification3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateAuditLogWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setTenant)
                {
                    await
                    AuditLog0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setTenant)
                {
                    await
                    AuditLog1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setTenant)
                {
                    await
                    AuditLog2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const AuditLog3 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditLog3?.setTenant)
                {
                    await
                    AuditLog3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
            
            async function associateAuditLogWithActor_user() {
            
                const relatedActor_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setActor_user)
                {
                    await
                    AuditLog0.
                    setActor_user(relatedActor_user0);
                }
            
                const relatedActor_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setActor_user)
                {
                    await
                    AuditLog1.
                    setActor_user(relatedActor_user1);
                }
            
                const relatedActor_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setActor_user)
                {
                    await
                    AuditLog2.
                    setActor_user(relatedActor_user2);
                }
            
                const relatedActor_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const AuditLog3 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditLog3?.setActor_user)
                {
                    await
                    AuditLog3.
                    setActor_user(relatedActor_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAuditLogWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog0 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (AuditLog0?.setOrganization)
                {
                    await
                    AuditLog0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog1 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (AuditLog1?.setOrganization)
                {
                    await
                    AuditLog1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog2 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (AuditLog2?.setOrganization)
                {
                    await
                    AuditLog2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const AuditLog3 = await AuditLogs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (AuditLog3?.setOrganization)
                {
                    await
                    AuditLog3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCsvJobWithTenant() {
            
                const relatedTenant0 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsvJob0 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsvJob0?.setTenant)
                {
                    await
                    CsvJob0.
                    setTenant(relatedTenant0);
                }
            
                const relatedTenant1 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsvJob1 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsvJob1?.setTenant)
                {
                    await
                    CsvJob1.
                    setTenant(relatedTenant1);
                }
            
                const relatedTenant2 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsvJob2 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsvJob2?.setTenant)
                {
                    await
                    CsvJob2.
                    setTenant(relatedTenant2);
                }
            
                const relatedTenant3 = await Tenants.findOne({
                    offset: Math.floor(Math.random() * (await Tenants.count())),
                });
                const CsvJob3 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CsvJob3?.setTenant)
                {
                    await
                    CsvJob3.
                    setTenant(relatedTenant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCsvJobWithRequested_by() {
            
                const relatedRequested_by0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CsvJob0 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsvJob0?.setRequested_by)
                {
                    await
                    CsvJob0.
                    setRequested_by(relatedRequested_by0);
                }
            
                const relatedRequested_by1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CsvJob1 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsvJob1?.setRequested_by)
                {
                    await
                    CsvJob1.
                    setRequested_by(relatedRequested_by1);
                }
            
                const relatedRequested_by2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CsvJob2 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsvJob2?.setRequested_by)
                {
                    await
                    CsvJob2.
                    setRequested_by(relatedRequested_by2);
                }
            
                const relatedRequested_by3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CsvJob3 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CsvJob3?.setRequested_by)
                {
                    await
                    CsvJob3.
                    setRequested_by(relatedRequested_by3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateCsvJobWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsvJob0 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CsvJob0?.setOrganization)
                {
                    await
                    CsvJob0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsvJob1 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CsvJob1?.setOrganization)
                {
                    await
                    CsvJob1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsvJob2 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CsvJob2?.setOrganization)
                {
                    await
                    CsvJob2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CsvJob3 = await CsvJobs.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CsvJob3?.setOrganization)
                {
                    await
                    CsvJob3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Tenants.bulkCreate(TenantsData);
                
            
            
                
                await UserMemberships.bulkCreate(UserMembershipsData);
                
            
            
                
                await TenantLocations.bulkCreate(TenantLocationsData);
                
            
            
                
                await Ponds.bulkCreate(PondsData);
                
            
            
                
                await Species.bulkCreate(SpeciesData);
                
            
            
                
                await Batches.bulkCreate(BatchesData);
                
            
            
                
                await FeedProducts.bulkCreate(FeedProductsData);
                
            
            
                
                await InventoryItems.bulkCreate(InventoryItemsData);
                
            
            
                
                await InventoryMovements.bulkCreate(InventoryMovementsData);
                
            
            
                
                await FeedingLogs.bulkCreate(FeedingLogsData);
                
            
            
                
                await WaterQualityLogs.bulkCreate(WaterQualityLogsData);
                
            
            
                
                await HealthEvents.bulkCreate(HealthEventsData);
                
            
            
                
                await Harvests.bulkCreate(HarvestsData);
                
            
            
                
                await MarketplaceListings.bulkCreate(MarketplaceListingsData);
                
            
            
                
                await Orders.bulkCreate(OrdersData);
                
            
            
                
                await OrderItems.bulkCreate(OrderItemsData);
                
            
            
                
                await PaymentTransactions.bulkCreate(PaymentTransactionsData);
                
            
            
                
                await ShipmentUpdates.bulkCreate(ShipmentUpdatesData);
                
            
            
                
                await Investments.bulkCreate(InvestmentsData);
                
            
            
                
                await ApiKeys.bulkCreate(ApiKeysData);
                
            
            
                
                await WebhookEndpoints.bulkCreate(WebhookEndpointsData);
                
            
            
                
                await WebhookDeliveries.bulkCreate(WebhookDeliveriesData);
                
            
            
                
                await EmailNotifications.bulkCreate(EmailNotificationsData);
                
            
            
                
                await AuditLogs.bulkCreate(AuditLogsData);
                
            
            
                
                await CsvJobs.bulkCreate(CsvJobsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTenantWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateUserMembershipWithUser(),
                    
                
                    
                        
                        await associateUserMembershipWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateUserMembershipWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTenantLocationWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTenantLocationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePondWithTenant(),
                    
                
                    
                        
                        await associatePondWithLocation(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePondWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSpecyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateBatcheWithTenant(),
                    
                
                    
                        
                        await associateBatcheWithPond(),
                    
                
                    
                        
                        await associateBatcheWithSpecy(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateBatcheWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFeedProductWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFeedProductWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInventoryItemWithTenant(),
                    
                
                    
                        
                        await associateInventoryItemWithLocation(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInventoryItemWithFeed_product(),
                    
                
                    
                        
                        await associateInventoryItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInventoryMovementWithTenant(),
                    
                
                    
                        
                        await associateInventoryMovementWithInventory_item(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInventoryMovementWithBatch(),
                    
                
                    
                
                    
                
                    
                        
                        await associateInventoryMovementWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFeedingLogWithTenant(),
                    
                
                    
                        
                        await associateFeedingLogWithBatch(),
                    
                
                    
                        
                        await associateFeedingLogWithFeed_product(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFeedingLogWithRecorded_by(),
                    
                
                    
                        
                        await associateFeedingLogWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateWaterQualityLogWithTenant(),
                    
                
                    
                        
                        await associateWaterQualityLogWithPond(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWaterQualityLogWithRecorded_by(),
                    
                
                    
                        
                        await associateWaterQualityLogWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateHealthEventWithTenant(),
                    
                
                    
                        
                        await associateHealthEventWithBatch(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateHealthEventWithReported_by(),
                    
                
                    
                
                    
                
                    
                        
                        await associateHealthEventWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateHarvestWithTenant(),
                    
                
                    
                        
                        await associateHarvestWithBatch(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateHarvestWithRecorded_by(),
                    
                
                    
                        
                        await associateHarvestWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMarketplaceListingWithSeller_tenant(),
                    
                
                    
                        
                        await associateMarketplaceListingWithHarvest(),
                    
                
                    
                        
                        await associateMarketplaceListingWithSpecy(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMarketplaceListingWithFulfillment_location(),
                    
                
                    
                        
                        await associateMarketplaceListingWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associateOrderWithBuyer_tenant(),
                    
                
                    
                        
                        await associateOrderWithSeller_tenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateOrderItemWithOrder(),
                    
                
                    
                        
                        await associateOrderItemWithListing(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentTransactionWithOrder(),
                    
                
                    
                        
                        await associatePaymentTransactionWithBuyer_tenant(),
                    
                
                    
                        
                        await associatePaymentTransactionWithSeller_tenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePaymentTransactionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateShipmentUpdateWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateShipmentUpdateWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInvestmentWithInvestor_tenant(),
                    
                
                    
                        
                        await associateInvestmentWithFarm_tenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateInvestmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateApiKeyWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateApiKeyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateWebhookEndpointWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWebhookEndpointWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateWebhookDeliveryWithEndpoint(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateWebhookDeliveryWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateEmailNotificationWithTenant(),
                    
                
                    
                        
                        await associateEmailNotificationWithRecipient_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateEmailNotificationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateAuditLogWithTenant(),
                    
                
                    
                        
                        await associateAuditLogWithActor_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAuditLogWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCsvJobWithTenant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCsvJobWithRequested_by(),
                    
                
                    
                
                    
                
                    
                        
                        await associateCsvJobWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('tenants', null, {});
            
            
            await queryInterface.bulkDelete('user_memberships', null, {});
            
            
            await queryInterface.bulkDelete('tenant_locations', null, {});
            
            
            await queryInterface.bulkDelete('ponds', null, {});
            
            
            await queryInterface.bulkDelete('species', null, {});
            
            
            await queryInterface.bulkDelete('batches', null, {});
            
            
            await queryInterface.bulkDelete('feed_products', null, {});
            
            
            await queryInterface.bulkDelete('inventory_items', null, {});
            
            
            await queryInterface.bulkDelete('inventory_movements', null, {});
            
            
            await queryInterface.bulkDelete('feeding_logs', null, {});
            
            
            await queryInterface.bulkDelete('water_quality_logs', null, {});
            
            
            await queryInterface.bulkDelete('health_events', null, {});
            
            
            await queryInterface.bulkDelete('harvests', null, {});
            
            
            await queryInterface.bulkDelete('marketplace_listings', null, {});
            
            
            await queryInterface.bulkDelete('orders', null, {});
            
            
            await queryInterface.bulkDelete('order_items', null, {});
            
            
            await queryInterface.bulkDelete('payment_transactions', null, {});
            
            
            await queryInterface.bulkDelete('shipment_updates', null, {});
            
            
            await queryInterface.bulkDelete('investments', null, {});
            
            
            await queryInterface.bulkDelete('api_keys', null, {});
            
            
            await queryInterface.bulkDelete('webhook_endpoints', null, {});
            
            
            await queryInterface.bulkDelete('webhook_deliveries', null, {});
            
            
            await queryInterface.bulkDelete('email_notifications', null, {});
            
            
            await queryInterface.bulkDelete('audit_logs', null, {});
            
            
            await queryInterface.bulkDelete('csv_jobs', null, {});
            
        
    },
};