





















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






const Organizations = db.organizations;

const Addresses = db.addresses;

const MerchantProfiles = db.merchant_profiles;

const Stores = db.stores;

const CourierProfiles = db.courier_profiles;

const ProductCategories = db.product_categories;

const Products = db.products;

const Carts = db.carts;

const CartItems = db.cart_items;

const Orders = db.orders;

const OrderItems = db.order_items;

const Payments = db.payments;

const Deliveries = db.deliveries;

const Payouts = db.payouts;

const Commissions = db.commissions;

const Reviews = db.reviews;

const SupportTickets = db.support_tickets;

const Notifications = db.notifications;

const Languages = db.languages;

const TranslationKeys = db.translation_keys;

const Translations = db.translations;







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



const AddressesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Ada Lovelace",
            
        
    
        
        
            
                "recipient_name": "Ada Lovelace",
            
        
    
        
        
            
                "phone_number": "Grace Hopper",
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                "state_region": "Alan Turing",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "street_address": "Alan Turing",
            
        
    
        
        
            
                "landmark": "Ada Lovelace",
            
        
    
        
        
            
                "latitude": 2.01,
            
        
    
        
        
            
                "longitude": 3.73,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Grace Hopper",
            
        
    
        
        
            
                "recipient_name": "Grace Hopper",
            
        
    
        
        
            
                "phone_number": "Ada Lovelace",
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "state_region": "Alan Turing",
            
        
    
        
        
            
                "city": "Marie Curie",
            
        
    
        
        
            
                "street_address": "Marie Curie",
            
        
    
        
        
            
                "landmark": "Marie Curie",
            
        
    
        
        
            
                "latitude": 3.6,
            
        
    
        
        
            
                "longitude": 9.61,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Alan Turing",
            
        
    
        
        
            
                "recipient_name": "Ada Lovelace",
            
        
    
        
        
            
                "phone_number": "Grace Hopper",
            
        
    
        
        
            
                "country": "Ada Lovelace",
            
        
    
        
        
            
                "state_region": "Alan Turing",
            
        
    
        
        
            
                "city": "Alan Turing",
            
        
    
        
        
            
                "street_address": "Marie Curie",
            
        
    
        
        
            
                "landmark": "Ada Lovelace",
            
        
    
        
        
            
                "latitude": 9.93,
            
        
    
        
        
            
                "longitude": 7.06,
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Marie Curie",
            
        
    
        
        
            
                "recipient_name": "Grace Hopper",
            
        
    
        
        
            
                "phone_number": "Ada Lovelace",
            
        
    
        
        
            
                "country": "Grace Hopper",
            
        
    
        
        
            
                "state_region": "Alan Turing",
            
        
    
        
        
            
                "city": "Ada Lovelace",
            
        
    
        
        
            
                "street_address": "Ada Lovelace",
            
        
    
        
        
            
                "landmark": "Ada Lovelace",
            
        
    
        
        
            
                "latitude": 5.33,
            
        
    
        
        
            
                "longitude": 0.89,
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MerchantProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "business_name": "Grace Hopper",
            
        
    
        
        
            
                "merchant_type": "grocery_store",
            
        
    
        
        
            
                "business_phone": "Alan Turing",
            
        
    
        
        
            
                "support_email": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                "is_verified": false,
            
        
    
        
        
            
                "verified_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "business_name": "Marie Curie",
            
        
    
        
        
            
                "merchant_type": "grocery_store",
            
        
    
        
        
            
                "business_phone": "Ada Lovelace",
            
        
    
        
        
            
                "support_email": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                "is_verified": false,
            
        
    
        
        
            
                "verified_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "business_name": "Marie Curie",
            
        
    
        
        
            
                "merchant_type": "shop_vendor",
            
        
    
        
        
            
                "business_phone": "Ada Lovelace",
            
        
    
        
        
            
                "support_email": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "is_verified": false,
            
        
    
        
        
            
                "verified_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "business_name": "Ada Lovelace",
            
        
    
        
        
            
                "merchant_type": "wholesaler",
            
        
    
        
        
            
                "business_phone": "Alan Turing",
            
        
    
        
        
            
                "support_email": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                "is_verified": true,
            
        
    
        
        
            
                "verified_at": new Date(Date.now()),
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const StoresData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "store_name": "Marie Curie",
            
        
    
        
        
            
                "store_code": "Ada Lovelace",
            
        
    
        
        
            
                "store_phone": "Alan Turing",
            
        
    
        
        
            
                "store_email": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "offers_pickup": false,
            
        
    
        
        
            
                "offers_delivery": true,
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "store_name": "Marie Curie",
            
        
    
        
        
            
                "store_code": "Ada Lovelace",
            
        
    
        
        
            
                "store_phone": "Ada Lovelace",
            
        
    
        
        
            
                "store_email": "Marie Curie",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "offers_pickup": true,
            
        
    
        
        
            
                "offers_delivery": true,
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "store_name": "Grace Hopper",
            
        
    
        
        
            
                "store_code": "Grace Hopper",
            
        
    
        
        
            
                "store_phone": "Grace Hopper",
            
        
    
        
        
            
                "store_email": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "offers_pickup": true,
            
        
    
        
        
            
                "offers_delivery": true,
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "store_name": "Alan Turing",
            
        
    
        
        
            
                "store_code": "Ada Lovelace",
            
        
    
        
        
            
                "store_phone": "Alan Turing",
            
        
    
        
        
            
                "store_email": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "offers_pickup": false,
            
        
    
        
        
            
                "offers_delivery": true,
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "closed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CourierProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "vehicle_type": "car",
            
        
    
        
        
            
                "government_id_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "is_available": true,
            
        
    
        
        
            
                "rating_average": 6.8,
            
        
    
        
        
            
                "rating_count": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "vehicle_type": "bicycle",
            
        
    
        
        
            
                "government_id_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "is_available": false,
            
        
    
        
        
            
                "rating_average": 1.89,
            
        
    
        
        
            
                "rating_count": 6,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "vehicle_type": "walking",
            
        
    
        
        
            
                "government_id_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "suspended",
            
        
    
        
        
            
                "is_available": false,
            
        
    
        
        
            
                "rating_average": 9.54,
            
        
    
        
        
            
                "rating_count": 1,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "vehicle_type": "motorbike",
            
        
    
        
        
            
                "government_id_number": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "is_available": false,
            
        
    
        
        
            
                "rating_average": 7.89,
            
        
    
        
        
            
                "rating_count": 3,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProductCategoriesData = [
    
    {
    
        
        
            
                "category_name": "Ada Lovelace",
            
        
    
        
        
            
                "slug": "Alan Turing",
            
        
    
        
        
            
                "description": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "category_name": "Ada Lovelace",
            
        
    
        
        
            
                "slug": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "category_name": "Alan Turing",
            
        
    
        
        
            
                "slug": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "category_name": "Alan Turing",
            
        
    
        
        
            
                "slug": "Grace Hopper",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ProductsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "Marie Curie",
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 2.74,
            
        
    
        
        
            
                "compare_at_price": 0.94,
            
        
    
        
        
            
                "stock_quantity": 5,
            
        
    
        
        
            
                "is_available": false,
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "Alan Turing",
            
        
    
        
        
            
                "sku": "Grace Hopper",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 9.91,
            
        
    
        
        
            
                "compare_at_price": 6.26,
            
        
    
        
        
            
                "stock_quantity": 7,
            
        
    
        
        
            
                "is_available": true,
            
        
    
        
        
            
                "is_featured": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "Ada Lovelace",
            
        
    
        
        
            
                "sku": "Alan Turing",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 3.17,
            
        
    
        
        
            
                "compare_at_price": 4.08,
            
        
    
        
        
            
                "stock_quantity": 1,
            
        
    
        
        
            
                "is_available": false,
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name": "Grace Hopper",
            
        
    
        
        
            
                "sku": "Grace Hopper",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 8.81,
            
        
    
        
        
            
                "compare_at_price": 2.25,
            
        
    
        
        
            
                "stock_quantity": 1,
            
        
    
        
        
            
                "is_available": true,
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CartsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "abandoned",
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "abandoned",
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "last_activity_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CartItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 7,
            
        
    
        
        
            
                "unit_price": 3.67,
            
        
    
        
        
            
                "line_total": 1.65,
            
        
    
        
        
            
                "item_note": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 7,
            
        
    
        
        
            
                "unit_price": 1.28,
            
        
    
        
        
            
                "line_total": 6.71,
            
        
    
        
        
            
                "item_note": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 4,
            
        
    
        
        
            
                "unit_price": 7.84,
            
        
    
        
        
            
                "line_total": 5.54,
            
        
    
        
        
            
                "item_note": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 7,
            
        
    
        
        
            
                "unit_price": 1.05,
            
        
    
        
        
            
                "line_total": 1.83,
            
        
    
        
        
            
                "item_note": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrdersData = [
    
    {
    
        
        
            
                "order_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "ready_for_pickup",
            
        
    
        
        
            
                "fulfillment_type": "delivery",
            
        
    
        
        
            
                "subtotal_amount": 9.27,
            
        
    
        
        
            
                "delivery_fee": 6.44,
            
        
    
        
        
            
                "service_fee": 7.71,
            
        
    
        
        
            
                "discount_amount": 8.03,
            
        
    
        
        
            
                "tax_amount": 9.51,
            
        
    
        
        
            
                "total_amount": 3.05,
            
        
    
        
        
            
                "customer_note": "Marie Curie",
            
        
    
        
        
            
                "placed_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "ready_for_pickup",
            
        
    
        
        
            
                "fulfillment_type": "pickup",
            
        
    
        
        
            
                "subtotal_amount": 3.17,
            
        
    
        
        
            
                "delivery_fee": 0.07,
            
        
    
        
        
            
                "service_fee": 7.36,
            
        
    
        
        
            
                "discount_amount": 8.53,
            
        
    
        
        
            
                "tax_amount": 7.41,
            
        
    
        
        
            
                "total_amount": 5.39,
            
        
    
        
        
            
                "customer_note": "Grace Hopper",
            
        
    
        
        
            
                "placed_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "delivered",
            
        
    
        
        
            
                "fulfillment_type": "pickup",
            
        
    
        
        
            
                "subtotal_amount": 7.83,
            
        
    
        
        
            
                "delivery_fee": 4.55,
            
        
    
        
        
            
                "service_fee": 4.88,
            
        
    
        
        
            
                "discount_amount": 8.61,
            
        
    
        
        
            
                "tax_amount": 7.32,
            
        
    
        
        
            
                "total_amount": 6.51,
            
        
    
        
        
            
                "customer_note": "Ada Lovelace",
            
        
    
        
        
            
                "placed_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "out_for_delivery",
            
        
    
        
        
            
                "fulfillment_type": "pickup",
            
        
    
        
        
            
                "subtotal_amount": 6.51,
            
        
    
        
        
            
                "delivery_fee": 4.26,
            
        
    
        
        
            
                "service_fee": 9.86,
            
        
    
        
        
            
                "discount_amount": 0.69,
            
        
    
        
        
            
                "tax_amount": 0.92,
            
        
    
        
        
            
                "total_amount": 4.03,
            
        
    
        
        
            
                "customer_note": "Marie Curie",
            
        
    
        
        
            
                "placed_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const OrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Marie Curie",
            
        
    
        
        
            
                "unit_price": 6.26,
            
        
    
        
        
            
                "quantity": 3,
            
        
    
        
        
            
                "line_total": 2.22,
            
        
    
        
        
            
                "item_note": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Grace Hopper",
            
        
    
        
        
            
                "unit_price": 8.21,
            
        
    
        
        
            
                "quantity": 8,
            
        
    
        
        
            
                "line_total": 4.73,
            
        
    
        
        
            
                "item_note": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Alan Turing",
            
        
    
        
        
            
                "unit_price": 0.07,
            
        
    
        
        
            
                "quantity": 9,
            
        
    
        
        
            
                "line_total": 9.22,
            
        
    
        
        
            
                "item_note": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Ada Lovelace",
            
        
    
        
        
            
                "unit_price": 8.36,
            
        
    
        
        
            
                "quantity": 8,
            
        
    
        
        
            
                "line_total": 7.02,
            
        
    
        
        
            
                "item_note": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_reference": "Ada Lovelace",
            
        
    
        
        
            
                "payment_method": "cash_on_delivery",
            
        
    
        
        
            
                "payment_status": "failed",
            
        
    
        
        
            
                "amount": 5.39,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "authorized_at": new Date(Date.now()),
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_reference": "Marie Curie",
            
        
    
        
        
            
                "payment_method": "wallet",
            
        
    
        
        
            
                "payment_status": "pending",
            
        
    
        
        
            
                "amount": 5.55,
            
        
    
        
        
            
                "currency": "Grace Hopper",
            
        
    
        
        
            
                "authorized_at": new Date(Date.now()),
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_reference": "Alan Turing",
            
        
    
        
        
            
                "payment_method": "wallet",
            
        
    
        
        
            
                "payment_status": "authorized",
            
        
    
        
        
            
                "amount": 2.29,
            
        
    
        
        
            
                "currency": "Alan Turing",
            
        
    
        
        
            
                "authorized_at": new Date(Date.now()),
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "payment_reference": "Ada Lovelace",
            
        
    
        
        
            
                "payment_method": "card",
            
        
    
        
        
            
                "payment_status": "failed",
            
        
    
        
        
            
                "amount": 5.83,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "authorized_at": new Date(Date.now()),
            
        
    
        
        
            
                "captured_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const DeliveriesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_status": "in_transit",
            
        
    
        
        
            
                "delivery_mode": "bicycle",
            
        
    
        
        
            
                "pickup_latitude": 3.56,
            
        
    
        
        
            
                "pickup_longitude": 3.44,
            
        
    
        
        
            
                "dropoff_latitude": 3.9,
            
        
    
        
        
            
                "dropoff_longitude": 2.24,
            
        
    
        
        
            
                "distance_km": 1.95,
            
        
    
        
        
            
                "courier_earnings": 3.52,
            
        
    
        
        
            
                "platform_commission": 5.64,
            
        
    
        
        
            
                "assigned_at": new Date(Date.now()),
            
        
    
        
        
            
                "picked_up_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_status": "picked_up",
            
        
    
        
        
            
                "delivery_mode": "bicycle",
            
        
    
        
        
            
                "pickup_latitude": 8.53,
            
        
    
        
        
            
                "pickup_longitude": 9.24,
            
        
    
        
        
            
                "dropoff_latitude": 3.05,
            
        
    
        
        
            
                "dropoff_longitude": 6.79,
            
        
    
        
        
            
                "distance_km": 1.32,
            
        
    
        
        
            
                "courier_earnings": 7.7,
            
        
    
        
        
            
                "platform_commission": 5.58,
            
        
    
        
        
            
                "assigned_at": new Date(Date.now()),
            
        
    
        
        
            
                "picked_up_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_status": "pending_assignment",
            
        
    
        
        
            
                "delivery_mode": "walking",
            
        
    
        
        
            
                "pickup_latitude": 9.26,
            
        
    
        
        
            
                "pickup_longitude": 5.51,
            
        
    
        
        
            
                "dropoff_latitude": 1.94,
            
        
    
        
        
            
                "dropoff_longitude": 8.93,
            
        
    
        
        
            
                "distance_km": 9.49,
            
        
    
        
        
            
                "courier_earnings": 6.87,
            
        
    
        
        
            
                "platform_commission": 2.28,
            
        
    
        
        
            
                "assigned_at": new Date(Date.now()),
            
        
    
        
        
            
                "picked_up_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "delivery_status": "delivered",
            
        
    
        
        
            
                "delivery_mode": "van",
            
        
    
        
        
            
                "pickup_latitude": 8.28,
            
        
    
        
        
            
                "pickup_longitude": 5.23,
            
        
    
        
        
            
                "dropoff_latitude": 9.5,
            
        
    
        
        
            
                "dropoff_longitude": 9.22,
            
        
    
        
        
            
                "distance_km": 5.99,
            
        
    
        
        
            
                "courier_earnings": 9.66,
            
        
    
        
        
            
                "platform_commission": 1.86,
            
        
    
        
        
            
                "assigned_at": new Date(Date.now()),
            
        
    
        
        
            
                "picked_up_at": new Date(Date.now()),
            
        
    
        
        
            
                "delivered_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PayoutsData = [
    
    {
    
        
        
            
                "beneficiary_type": "merchant",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 0.75,
            
        
    
        
        
            
                "currency": "Alan Turing",
            
        
    
        
        
            
                "payout_method": "cash",
            
        
    
        
        
            
                "status": "processing",
            
        
    
        
        
            
                "payout_reference": "Alan Turing",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "beneficiary_type": "merchant",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 2.46,
            
        
    
        
        
            
                "currency": "Grace Hopper",
            
        
    
        
        
            
                "payout_method": "cash",
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "payout_reference": "Alan Turing",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "beneficiary_type": "merchant",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 1.85,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "payout_method": "mobile_money",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "payout_reference": "Ada Lovelace",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Ada Lovelace",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "beneficiary_type": "merchant",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "amount": 9.89,
            
        
    
        
        
            
                "currency": "Ada Lovelace",
            
        
    
        
        
            
                "payout_method": "cash",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "payout_reference": "Alan Turing",
            
        
    
        
        
            
                "requested_at": new Date(Date.now()),
            
        
    
        
        
            
                "paid_at": new Date(Date.now()),
            
        
    
        
        
            
                "notes": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const CommissionsData = [
    
    {
    
        
        
            
                "scope": "global",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "merchant_type": "grocery_store",
            
        
    
        
        
            
                "fee_type": "fixed",
            
        
    
        
        
            
                "fee_value": 6.27,
            
        
    
        
        
            
                "effective_from": new Date(Date.now()),
            
        
    
        
        
            
                "effective_to": new Date(Date.now()),
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "scope": "merchant_type",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "merchant_type": "shop_vendor",
            
        
    
        
        
            
                "fee_type": "fixed",
            
        
    
        
        
            
                "fee_value": 4.8,
            
        
    
        
        
            
                "effective_from": new Date(Date.now()),
            
        
    
        
        
            
                "effective_to": new Date(Date.now()),
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "scope": "global",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "merchant_type": "grocery_store",
            
        
    
        
        
            
                "fee_type": "percentage",
            
        
    
        
        
            
                "fee_value": 1.48,
            
        
    
        
        
            
                "effective_from": new Date(Date.now()),
            
        
    
        
        
            
                "effective_to": new Date(Date.now()),
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "scope": "merchant_type",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "merchant_type": "grocery_store",
            
        
    
        
        
            
                "fee_type": "fixed",
            
        
    
        
        
            
                "fee_value": 1.73,
            
        
    
        
        
            
                "effective_from": new Date(Date.now()),
            
        
    
        
        
            
                "effective_to": new Date(Date.now()),
            
        
    
        
        
            
                "is_active": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ReviewsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "target_type": "courier",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 4,
            
        
    
        
        
            
                "comment": "Alan Turing",
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "target_type": "store",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 6,
            
        
    
        
        
            
                "comment": "Alan Turing",
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "target_type": "courier",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 6,
            
        
    
        
        
            
                "comment": "Grace Hopper",
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "target_type": "store",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 1,
            
        
    
        
        
            
                "comment": "Marie Curie",
            
        
    
        
        
            
                "reviewed_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const SupportTicketsData = [
    
    {
    
        
        
            
                "ticket_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "order_issue",
            
        
    
        
        
            
                "priority": "medium",
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "subject": "Marie Curie",
            
        
    
        
        
            
                "description": "Alan Turing",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "ticket_number": "Marie Curie",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "payment_issue",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "subject": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "ticket_number": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "other",
            
        
    
        
        
            
                "priority": "urgent",
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "subject": "Alan Turing",
            
        
    
        
        
            
                "description": "Marie Curie",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "ticket_number": "Alan Turing",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "category": "order_issue",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                "status": "waiting_on_user",
            
        
    
        
        
            
                "subject": "Grace Hopper",
            
        
    
        
        
            
                "description": "Grace Hopper",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date(Date.now()),
            
        
    
        
        
            
                "resolved_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const NotificationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "title_text": "Marie Curie",
            
        
    
        
        
            
                "body_text": "Marie Curie",
            
        
    
        
        
            
                "deep_link": "Alan Turing",
            
        
    
        
        
            
                "is_read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "in_app",
            
        
    
        
        
            
                "title_text": "Ada Lovelace",
            
        
    
        
        
            
                "body_text": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Grace Hopper",
            
        
    
        
        
            
                "is_read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "push",
            
        
    
        
        
            
                "title_text": "Marie Curie",
            
        
    
        
        
            
                "body_text": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Grace Hopper",
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "title_text": "Grace Hopper",
            
        
    
        
        
            
                "body_text": "Grace Hopper",
            
        
    
        
        
            
                "deep_link": "Marie Curie",
            
        
    
        
        
            
                "is_read": false,
            
        
    
        
        
            
                "sent_at": new Date(Date.now()),
            
        
    
        
        
            
                "read_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const LanguagesData = [
    
    {
    
        
        
            
                "language_name": "Grace Hopper",
            
        
    
        
        
            
                "locale_code": "Grace Hopper",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "language_name": "Grace Hopper",
            
        
    
        
        
            
                "locale_code": "Alan Turing",
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "language_name": "Ada Lovelace",
            
        
    
        
        
            
                "locale_code": "Grace Hopper",
            
        
    
        
        
            
                "is_default": true,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "language_name": "Marie Curie",
            
        
    
        
        
            
                "locale_code": "Ada Lovelace",
            
        
    
        
        
            
                "is_default": false,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



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



const TranslationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "value_text": "Grace Hopper",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "value_text": "Ada Lovelace",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "value_text": "Marie Curie",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "value_text": "Alan Turing",
            
        
    
        
        
            
                "published_at": new Date(Date.now()),
            
        
    
        
        
            
                // 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 associateAddressWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Address0 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Address0?.setUser)
                {
                    await
                    Address0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Address1 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Address1?.setUser)
                {
                    await
                    Address1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Address2 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Address2?.setUser)
                {
                    await
                    Address2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Address3 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Address3?.setUser)
                {
                    await
                    Address3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAddressWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address0 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Address0?.setOrganization)
                {
                    await
                    Address0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address1 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Address1?.setOrganization)
                {
                    await
                    Address1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address2 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Address2?.setOrganization)
                {
                    await
                    Address2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Address3 = await Addresses.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Address3?.setOrganization)
                {
                    await
                    Address3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMerchantProfileWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MerchantProfile0 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MerchantProfile0?.setUser)
                {
                    await
                    MerchantProfile0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MerchantProfile1 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MerchantProfile1?.setUser)
                {
                    await
                    MerchantProfile1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MerchantProfile2 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MerchantProfile2?.setUser)
                {
                    await
                    MerchantProfile2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const MerchantProfile3 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MerchantProfile3?.setUser)
                {
                    await
                    MerchantProfile3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMerchantProfileWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MerchantProfile0 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MerchantProfile0?.setOrganization)
                {
                    await
                    MerchantProfile0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MerchantProfile1 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MerchantProfile1?.setOrganization)
                {
                    await
                    MerchantProfile1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MerchantProfile2 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MerchantProfile2?.setOrganization)
                {
                    await
                    MerchantProfile2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MerchantProfile3 = await MerchantProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MerchantProfile3?.setOrganization)
                {
                    await
                    MerchantProfile3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateStoreWithMerchant_profile() {
            
                const relatedMerchant_profile0 = await MerchantProfiles.findOne({
                    offset: Math.floor(Math.random() * (await MerchantProfiles.count())),
                });
                const Store0 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Store0?.setMerchant_profile)
                {
                    await
                    Store0.
                    setMerchant_profile(relatedMerchant_profile0);
                }
            
                const relatedMerchant_profile1 = await MerchantProfiles.findOne({
                    offset: Math.floor(Math.random() * (await MerchantProfiles.count())),
                });
                const Store1 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Store1?.setMerchant_profile)
                {
                    await
                    Store1.
                    setMerchant_profile(relatedMerchant_profile1);
                }
            
                const relatedMerchant_profile2 = await MerchantProfiles.findOne({
                    offset: Math.floor(Math.random() * (await MerchantProfiles.count())),
                });
                const Store2 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Store2?.setMerchant_profile)
                {
                    await
                    Store2.
                    setMerchant_profile(relatedMerchant_profile2);
                }
            
                const relatedMerchant_profile3 = await MerchantProfiles.findOne({
                    offset: Math.floor(Math.random() * (await MerchantProfiles.count())),
                });
                const Store3 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Store3?.setMerchant_profile)
                {
                    await
                    Store3.
                    setMerchant_profile(relatedMerchant_profile3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStoreWithAddres() {
            
                const relatedAddres0 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Store0 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Store0?.setAddres)
                {
                    await
                    Store0.
                    setAddres(relatedAddres0);
                }
            
                const relatedAddres1 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Store1 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Store1?.setAddres)
                {
                    await
                    Store1.
                    setAddres(relatedAddres1);
                }
            
                const relatedAddres2 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Store2 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Store2?.setAddres)
                {
                    await
                    Store2.
                    setAddres(relatedAddres2);
                }
            
                const relatedAddres3 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Store3 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Store3?.setAddres)
                {
                    await
                    Store3.
                    setAddres(relatedAddres3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateStoreWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store0 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Store0?.setOrganization)
                {
                    await
                    Store0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store1 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Store1?.setOrganization)
                {
                    await
                    Store1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store2 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Store2?.setOrganization)
                {
                    await
                    Store2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Store3 = await Stores.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Store3?.setOrganization)
                {
                    await
                    Store3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCourierProfileWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CourierProfile0 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CourierProfile0?.setUser)
                {
                    await
                    CourierProfile0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CourierProfile1 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CourierProfile1?.setUser)
                {
                    await
                    CourierProfile1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CourierProfile2 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CourierProfile2?.setUser)
                {
                    await
                    CourierProfile2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const CourierProfile3 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CourierProfile3?.setUser)
                {
                    await
                    CourierProfile3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCourierProfileWithCurrent_addres() {
            
                const relatedCurrent_addres0 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const CourierProfile0 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CourierProfile0?.setCurrent_addres)
                {
                    await
                    CourierProfile0.
                    setCurrent_addres(relatedCurrent_addres0);
                }
            
                const relatedCurrent_addres1 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const CourierProfile1 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CourierProfile1?.setCurrent_addres)
                {
                    await
                    CourierProfile1.
                    setCurrent_addres(relatedCurrent_addres1);
                }
            
                const relatedCurrent_addres2 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const CourierProfile2 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CourierProfile2?.setCurrent_addres)
                {
                    await
                    CourierProfile2.
                    setCurrent_addres(relatedCurrent_addres2);
                }
            
                const relatedCurrent_addres3 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const CourierProfile3 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CourierProfile3?.setCurrent_addres)
                {
                    await
                    CourierProfile3.
                    setCurrent_addres(relatedCurrent_addres3);
                }
            
        }
        
    
        
            
            async function associateCourierProfileWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CourierProfile0 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CourierProfile0?.setOrganization)
                {
                    await
                    CourierProfile0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CourierProfile1 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CourierProfile1?.setOrganization)
                {
                    await
                    CourierProfile1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CourierProfile2 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CourierProfile2?.setOrganization)
                {
                    await
                    CourierProfile2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CourierProfile3 = await CourierProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CourierProfile3?.setOrganization)
                {
                    await
                    CourierProfile3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
    
        
            
            async function associateProductCategoryWithParent_category() {
            
                const relatedParent_category0 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const ProductCategory0 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductCategory0?.setParent_category)
                {
                    await
                    ProductCategory0.
                    setParent_category(relatedParent_category0);
                }
            
                const relatedParent_category1 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const ProductCategory1 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductCategory1?.setParent_category)
                {
                    await
                    ProductCategory1.
                    setParent_category(relatedParent_category1);
                }
            
                const relatedParent_category2 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const ProductCategory2 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductCategory2?.setParent_category)
                {
                    await
                    ProductCategory2.
                    setParent_category(relatedParent_category2);
                }
            
                const relatedParent_category3 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const ProductCategory3 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductCategory3?.setParent_category)
                {
                    await
                    ProductCategory3.
                    setParent_category(relatedParent_category3);
                }
            
        }
        
    
        
    
        
            
            async function associateProductCategoryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory0 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductCategory0?.setOrganization)
                {
                    await
                    ProductCategory0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory1 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductCategory1?.setOrganization)
                {
                    await
                    ProductCategory1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory2 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductCategory2?.setOrganization)
                {
                    await
                    ProductCategory2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ProductCategory3 = await ProductCategories.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductCategory3?.setOrganization)
                {
                    await
                    ProductCategory3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateProductWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setStore)
                {
                    await
                    Product0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setStore)
                {
                    await
                    Product1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setStore)
                {
                    await
                    Product2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setStore)
                {
                    await
                    Product3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateProductWithCategory() {
            
                const relatedCategory0 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setCategory)
                {
                    await
                    Product0.
                    setCategory(relatedCategory0);
                }
            
                const relatedCategory1 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setCategory)
                {
                    await
                    Product1.
                    setCategory(relatedCategory1);
                }
            
                const relatedCategory2 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setCategory)
                {
                    await
                    Product2.
                    setCategory(relatedCategory2);
                }
            
                const relatedCategory3 = await ProductCategories.findOne({
                    offset: Math.floor(Math.random() * (await ProductCategories.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setCategory)
                {
                    await
                    Product3.
                    setCategory(relatedCategory3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateProductWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setOrganization)
                {
                    await
                    Product0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setOrganization)
                {
                    await
                    Product1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setOrganization)
                {
                    await
                    Product2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setOrganization)
                {
                    await
                    Product3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCartWithCustomer() {
            
                const relatedCustomer0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Cart0 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Cart0?.setCustomer)
                {
                    await
                    Cart0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Cart1 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Cart1?.setCustomer)
                {
                    await
                    Cart1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Cart2 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Cart2?.setCustomer)
                {
                    await
                    Cart2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Cart3 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Cart3?.setCustomer)
                {
                    await
                    Cart3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
            
            async function associateCartWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Cart0 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Cart0?.setStore)
                {
                    await
                    Cart0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Cart1 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Cart1?.setStore)
                {
                    await
                    Cart1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Cart2 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Cart2?.setStore)
                {
                    await
                    Cart2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Cart3 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Cart3?.setStore)
                {
                    await
                    Cart3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateCartWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Cart0 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Cart0?.setOrganization)
                {
                    await
                    Cart0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Cart1 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Cart1?.setOrganization)
                {
                    await
                    Cart1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Cart2 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Cart2?.setOrganization)
                {
                    await
                    Cart2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Cart3 = await Carts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Cart3?.setOrganization)
                {
                    await
                    Cart3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateCartItemWithCart() {
            
                const relatedCart0 = await Carts.findOne({
                    offset: Math.floor(Math.random() * (await Carts.count())),
                });
                const CartItem0 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CartItem0?.setCart)
                {
                    await
                    CartItem0.
                    setCart(relatedCart0);
                }
            
                const relatedCart1 = await Carts.findOne({
                    offset: Math.floor(Math.random() * (await Carts.count())),
                });
                const CartItem1 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CartItem1?.setCart)
                {
                    await
                    CartItem1.
                    setCart(relatedCart1);
                }
            
                const relatedCart2 = await Carts.findOne({
                    offset: Math.floor(Math.random() * (await Carts.count())),
                });
                const CartItem2 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CartItem2?.setCart)
                {
                    await
                    CartItem2.
                    setCart(relatedCart2);
                }
            
                const relatedCart3 = await Carts.findOne({
                    offset: Math.floor(Math.random() * (await Carts.count())),
                });
                const CartItem3 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CartItem3?.setCart)
                {
                    await
                    CartItem3.
                    setCart(relatedCart3);
                }
            
        }
        
    
        
            
            async function associateCartItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CartItem0 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CartItem0?.setProduct)
                {
                    await
                    CartItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CartItem1 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CartItem1?.setProduct)
                {
                    await
                    CartItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CartItem2 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CartItem2?.setProduct)
                {
                    await
                    CartItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const CartItem3 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CartItem3?.setProduct)
                {
                    await
                    CartItem3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCartItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CartItem0 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CartItem0?.setOrganization)
                {
                    await
                    CartItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CartItem1 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CartItem1?.setOrganization)
                {
                    await
                    CartItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CartItem2 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CartItem2?.setOrganization)
                {
                    await
                    CartItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const CartItem3 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CartItem3?.setOrganization)
                {
                    await
                    CartItem3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

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

    
    
    
        
            
            async function associateOrderItemWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setOrder)
                {
                    await
                    OrderItem0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setOrder)
                {
                    await
                    OrderItem1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setOrder)
                {
                    await
                    OrderItem2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setOrder)
                {
                    await
                    OrderItem3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateOrderItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem0 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (OrderItem0?.setProduct)
                {
                    await
                    OrderItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem1 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (OrderItem1?.setProduct)
                {
                    await
                    OrderItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem2 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (OrderItem2?.setProduct)
                {
                    await
                    OrderItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const OrderItem3 = await OrderItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (OrderItem3?.setProduct)
                {
                    await
                    OrderItem3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function 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 associatePaymentWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrder)
                {
                    await
                    Payment0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrder)
                {
                    await
                    Payment1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrder)
                {
                    await
                    Payment2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setOrder)
                {
                    await
                    Payment3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePaymentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment0 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payment0?.setOrganization)
                {
                    await
                    Payment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment1 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payment1?.setOrganization)
                {
                    await
                    Payment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment2 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payment2?.setOrganization)
                {
                    await
                    Payment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payment3 = await Payments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payment3?.setOrganization)
                {
                    await
                    Payment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateDeliveryWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Delivery0 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Delivery0?.setOrder)
                {
                    await
                    Delivery0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Delivery1 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Delivery1?.setOrder)
                {
                    await
                    Delivery1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Delivery2 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Delivery2?.setOrder)
                {
                    await
                    Delivery2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Delivery3 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Delivery3?.setOrder)
                {
                    await
                    Delivery3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateDeliveryWithCourier() {
            
                const relatedCourier0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Delivery0 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Delivery0?.setCourier)
                {
                    await
                    Delivery0.
                    setCourier(relatedCourier0);
                }
            
                const relatedCourier1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Delivery1 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Delivery1?.setCourier)
                {
                    await
                    Delivery1.
                    setCourier(relatedCourier1);
                }
            
                const relatedCourier2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Delivery2 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Delivery2?.setCourier)
                {
                    await
                    Delivery2.
                    setCourier(relatedCourier2);
                }
            
                const relatedCourier3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Delivery3 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Delivery3?.setCourier)
                {
                    await
                    Delivery3.
                    setCourier(relatedCourier3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateDeliveryWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Delivery0 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Delivery0?.setOrganization)
                {
                    await
                    Delivery0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Delivery1 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Delivery1?.setOrganization)
                {
                    await
                    Delivery1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Delivery2 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Delivery2?.setOrganization)
                {
                    await
                    Delivery2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Delivery3 = await Deliveries.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Delivery3?.setOrganization)
                {
                    await
                    Delivery3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
            
            async function associatePayoutWithBeneficiary_user() {
            
                const relatedBeneficiary_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Payout0 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payout0?.setBeneficiary_user)
                {
                    await
                    Payout0.
                    setBeneficiary_user(relatedBeneficiary_user0);
                }
            
                const relatedBeneficiary_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Payout1 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payout1?.setBeneficiary_user)
                {
                    await
                    Payout1.
                    setBeneficiary_user(relatedBeneficiary_user1);
                }
            
                const relatedBeneficiary_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Payout2 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payout2?.setBeneficiary_user)
                {
                    await
                    Payout2.
                    setBeneficiary_user(relatedBeneficiary_user2);
                }
            
                const relatedBeneficiary_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Payout3 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payout3?.setBeneficiary_user)
                {
                    await
                    Payout3.
                    setBeneficiary_user(relatedBeneficiary_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePayoutWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payout0 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Payout0?.setOrganization)
                {
                    await
                    Payout0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payout1 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Payout1?.setOrganization)
                {
                    await
                    Payout1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payout2 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Payout2?.setOrganization)
                {
                    await
                    Payout2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Payout3 = await Payouts.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Payout3?.setOrganization)
                {
                    await
                    Payout3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
            
            async function associateCommissionWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Commission0 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Commission0?.setStore)
                {
                    await
                    Commission0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Commission1 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Commission1?.setStore)
                {
                    await
                    Commission1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Commission2 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Commission2?.setStore)
                {
                    await
                    Commission2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Commission3 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Commission3?.setStore)
                {
                    await
                    Commission3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCommissionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Commission0 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Commission0?.setOrganization)
                {
                    await
                    Commission0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Commission1 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Commission1?.setOrganization)
                {
                    await
                    Commission1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Commission2 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Commission2?.setOrganization)
                {
                    await
                    Commission2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Commission3 = await Commissions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Commission3?.setOrganization)
                {
                    await
                    Commission3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateReviewWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Review0 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Review0?.setOrder)
                {
                    await
                    Review0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Review1 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Review1?.setOrder)
                {
                    await
                    Review1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Review2 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Review2?.setOrder)
                {
                    await
                    Review2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const Review3 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Review3?.setOrder)
                {
                    await
                    Review3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
            
            async function associateReviewWithAuthor() {
            
                const relatedAuthor0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review0 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Review0?.setAuthor)
                {
                    await
                    Review0.
                    setAuthor(relatedAuthor0);
                }
            
                const relatedAuthor1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review1 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Review1?.setAuthor)
                {
                    await
                    Review1.
                    setAuthor(relatedAuthor1);
                }
            
                const relatedAuthor2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review2 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Review2?.setAuthor)
                {
                    await
                    Review2.
                    setAuthor(relatedAuthor2);
                }
            
                const relatedAuthor3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review3 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Review3?.setAuthor)
                {
                    await
                    Review3.
                    setAuthor(relatedAuthor3);
                }
            
        }
        
    
        
    
        
            
            async function associateReviewWithStore() {
            
                const relatedStore0 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Review0 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Review0?.setStore)
                {
                    await
                    Review0.
                    setStore(relatedStore0);
                }
            
                const relatedStore1 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Review1 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Review1?.setStore)
                {
                    await
                    Review1.
                    setStore(relatedStore1);
                }
            
                const relatedStore2 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Review2 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Review2?.setStore)
                {
                    await
                    Review2.
                    setStore(relatedStore2);
                }
            
                const relatedStore3 = await Stores.findOne({
                    offset: Math.floor(Math.random() * (await Stores.count())),
                });
                const Review3 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Review3?.setStore)
                {
                    await
                    Review3.
                    setStore(relatedStore3);
                }
            
        }
        
    
        
            
            async function associateReviewWithCourier() {
            
                const relatedCourier0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review0 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Review0?.setCourier)
                {
                    await
                    Review0.
                    setCourier(relatedCourier0);
                }
            
                const relatedCourier1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review1 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Review1?.setCourier)
                {
                    await
                    Review1.
                    setCourier(relatedCourier1);
                }
            
                const relatedCourier2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review2 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Review2?.setCourier)
                {
                    await
                    Review2.
                    setCourier(relatedCourier2);
                }
            
                const relatedCourier3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Review3 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Review3?.setCourier)
                {
                    await
                    Review3.
                    setCourier(relatedCourier3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateReviewWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Review0 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Review0?.setOrganization)
                {
                    await
                    Review0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Review1 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Review1?.setOrganization)
                {
                    await
                    Review1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Review2 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Review2?.setOrganization)
                {
                    await
                    Review2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Review3 = await Reviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Review3?.setOrganization)
                {
                    await
                    Review3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
            
            async function associateSupportTicketWithRequester() {
            
                const relatedRequester0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setRequester)
                {
                    await
                    SupportTicket0.
                    setRequester(relatedRequester0);
                }
            
                const relatedRequester1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setRequester)
                {
                    await
                    SupportTicket1.
                    setRequester(relatedRequester1);
                }
            
                const relatedRequester2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setRequester)
                {
                    await
                    SupportTicket2.
                    setRequester(relatedRequester2);
                }
            
                const relatedRequester3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setRequester)
                {
                    await
                    SupportTicket3.
                    setRequester(relatedRequester3);
                }
            
        }
        
    
        
            
            async function associateSupportTicketWithOrder() {
            
                const relatedOrder0 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setOrder)
                {
                    await
                    SupportTicket0.
                    setOrder(relatedOrder0);
                }
            
                const relatedOrder1 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setOrder)
                {
                    await
                    SupportTicket1.
                    setOrder(relatedOrder1);
                }
            
                const relatedOrder2 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setOrder)
                {
                    await
                    SupportTicket2.
                    setOrder(relatedOrder2);
                }
            
                const relatedOrder3 = await Orders.findOne({
                    offset: Math.floor(Math.random() * (await Orders.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setOrder)
                {
                    await
                    SupportTicket3.
                    setOrder(relatedOrder3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateSupportTicketWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setOrganization)
                {
                    await
                    SupportTicket0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setOrganization)
                {
                    await
                    SupportTicket1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setOrganization)
                {
                    await
                    SupportTicket2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setOrganization)
                {
                    await
                    SupportTicket3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateNotificationWithRecipient() {
            
                const relatedRecipient0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setRecipient)
                {
                    await
                    Notification0.
                    setRecipient(relatedRecipient0);
                }
            
                const relatedRecipient1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setRecipient)
                {
                    await
                    Notification1.
                    setRecipient(relatedRecipient1);
                }
            
                const relatedRecipient2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setRecipient)
                {
                    await
                    Notification2.
                    setRecipient(relatedRecipient2);
                }
            
                const relatedRecipient3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Notification3 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Notification3?.setRecipient)
                {
                    await
                    Notification3.
                    setRecipient(relatedRecipient3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateNotificationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification0 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Notification0?.setOrganization)
                {
                    await
                    Notification0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification1 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Notification1?.setOrganization)
                {
                    await
                    Notification1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification2 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Notification2?.setOrganization)
                {
                    await
                    Notification2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Notification3 = await Notifications.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Notification3?.setOrganization)
                {
                    await
                    Notification3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
    
        
            
            async function associateLanguageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Language0 = await Languages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Language0?.setOrganization)
                {
                    await
                    Language0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Language1 = await Languages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Language1?.setOrganization)
                {
                    await
                    Language1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Language2 = await Languages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Language2?.setOrganization)
                {
                    await
                    Language2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Language3 = await Languages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Language3?.setOrganization)
                {
                    await
                    Language3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
    
        
            
            async function associateTranslationKeyWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TranslationKey0 = await TranslationKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (TranslationKey0?.setOrganization)
                {
                    await
                    TranslationKey0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TranslationKey1 = await TranslationKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (TranslationKey1?.setOrganization)
                {
                    await
                    TranslationKey1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TranslationKey2 = await TranslationKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (TranslationKey2?.setOrganization)
                {
                    await
                    TranslationKey2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const TranslationKey3 = await TranslationKeys.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (TranslationKey3?.setOrganization)
                {
                    await
                    TranslationKey3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateTranslationWithTranslation_key() {
            
                const relatedTranslation_key0 = await TranslationKeys.findOne({
                    offset: Math.floor(Math.random() * (await TranslationKeys.count())),
                });
                const Translation0 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Translation0?.setTranslation_key)
                {
                    await
                    Translation0.
                    setTranslation_key(relatedTranslation_key0);
                }
            
                const relatedTranslation_key1 = await TranslationKeys.findOne({
                    offset: Math.floor(Math.random() * (await TranslationKeys.count())),
                });
                const Translation1 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Translation1?.setTranslation_key)
                {
                    await
                    Translation1.
                    setTranslation_key(relatedTranslation_key1);
                }
            
                const relatedTranslation_key2 = await TranslationKeys.findOne({
                    offset: Math.floor(Math.random() * (await TranslationKeys.count())),
                });
                const Translation2 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Translation2?.setTranslation_key)
                {
                    await
                    Translation2.
                    setTranslation_key(relatedTranslation_key2);
                }
            
                const relatedTranslation_key3 = await TranslationKeys.findOne({
                    offset: Math.floor(Math.random() * (await TranslationKeys.count())),
                });
                const Translation3 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Translation3?.setTranslation_key)
                {
                    await
                    Translation3.
                    setTranslation_key(relatedTranslation_key3);
                }
            
        }
        
    
        
            
            async function associateTranslationWithLanguage() {
            
                const relatedLanguage0 = await Languages.findOne({
                    offset: Math.floor(Math.random() * (await Languages.count())),
                });
                const Translation0 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Translation0?.setLanguage)
                {
                    await
                    Translation0.
                    setLanguage(relatedLanguage0);
                }
            
                const relatedLanguage1 = await Languages.findOne({
                    offset: Math.floor(Math.random() * (await Languages.count())),
                });
                const Translation1 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Translation1?.setLanguage)
                {
                    await
                    Translation1.
                    setLanguage(relatedLanguage1);
                }
            
                const relatedLanguage2 = await Languages.findOne({
                    offset: Math.floor(Math.random() * (await Languages.count())),
                });
                const Translation2 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Translation2?.setLanguage)
                {
                    await
                    Translation2.
                    setLanguage(relatedLanguage2);
                }
            
                const relatedLanguage3 = await Languages.findOne({
                    offset: Math.floor(Math.random() * (await Languages.count())),
                });
                const Translation3 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Translation3?.setLanguage)
                {
                    await
                    Translation3.
                    setLanguage(relatedLanguage3);
                }
            
        }
        
    
        
    
        
    
        
            
            async function associateTranslationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Translation0 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Translation0?.setOrganization)
                {
                    await
                    Translation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Translation1 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Translation1?.setOrganization)
                {
                    await
                    Translation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Translation2 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Translation2?.setOrganization)
                {
                    await
                    Translation2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Translation3 = await Translations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Translation3?.setOrganization)
                {
                    await
                    Translation3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await Addresses.bulkCreate(AddressesData);
                
            
            
                
                await MerchantProfiles.bulkCreate(MerchantProfilesData);
                
            
            
                
                await Stores.bulkCreate(StoresData);
                
            
            
                
                await CourierProfiles.bulkCreate(CourierProfilesData);
                
            
            
                
                await ProductCategories.bulkCreate(ProductCategoriesData);
                
            
            
                
                await Products.bulkCreate(ProductsData);
                
            
            
                
                await Carts.bulkCreate(CartsData);
                
            
            
                
                await CartItems.bulkCreate(CartItemsData);
                
            
            
                
                await Orders.bulkCreate(OrdersData);
                
            
            
                
                await OrderItems.bulkCreate(OrderItemsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await Deliveries.bulkCreate(DeliveriesData);
                
            
            
                
                await Payouts.bulkCreate(PayoutsData);
                
            
            
                
                await Commissions.bulkCreate(CommissionsData);
                
            
            
                
                await Reviews.bulkCreate(ReviewsData);
                
            
            
                
                await SupportTickets.bulkCreate(SupportTicketsData);
                
            
            
                
                await Notifications.bulkCreate(NotificationsData);
                
            
            
                
                await Languages.bulkCreate(LanguagesData);
                
            
            
                
                await TranslationKeys.bulkCreate(TranslationKeysData);
                
            
            
                
                await Translations.bulkCreate(TranslationsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                        
                        await associateAddressWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAddressWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMerchantProfileWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMerchantProfileWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateStoreWithMerchant_profile(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStoreWithAddres(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateStoreWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCourierProfileWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCourierProfileWithCurrent_addres(),
                    
                
                    
                        
                        await associateCourierProfileWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductCategoryWithParent_category(),
                    
                
                    
                
                    
                        
                        await associateProductCategoryWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateProductWithStore(),
                    
                
                    
                        
                        await associateProductWithCategory(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCartWithCustomer(),
                    
                
                    
                        
                        await associateCartWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCartWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateCartItemWithCart(),
                    
                
                    
                        
                        await associateCartItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCartItemWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associateOrderWithCustomer(),
                    
                
                    
                        
                        await associateOrderWithStore(),
                    
                
                    
                        
                        await associateOrderWithDelivery_addres(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateOrderItemWithOrder(),
                    
                
                    
                        
                        await associateOrderItemWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateOrderItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePaymentWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePaymentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateDeliveryWithOrder(),
                    
                
                    
                        
                        await associateDeliveryWithCourier(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateDeliveryWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associatePayoutWithBeneficiary_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePayoutWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associateCommissionWithStore(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCommissionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateReviewWithOrder(),
                    
                
                    
                        
                        await associateReviewWithAuthor(),
                    
                
                    
                
                    
                        
                        await associateReviewWithStore(),
                    
                
                    
                        
                        await associateReviewWithCourier(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateReviewWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associateSupportTicketWithRequester(),
                    
                
                    
                        
                        await associateSupportTicketWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateSupportTicketWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateNotificationWithRecipient(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateNotificationWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateLanguageWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateTranslationKeyWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateTranslationWithTranslation_key(),
                    
                
                    
                        
                        await associateTranslationWithLanguage(),
                    
                
                    
                
                    
                
                    
                        
                        await associateTranslationWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('addresses', null, {});
            
            
            await queryInterface.bulkDelete('merchant_profiles', null, {});
            
            
            await queryInterface.bulkDelete('stores', null, {});
            
            
            await queryInterface.bulkDelete('courier_profiles', null, {});
            
            
            await queryInterface.bulkDelete('product_categories', null, {});
            
            
            await queryInterface.bulkDelete('products', null, {});
            
            
            await queryInterface.bulkDelete('carts', null, {});
            
            
            await queryInterface.bulkDelete('cart_items', null, {});
            
            
            await queryInterface.bulkDelete('orders', null, {});
            
            
            await queryInterface.bulkDelete('order_items', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('deliveries', null, {});
            
            
            await queryInterface.bulkDelete('payouts', null, {});
            
            
            await queryInterface.bulkDelete('commissions', null, {});
            
            
            await queryInterface.bulkDelete('reviews', null, {});
            
            
            await queryInterface.bulkDelete('support_tickets', null, {});
            
            
            await queryInterface.bulkDelete('notifications', null, {});
            
            
            await queryInterface.bulkDelete('languages', null, {});
            
            
            await queryInterface.bulkDelete('translation_keys', null, {});
            
            
            await queryInterface.bulkDelete('translations', null, {});
            
        
    },
};