





















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






const StoreSettings = db.store_settings;

const Categories = db.categories;

const Brands = db.brands;

const Products = db.products;

const ProductVariants = db.product_variants;

const PromoCodes = db.promo_codes;

const Carts = db.carts;

const CartItems = db.cart_items;

const Addresses = db.addresses;

const ShippingMethods = db.shipping_methods;

const Orders = db.orders;

const OrderItems = db.order_items;

const Payments = db.payments;

const PaymentEvents = db.payment_events;

const Refunds = db.refunds;

const InventoryMovements = db.inventory_movements;

const ProductReviews = db.product_reviews;

const Wishlists = db.wishlists;

const WishlistItems = db.wishlist_items;

const CmsPages = db.cms_pages;

const HomepageSections = db.homepage_sections;

const SupportTickets = db.support_tickets;







const StoreSettingsData = [
    
    {
    
        
        
            
                "store_name": "Ostore Clone ID",
            
        
    
        
        
            
                "store_tagline": "Belanja cepat, aman, dan nyaman",
            
        
    
        
        
            
                "support_email": "support@ostoreclone.id",
            
        
    
        
        
            
                "support_phone": "0215550101",
            
        
    
        
        
            
                "whatsapp_number": "628111234567",
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "timezone": "Asia/Jakarta",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color_hex": "#0EA5E9",
            
        
    
        
        
            
                "secondary_color_hex": "#111827",
            
        
    
        
        
            
                "maintenance_mode": false,
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Ostore Clone ID - Demo",
            
        
    
        
        
            
                "store_tagline": "Demo catalog untuk uji coba",
            
        
    
        
        
            
                "support_email": "demo-support@ostoreclone.id",
            
        
    
        
        
            
                "support_phone": "0215550102",
            
        
    
        
        
            
                "whatsapp_number": "628111234568",
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "timezone": "Asia/Jakarta",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color_hex": "#22C55E",
            
        
    
        
        
            
                "secondary_color_hex": "#0F172A",
            
        
    
        
        
            
                "maintenance_mode": false,
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Ostore Clone ID - Outlet",
            
        
    
        
        
            
                "store_tagline": "Diskon pilihan setiap minggu",
            
        
    
        
        
            
                "support_email": "outlet@ostoreclone.id",
            
        
    
        
        
            
                "support_phone": "0215550103",
            
        
    
        
        
            
                "whatsapp_number": "628111234569",
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "timezone": "Asia/Jakarta",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color_hex": "#F97316",
            
        
    
        
        
            
                "secondary_color_hex": "#111827",
            
        
    
        
        
            
                "maintenance_mode": true,
            
        
    
    },
    
    {
    
        
        
            
                "store_name": "Ostore Clone ID - Corporate",
            
        
    
        
        
            
                "store_tagline": "Solusi belanja untuk tim Anda",
            
        
    
        
        
            
                "support_email": "corporate@ostoreclone.id",
            
        
    
        
        
            
                "support_phone": "0215550104",
            
        
    
        
        
            
                "whatsapp_number": "628111234570",
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "timezone": "Asia/Jakarta",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "primary_color_hex": "#6366F1",
            
        
    
        
        
            
                "secondary_color_hex": "#111827",
            
        
    
        
        
            
                "maintenance_mode": true,
            
        
    
    },
    
];



const CategoriesData = [
    
    {
    
        
        
            
                "name": "Pulsa dan Data",
            
        
    
        
        
            
                "slug": "pulsa-dan-data",
            
        
    
        
        
            
                "description": "Isi ulang pulsa dan paket data berbagai operator",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Voucher Game",
            
        
    
        
        
            
                "slug": "voucher-game",
            
        
    
        
        
            
                "description": "Top up game populer dan voucher digital",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Streaming dan Hiburan",
            
        
    
        
        
            
                "slug": "streaming-dan-hiburan",
            
        
    
        
        
            
                "description": "Langganan streaming, musik, dan hiburan",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "name": "Aksesori Gadget",
            
        
    
        
        
            
                "slug": "aksesori-gadget",
            
        
    
        
        
            
                "description": "Aksesori pilihan untuk smartphone dan perangkat Anda",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "sort_order": 4,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const BrandsData = [
    
    {
    
        
        
            
                "name": "Telkomsel",
            
        
    
        
        
            
                "slug": "telkomsel",
            
        
    
        
        
            
                "description": "Produk digital dan layanan operator Telkomsel",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "Indosat IM3",
            
        
    
        
        
            
                "slug": "indosat-im3",
            
        
    
        
        
            
                "description": "Paket data dan pulsa IM3",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "XL Axiata",
            
        
    
        
        
            
                "slug": "xl-axiata",
            
        
    
        
        
            
                "description": "Layanan isi ulang dan paket XL",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "Garena",
            
        
    
        
        
            
                "slug": "garena",
            
        
    
        
        
            
                "description": "Voucher dan top up untuk game Garena",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const ProductsData = [
    
    {
    
        
        
            
                "name": "Telkomsel Paket Data 10GB 30 Hari",
            
        
    
        
        
            
                "slug": "telkomsel-paket-data-10gb-30-hari",
            
        
    
        
        
            
                "sku": "TS-DATA-10GB-30D",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "short_description": "Paket data 10GB masa aktif 30 hari",
            
        
    
        
        
            
                "description": "Paket data Telkomsel 10GB dengan masa aktif 30 hari. Cocok untuk kebutuhan internet harian.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 65000,
            
        
    
        
        
            
                "compare_at_price": 75000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "track_inventory": true,
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "weight_kg": 0,
            
        
    
        
        
            
                "dimensions_cm": "0x0x0",
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                "published_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "name": "IM3 Pulsa 50K",
            
        
    
        
        
            
                "slug": "im3-pulsa-50k",
            
        
    
        
        
            
                "sku": "IM3-PULSA-50K",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "short_description": "Isi ulang pulsa IM3 nominal 50 ribu",
            
        
    
        
        
            
                "description": "Pulsa IM3 nominal 50 ribu. Proses cepat dan otomatis.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 52000,
            
        
    
        
        
            
                "compare_at_price": 55000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "track_inventory": true,
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "weight_kg": 0,
            
        
    
        
        
            
                "dimensions_cm": "0x0x0",
            
        
    
        
        
            
                "is_featured": false,
            
        
    
        
        
            
                "published_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "name": "XL Paket Data 15GB 30 Hari",
            
        
    
        
        
            
                "slug": "xl-paket-data-15gb-30-hari",
            
        
    
        
        
            
                "sku": "XL-DATA-15GB-30D",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "short_description": "Paket data 15GB masa aktif 30 hari",
            
        
    
        
        
            
                "description": "Paket data XL 15GB dengan masa aktif 30 hari. Aktivasi mengikuti ketentuan operator.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 79000,
            
        
    
        
        
            
                "compare_at_price": 89000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "track_inventory": true,
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "weight_kg": 0,
            
        
    
        
        
            
                "dimensions_cm": "0x0x0",
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                "published_at": new Date('2026-02-02T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "name": "Garena Shells 330",
            
        
    
        
        
            
                "slug": "garena-shells-330",
            
        
    
        
        
            
                "sku": "GARENA-SHELLS-330",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "short_description": "Top up Garena Shells 330",
            
        
    
        
        
            
                "description": "Voucher Garena Shells 330 untuk berbagai game Garena. Pengiriman kode instan.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "price": 50000,
            
        
    
        
        
            
                "compare_at_price": 52000,
            
        
    
        
        
            
                "stock_quantity": 500,
            
        
    
        
        
            
                "track_inventory": true,
            
        
    
        
        
            
                "status": "archived",
            
        
    
        
        
            
                "weight_kg": 0,
            
        
    
        
        
            
                "dimensions_cm": "0x0x0",
            
        
    
        
        
            
                "is_featured": true,
            
        
    
        
        
            
                "published_at": new Date('2026-02-03T00:00:00Z'),
            
        
    
    },
    
];



const ProductVariantsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_name": "Nominal 10GB",
            
        
    
        
        
            
                "variant_sku": "TS-DATA-10GB-30D-V1",
            
        
    
        
        
            
                "price": 65000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "option_summary": "Kuota 10GB",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_name": "Nominal 50K",
            
        
    
        
        
            
                "variant_sku": "IM3-PULSA-50K-V1",
            
        
    
        
        
            
                "price": 52000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "option_summary": "Pulsa 50K",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_name": "Nominal 15GB",
            
        
    
        
        
            
                "variant_sku": "XL-DATA-15GB-30D-V1",
            
        
    
        
        
            
                "price": 79000,
            
        
    
        
        
            
                "stock_quantity": 9999,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "option_summary": "Kuota 15GB",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "variant_name": "Kode Digital 330",
            
        
    
        
        
            
                "variant_sku": "GARENA-SHELLS-330-V1",
            
        
    
        
        
            
                "price": 50000,
            
        
    
        
        
            
                "stock_quantity": 500,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "option_summary": "Kode digital",
            
        
    
    },
    
];



const PromoCodesData = [
    
    {
    
        
        
            
                "code": "HEMAT10",
            
        
    
        
        
            
                "name": "Diskon 10 Persen",
            
        
    
        
        
            
                "description": "Diskon 10 persen untuk pembelian minimal 100 ribu",
            
        
    
        
        
            
                "discount_type": "percent",
            
        
    
        
        
            
                "discount_value": 10,
            
        
    
        
        
            
                "minimum_order_amount": 100000,
            
        
    
        
        
            
                "usage_limit_total": 500,
            
        
    
        
        
            
                "usage_limit_per_user": 2,
            
        
    
        
        
            
                "starts_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-03-01T00:00:00Z'),
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "code": "ONGKIR15",
            
        
    
        
        
            
                "name": "Potongan Ongkir 15K",
            
        
    
        
        
            
                "description": "Potongan 15 ribu untuk biaya pengiriman",
            
        
    
        
        
            
                "discount_type": "percent",
            
        
    
        
        
            
                "discount_value": 15000,
            
        
    
        
        
            
                "minimum_order_amount": 150000,
            
        
    
        
        
            
                "usage_limit_total": 300,
            
        
    
        
        
            
                "usage_limit_per_user": 1,
            
        
    
        
        
            
                "starts_at": new Date('2026-02-10T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-02-28T23:59:59Z'),
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "code": "WELCOME25",
            
        
    
        
        
            
                "name": "Voucher Member Baru",
            
        
    
        
        
            
                "description": "Potongan 25 ribu untuk pembelian pertama minimal 200 ribu",
            
        
    
        
        
            
                "discount_type": "percent",
            
        
    
        
        
            
                "discount_value": 25000,
            
        
    
        
        
            
                "minimum_order_amount": 200000,
            
        
    
        
        
            
                "usage_limit_total": 1000,
            
        
    
        
        
            
                "usage_limit_per_user": 1,
            
        
    
        
        
            
                "starts_at": new Date('2026-01-01T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-12-31T23:59:59Z'),
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "code": "FLASH5",
            
        
    
        
        
            
                "name": "Flash Sale 5 Persen",
            
        
    
        
        
            
                "description": "Diskon 5 persen untuk kategori tertentu pada periode promo",
            
        
    
        
        
            
                "discount_type": "percent",
            
        
    
        
        
            
                "discount_value": 5,
            
        
    
        
        
            
                "minimum_order_amount": 50000,
            
        
    
        
        
            
                "usage_limit_total": 800,
            
        
    
        
        
            
                "usage_limit_per_user": 3,
            
        
    
        
        
            
                "starts_at": new Date('2026-02-15T00:00:00Z'),
            
        
    
        
        
            
                "ends_at": new Date('2026-02-20T23:59:59Z'),
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const CartsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_token": "sess_raka_9f2a1",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "expires_at": new Date('2026-02-20T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_token": "sess_siti_2c8b7",
            
        
    
        
        
            
                "status": "abandoned",
            
        
    
        
        
            
                "expires_at": new Date('2026-02-20T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_token": "sess_raka_old_1a3c",
            
        
    
        
        
            
                "status": "converted",
            
        
    
        
        
            
                "expires_at": new Date('2026-02-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_token": "sess_siti_old_7d1e",
            
        
    
        
        
            
                "status": "active",
            
        
    
        
        
            
                "expires_at": new Date('2026-01-20T00:00:00Z'),
            
        
    
    },
    
];



const CartItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 65000,
            
        
    
        
        
            
                "note": "Kirim secepatnya",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 102000,
            
        
    
        
        
            
                "note": "Untuk hadiah",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 2,
            
        
    
        
        
            
                "unit_price": 50000,
            
        
    
        
        
            
                "note": "Kode harus bisa dipakai Indonesia",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "unit_price": 79000,
            
        
    
        
        
            
                "note": "Nomor XL aktif",
            
        
    
    },
    
];



const AddressesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Rumah",
            
        
    
        
        
            
                "recipient_name": "Raka Pratama",
            
        
    
        
        
            
                "recipient_phone": "081234567801",
            
        
    
        
        
            
                "province": "DKI Jakarta",
            
        
    
        
        
            
                "city": "Jakarta Selatan",
            
        
    
        
        
            
                "district": "Kebayoran Baru",
            
        
    
        
        
            
                "postal_code": "12110",
            
        
    
        
        
            
                "street_address": "Jl. Senayan No 12",
            
        
    
        
        
            
                "notes": "Satpam di lobi",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Kantor",
            
        
    
        
        
            
                "recipient_name": "Raka Pratama",
            
        
    
        
        
            
                "recipient_phone": "081234567801",
            
        
    
        
        
            
                "province": "DKI Jakarta",
            
        
    
        
        
            
                "city": "Jakarta Pusat",
            
        
    
        
        
            
                "district": "Menteng",
            
        
    
        
        
            
                "postal_code": "10310",
            
        
    
        
        
            
                "street_address": "Jl. MH Thamrin No 1",
            
        
    
        
        
            
                "notes": "Titip resepsionis",
            
        
    
        
        
            
                "is_default": false,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Rumah",
            
        
    
        
        
            
                "recipient_name": "Siti Aulia",
            
        
    
        
        
            
                "recipient_phone": "081234567802",
            
        
    
        
        
            
                "province": "Jawa Barat",
            
        
    
        
        
            
                "city": "Bandung",
            
        
    
        
        
            
                "district": "Coblong",
            
        
    
        
        
            
                "postal_code": "40132",
            
        
    
        
        
            
                "street_address": "Jl. Dago No 45",
            
        
    
        
        
            
                "notes": "Rumah pagar hitam",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "label": "Apartemen",
            
        
    
        
        
            
                "recipient_name": "Bima Nugroho",
            
        
    
        
        
            
                "recipient_phone": "081234567803",
            
        
    
        
        
            
                "province": "Jawa Timur",
            
        
    
        
        
            
                "city": "Surabaya",
            
        
    
        
        
            
                "district": "Tegalsari",
            
        
    
        
        
            
                "postal_code": "60262",
            
        
    
        
        
            
                "street_address": "Jl. Basuki Rahmat No 88",
            
        
    
        
        
            
                "notes": "Lobby tower A",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
];



const ShippingMethodsData = [
    
    {
    
        
        
            
                "name": "JNE REG",
            
        
    
        
        
            
                "carrier_name": "JNE",
            
        
    
        
        
            
                "service_level": "Regular",
            
        
    
        
        
            
                "base_fee": 12000,
            
        
    
        
        
            
                "fee_per_kg": 8000,
            
        
    
        
        
            
                "estimated_days_min": 2,
            
        
    
        
        
            
                "estimated_days_max": 4,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "JNT REG",
            
        
    
        
        
            
                "carrier_name": "JNT",
            
        
    
        
        
            
                "service_level": "Regular",
            
        
    
        
        
            
                "base_fee": 11000,
            
        
    
        
        
            
                "fee_per_kg": 7500,
            
        
    
        
        
            
                "estimated_days_min": 2,
            
        
    
        
        
            
                "estimated_days_max": 4,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "SiCepat BEST",
            
        
    
        
        
            
                "carrier_name": "SiCepat",
            
        
    
        
        
            
                "service_level": "Best",
            
        
    
        
        
            
                "base_fee": 16000,
            
        
    
        
        
            
                "fee_per_kg": 9000,
            
        
    
        
        
            
                "estimated_days_min": 1,
            
        
    
        
        
            
                "estimated_days_max": 2,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
    {
    
        
        
            
                "name": "AnterAja Same Day",
            
        
    
        
        
            
                "carrier_name": "AnterAja",
            
        
    
        
        
            
                "service_level": "Same Day",
            
        
    
        
        
            
                "base_fee": 25000,
            
        
    
        
        
            
                "fee_per_kg": 10000,
            
        
    
        
        
            
                "estimated_days_min": 0,
            
        
    
        
        
            
                "estimated_days_max": 1,
            
        
    
        
        
            
                "is_active": true,
            
        
    
    },
    
];



const OrdersData = [
    
    {
    
        
        
            
                "order_number": "ORD-2026-0001",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "cancelled",
            
        
    
        
        
            
                "payment_status": "expired",
            
        
    
        
        
            
                "fulfillment_status": "returned",
            
        
    
        
        
            
                "subtotal_amount": 167000,
            
        
    
        
        
            
                "discount_amount": 0,
            
        
    
        
        
            
                "shipping_amount": 12000,
            
        
    
        
        
            
                "tax_amount": 0,
            
        
    
        
        
            
                "total_amount": 179000,
            
        
    
        
        
            
                "customer_note": "Mohon diproses hari ini",
            
        
    
        
        
            
                "admin_note": "Verifikasi pembayaran DANA",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-16T08:10:00Z'),
            
        
    
        
        
            
                "paid_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-0002",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "shipped",
            
        
    
        
        
            
                "payment_status": "unpaid",
            
        
    
        
        
            
                "fulfillment_status": "packed",
            
        
    
        
        
            
                "subtotal_amount": 100000,
            
        
    
        
        
            
                "discount_amount": 0,
            
        
    
        
        
            
                "shipping_amount": 16000,
            
        
    
        
        
            
                "tax_amount": 0,
            
        
    
        
        
            
                "total_amount": 116000,
            
        
    
        
        
            
                "customer_note": "Tolong packing rapi",
            
        
    
        
        
            
                "admin_note": "Siap kirim",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-15T10:20:00Z'),
            
        
    
        
        
            
                "paid_at": new Date('2026-02-15T10:22:30Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-0003",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "shipped",
            
        
    
        
        
            
                "payment_status": "refunded",
            
        
    
        
        
            
                "fulfillment_status": "delivered",
            
        
    
        
        
            
                "subtotal_amount": 79000,
            
        
    
        
        
            
                "discount_amount": 0,
            
        
    
        
        
            
                "shipping_amount": 11000,
            
        
    
        
        
            
                "tax_amount": 0,
            
        
    
        
        
            
                "total_amount": 90000,
            
        
    
        
        
            
                "customer_note": "Nomor harus aktif",
            
        
    
        
        
            
                "admin_note": "Resi sudah dibuat",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-14T06:45:00Z'),
            
        
    
        
        
            
                "paid_at": new Date('2026-02-14T06:46:10Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                "order_number": "ORD-2026-0004",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "order_status": "pending",
            
        
    
        
        
            
                "payment_status": "pending",
            
        
    
        
        
            
                "fulfillment_status": "packed",
            
        
    
        
        
            
                "subtotal_amount": 52000,
            
        
    
        
        
            
                "discount_amount": 0,
            
        
    
        
        
            
                "shipping_amount": 13000,
            
        
    
        
        
            
                "tax_amount": 0,
            
        
    
        
        
            
                "total_amount": 65000,
            
        
    
        
        
            
                "customer_note": "Batal jika tidak bisa hari ini",
            
        
    
        
        
            
                "admin_note": "Dibatalkan oleh pelanggan",
            
        
    
        
        
            
                "placed_at": new Date('2026-02-10T02:05:00Z'),
            
        
    
        
        
            
                "paid_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "cancelled_at": new Date('2026-02-10T03:00:00Z'),
            
        
    
    },
    
];



const OrderItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Telkomsel Paket Data 10GB 30 Hari",
            
        
    
        
        
            
                "sku_snapshot": "TS-DATA-10GB-30D",
            
        
    
        
        
            
                "unit_price": 65000,
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "line_total": 65000,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Google Play Gift Card 100K",
            
        
    
        
        
            
                "sku_snapshot": "GPLAY-GC-100K",
            
        
    
        
        
            
                "unit_price": 102000,
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "line_total": 102000,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "Garena Shells 330",
            
        
    
        
        
            
                "sku_snapshot": "GARENA-SHELLS-330",
            
        
    
        
        
            
                "unit_price": 50000,
            
        
    
        
        
            
                "quantity": 2,
            
        
    
        
        
            
                "line_total": 100000,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "product_name_snapshot": "XL Paket Data 15GB 30 Hari",
            
        
    
        
        
            
                "sku_snapshot": "XL-DATA-15GB-30D",
            
        
    
        
        
            
                "unit_price": 79000,
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "line_total": 79000,
            
        
    
    },
    
];



const PaymentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "dana_snap",
            
        
    
        
        
            
                "provider_reference": "DANA-REF-20260216-0001",
            
        
    
        
        
            
                "checkout_url": "https://pay.dana.id/checkout/DANA-REF-20260216-0001",
            
        
    
        
        
            
                "status": "paid",
            
        
    
        
        
            
                "amount": 179000,
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "initiated_at": new Date('2026-02-16T08:12:00Z'),
            
        
    
        
        
            
                "confirmed_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "dana_snap",
            
        
    
        
        
            
                "provider_reference": "DANA-REF-20260215-0002",
            
        
    
        
        
            
                "checkout_url": "https://pay.dana.id/checkout/DANA-REF-20260215-0002",
            
        
    
        
        
            
                "status": "failed",
            
        
    
        
        
            
                "amount": 116000,
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "initiated_at": new Date('2026-02-15T10:21:00Z'),
            
        
    
        
        
            
                "confirmed_at": new Date('2026-02-15T10:22:30Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "dana_snap",
            
        
    
        
        
            
                "provider_reference": "DANA-REF-20260214-0003",
            
        
    
        
        
            
                "checkout_url": "https://pay.dana.id/checkout/DANA-REF-20260214-0003",
            
        
    
        
        
            
                "status": "refunded",
            
        
    
        
        
            
                "amount": 90000,
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "initiated_at": new Date('2026-02-14T06:45:30Z'),
            
        
    
        
        
            
                "confirmed_at": new Date('2026-02-14T06:46:10Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "dana_snap",
            
        
    
        
        
            
                "provider_reference": "DANA-REF-20260210-0004",
            
        
    
        
        
            
                "checkout_url": "https://pay.dana.id/checkout/DANA-REF-20260210-0004",
            
        
    
        
        
            
                "status": "initiated",
            
        
    
        
        
            
                "amount": 65000,
            
        
    
        
        
            
                "currency_code": "IDR",
            
        
    
        
        
            
                "initiated_at": new Date('2026-02-10T02:06:00Z'),
            
        
    
        
        
            
                "confirmed_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
];



const PaymentEventsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "callback",
            
        
    
        
        
            
                "result": "ignored",
            
        
    
        
        
            
                "message": "Create payment request accepted",
            
        
    
        
        
            
                "event_at": new Date('2026-02-16T08:12:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "redirect",
            
        
    
        
        
            
                "result": "failure",
            
        
    
        
        
            
                "message": "Payment status pending received",
            
        
    
        
        
            
                "event_at": new Date('2026-02-16T08:12:20Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "redirect",
            
        
    
        
        
            
                "result": "ignored",
            
        
    
        
        
            
                "message": "Payment confirmed paid",
            
        
    
        
        
            
                "event_at": new Date('2026-02-15T10:22:30Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "event_type": "redirect",
            
        
    
        
        
            
                "result": "ignored",
            
        
    
        
        
            
                "message": "Payment failed due to timeout",
            
        
    
        
        
            
                "event_at": new Date('2026-02-10T02:10:00Z'),
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
    },
    
];



const RefundsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "refund_reference": "RF-20260206-0001",
            
        
    
        
        
            
                "amount": 20000,
            
        
    
        
        
            
                "status": "cancelled",
            
        
    
        
        
            
                "reason": "Duplicate purchase request",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-06T02:10:00Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-02-06T03:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "refund_reference": "RF-20260216-0002",
            
        
    
        
        
            
                "amount": 50000,
            
        
    
        
        
            
                "status": "processing",
            
        
    
        
        
            
                "reason": "Customer requested partial refund",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-16T05:25:00Z'),
            
        
    
        
        
            
                "completed_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "refund_reference": "RF-20260210-0003",
            
        
    
        
        
            
                "amount": 65000,
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "reason": "Payment not settled",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-10T03:30:00Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-02-10T03:45:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "refund_reference": "RF-20260214-0004",
            
        
    
        
        
            
                "amount": 90000,
            
        
    
        
        
            
                "status": "succeeded",
            
        
    
        
        
            
                "reason": "Refund request cancelled by customer",
            
        
    
        
        
            
                "requested_at": new Date('2026-02-14T09:00:00Z'),
            
        
    
        
        
            
                "completed_at": new Date('2026-02-14T09:30:00Z'),
            
        
    
    },
    
];



const InventoryMovementsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "in",
            
        
    
        
        
            
                "quantity": 200,
            
        
    
        
        
            
                "reference": "PO-2026-0007",
            
        
    
        
        
            
                "note": "Restock kode digital",
            
        
    
        
        
            
                "moved_at": new Date('2026-02-10T01:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "in",
            
        
    
        
        
            
                "quantity": 2,
            
        
    
        
        
            
                "reference": "ORD-2026-0002",
            
        
    
        
        
            
                "note": "Penjualan 2 item",
            
        
    
        
        
            
                "moved_at": new Date('2026-02-15T10:25:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "adjustment",
            
        
    
        
        
            
                "quantity": 1,
            
        
    
        
        
            
                "reference": "ORD-2026-0005",
            
        
    
        
        
            
                "note": "Penjualan 1 item",
            
        
    
        
        
            
                "moved_at": new Date('2026-02-05T04:32:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "movement_type": "out",
            
        
    
        
        
            
                "quantity": -5,
            
        
    
        
        
            
                "reference": "ADJ-2026-0002",
            
        
    
        
        
            
                "note": "Penyesuaian stok karena invalid codes",
            
        
    
        
        
            
                "moved_at": new Date('2026-02-07T07:00:00Z'),
            
        
    
    },
    
];



const ProductReviewsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 5,
            
        
    
        
        
            
                "title": "Proses cepat",
            
        
    
        
        
            
                "content": "Paket langsung masuk, recommended.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "rejected",
            
        
    
        
        
            
                "reviewed_at": new Date('2026-02-02T09:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 4,
            
        
    
        
        
            
                "title": "Kode valid",
            
        
    
        
        
            
                "content": "Kode valid dan cepat diterima, terima kasih.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "rejected",
            
        
    
        
        
            
                "reviewed_at": new Date('2026-02-16T12:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 3,
            
        
    
        
        
            
                "title": "Aktivasi butuh waktu",
            
        
    
        
        
            
                "content": "Aktif tapi sempat menunggu beberapa menit.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "reviewed_at": new Date('2026-02-14T08:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 5,
            
        
    
        
        
            
                "title": "Cocok untuk hadiah",
            
        
    
        
        
            
                "content": "Kode masuk cepat dan mudah dipakai.",
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "status": "pending",
            
        
    
        
        
            
                "reviewed_at": new Date('2026-02-06T05:00:00Z'),
            
        
    
    },
    
];



const WishlistsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Favorit Raka",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Wishlist Siti",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Kebutuhan Bulanan",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "name": "Hadiah",
            
        
    
        
        
            
                "is_default": true,
            
        
    
    },
    
];



const WishlistItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "added_at": new Date('2026-02-08T10:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "added_at": new Date('2026-02-08T10:05:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "added_at": new Date('2026-02-12T09:30:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "added_at": new Date('2026-02-01T04:10:00Z'),
            
        
    
    },
    
];



const CmsPagesData = [
    
    {
    
        
        
            
                "title": "Tentang Kami",
            
        
    
        
        
            
                "slug": "tentang-kami",
            
        
    
        
        
            
                "content": "Kami menyediakan produk digital dan kebutuhan pilihan dengan proses cepat dan dukungan pelanggan yang responsif.",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "published_at": new Date('2026-01-05T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Syarat dan Ketentuan",
            
        
    
        
        
            
                "slug": "syarat-dan-ketentuan",
            
        
    
        
        
            
                "content": "Syarat dan ketentuan penggunaan layanan serta ketentuan transaksi.",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "published_at": new Date('2026-01-05T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Kebijakan Privasi",
            
        
    
        
        
            
                "slug": "kebijakan-privasi",
            
        
    
        
        
            
                "content": "Penjelasan mengenai pengumpulan dan penggunaan data pribadi pelanggan.",
            
        
    
        
        
            
                "status": "draft",
            
        
    
        
        
            
                "published_at": new Date('2026-01-06T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Bantuan",
            
        
    
        
        
            
                "slug": "bantuan",
            
        
    
        
        
            
                "content": "Panduan pemesanan, pembayaran DANA, dan status transaksi.",
            
        
    
        
        
            
                "status": "published",
            
        
    
        
        
            
                "published_at": new Date('2026-01-07T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
    },
    
];



const HomepageSectionsData = [
    
    {
    
        
        
            
                "title": "Hero Promo Februari",
            
        
    
        
        
            
                "section_type": "featured_products",
            
        
    
        
        
            
                "sort_order": 1,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "content": "Promo pilihan untuk paket data dan voucher digital bulan ini.",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Kategori Populer",
            
        
    
        
        
            
                "section_type": "featured_products",
            
        
    
        
        
            
                "sort_order": 2,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "content": "Temukan kategori yang paling sering dibeli.",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Produk Unggulan",
            
        
    
        
        
            
                "section_type": "category_grid",
            
        
    
        
        
            
                "sort_order": 3,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "content": "Produk unggulan dengan penjualan terbaik.",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
    {
    
        
        
            
                "title": "Banner Diskon",
            
        
    
        
        
            
                "section_type": "featured_products",
            
        
    
        
        
            
                "sort_order": 4,
            
        
    
        
        
            
                "is_active": true,
            
        
    
        
        
            
                // type code here for "images" field
            
        
    
        
        
            
                "content": "Gunakan kode HEMAT10 untuk diskon.",
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
        
        
            
                // type code here for "relation_many" field
            
        
    
    },
    
];



const SupportTicketsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Status pembayaran DANA belum berubah",
            
        
    
        
        
            
                "message": "Saya sudah bayar tetapi status masih pending. Mohon dicek.",
            
        
    
        
        
            
                "status": "open",
            
        
    
        
        
            
                "priority": "low",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date('2026-02-16T09:00:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Permintaan invoice",
            
        
    
        
        
            
                "message": "Mohon kirimkan invoice untuk pesanan ORD-2026-0002.",
            
        
    
        
        
            
                "status": "resolved",
            
        
    
        
        
            
                "priority": "low",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date('2026-02-15T11:00:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Pertanyaan aktivasi paket XL",
            
        
    
        
        
            
                "message": "Apakah ada langkah tambahan untuk aktivasi paket?",
            
        
    
        
        
            
                "status": "resolved",
            
        
    
        
        
            
                "priority": "high",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date('2026-02-14T08:10:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-14T09:00:00Z'),
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "subject": "Batal pesanan",
            
        
    
        
        
            
                "message": "Saya ingin membatalkan pesanan ORD-2026-0004.",
            
        
    
        
        
            
                "status": "closed",
            
        
    
        
        
            
                "priority": "urgent",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "opened_at": new Date('2026-02-10T02:30:00Z'),
            
        
    
        
        
            
                "resolved_at": new Date('2026-02-10T03:05:00Z'),
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateCategoryWithParent_category() {
            
                const relatedParent_category0 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Category0 = await Categories.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Category0?.setParent_category)
                {
                    await
                    Category0.
                    setParent_category(relatedParent_category0);
                }
            
                const relatedParent_category1 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Category1 = await Categories.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Category1?.setParent_category)
                {
                    await
                    Category1.
                    setParent_category(relatedParent_category1);
                }
            
                const relatedParent_category2 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Category2 = await Categories.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Category2?.setParent_category)
                {
                    await
                    Category2.
                    setParent_category(relatedParent_category2);
                }
            
                const relatedParent_category3 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Category3 = await Categories.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Category3?.setParent_category)
                {
                    await
                    Category3.
                    setParent_category(relatedParent_category3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
            
            async function associateProductWithCategory() {
            
                const relatedCategory0 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setCategory)
                {
                    await
                    Product0.
                    setCategory(relatedCategory0);
                }
            
                const relatedCategory1 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setCategory)
                {
                    await
                    Product1.
                    setCategory(relatedCategory1);
                }
            
                const relatedCategory2 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setCategory)
                {
                    await
                    Product2.
                    setCategory(relatedCategory2);
                }
            
                const relatedCategory3 = await Categories.findOne({
                    offset: Math.floor(Math.random() * (await Categories.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setCategory)
                {
                    await
                    Product3.
                    setCategory(relatedCategory3);
                }
            
        }
        
    
        
            
            async function associateProductWithBrand() {
            
                const relatedBrand0 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Product0 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Product0?.setBrand)
                {
                    await
                    Product0.
                    setBrand(relatedBrand0);
                }
            
                const relatedBrand1 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Product1 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Product1?.setBrand)
                {
                    await
                    Product1.
                    setBrand(relatedBrand1);
                }
            
                const relatedBrand2 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Product2 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Product2?.setBrand)
                {
                    await
                    Product2.
                    setBrand(relatedBrand2);
                }
            
                const relatedBrand3 = await Brands.findOne({
                    offset: Math.floor(Math.random() * (await Brands.count())),
                });
                const Product3 = await Products.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Product3?.setBrand)
                {
                    await
                    Product3.
                    setBrand(relatedBrand3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

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

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function 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 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 associateCartItemWithVariant() {
            
                const relatedVariant0 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const CartItem0 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (CartItem0?.setVariant)
                {
                    await
                    CartItem0.
                    setVariant(relatedVariant0);
                }
            
                const relatedVariant1 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const CartItem1 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (CartItem1?.setVariant)
                {
                    await
                    CartItem1.
                    setVariant(relatedVariant1);
                }
            
                const relatedVariant2 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const CartItem2 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (CartItem2?.setVariant)
                {
                    await
                    CartItem2.
                    setVariant(relatedVariant2);
                }
            
                const relatedVariant3 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const CartItem3 = await CartItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (CartItem3?.setVariant)
                {
                    await
                    CartItem3.
                    setVariant(relatedVariant3);
                }
            
        }
        
    
        
    
        
    
        
    

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

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
            
            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 associateOrderWithShipping_addres() {
            
                const relatedShipping_addres0 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setShipping_addres)
                {
                    await
                    Order0.
                    setShipping_addres(relatedShipping_addres0);
                }
            
                const relatedShipping_addres1 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setShipping_addres)
                {
                    await
                    Order1.
                    setShipping_addres(relatedShipping_addres1);
                }
            
                const relatedShipping_addres2 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setShipping_addres)
                {
                    await
                    Order2.
                    setShipping_addres(relatedShipping_addres2);
                }
            
                const relatedShipping_addres3 = await Addresses.findOne({
                    offset: Math.floor(Math.random() * (await Addresses.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setShipping_addres)
                {
                    await
                    Order3.
                    setShipping_addres(relatedShipping_addres3);
                }
            
        }
        
    
        
            
            async function associateOrderWithShipping_method() {
            
                const relatedShipping_method0 = await ShippingMethods.findOne({
                    offset: Math.floor(Math.random() * (await ShippingMethods.count())),
                });
                const Order0 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Order0?.setShipping_method)
                {
                    await
                    Order0.
                    setShipping_method(relatedShipping_method0);
                }
            
                const relatedShipping_method1 = await ShippingMethods.findOne({
                    offset: Math.floor(Math.random() * (await ShippingMethods.count())),
                });
                const Order1 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Order1?.setShipping_method)
                {
                    await
                    Order1.
                    setShipping_method(relatedShipping_method1);
                }
            
                const relatedShipping_method2 = await ShippingMethods.findOne({
                    offset: Math.floor(Math.random() * (await ShippingMethods.count())),
                });
                const Order2 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Order2?.setShipping_method)
                {
                    await
                    Order2.
                    setShipping_method(relatedShipping_method2);
                }
            
                const relatedShipping_method3 = await ShippingMethods.findOne({
                    offset: Math.floor(Math.random() * (await ShippingMethods.count())),
                });
                const Order3 = await Orders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Order3?.setShipping_method)
                {
                    await
                    Order3.
                    setShipping_method(relatedShipping_method3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

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

    
    
    
        
            
            async function 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 associatePaymentEventWithPayment() {
            
                const relatedPayment0 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const PaymentEvent0 = await PaymentEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PaymentEvent0?.setPayment)
                {
                    await
                    PaymentEvent0.
                    setPayment(relatedPayment0);
                }
            
                const relatedPayment1 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const PaymentEvent1 = await PaymentEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PaymentEvent1?.setPayment)
                {
                    await
                    PaymentEvent1.
                    setPayment(relatedPayment1);
                }
            
                const relatedPayment2 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const PaymentEvent2 = await PaymentEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PaymentEvent2?.setPayment)
                {
                    await
                    PaymentEvent2.
                    setPayment(relatedPayment2);
                }
            
                const relatedPayment3 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const PaymentEvent3 = await PaymentEvents.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PaymentEvent3?.setPayment)
                {
                    await
                    PaymentEvent3.
                    setPayment(relatedPayment3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateRefundWithPayment() {
            
                const relatedPayment0 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund0 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Refund0?.setPayment)
                {
                    await
                    Refund0.
                    setPayment(relatedPayment0);
                }
            
                const relatedPayment1 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund1 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Refund1?.setPayment)
                {
                    await
                    Refund1.
                    setPayment(relatedPayment1);
                }
            
                const relatedPayment2 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund2 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Refund2?.setPayment)
                {
                    await
                    Refund2.
                    setPayment(relatedPayment2);
                }
            
                const relatedPayment3 = await Payments.findOne({
                    offset: Math.floor(Math.random() * (await Payments.count())),
                });
                const Refund3 = await Refunds.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Refund3?.setPayment)
                {
                    await
                    Refund3.
                    setPayment(relatedPayment3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateInventoryMovementWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setProduct)
                {
                    await
                    InventoryMovement0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setProduct)
                {
                    await
                    InventoryMovement1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setProduct)
                {
                    await
                    InventoryMovement2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setProduct)
                {
                    await
                    InventoryMovement3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
            
            async function associateInventoryMovementWithVariant() {
            
                const relatedVariant0 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryMovement0 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryMovement0?.setVariant)
                {
                    await
                    InventoryMovement0.
                    setVariant(relatedVariant0);
                }
            
                const relatedVariant1 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryMovement1 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryMovement1?.setVariant)
                {
                    await
                    InventoryMovement1.
                    setVariant(relatedVariant1);
                }
            
                const relatedVariant2 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryMovement2 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryMovement2?.setVariant)
                {
                    await
                    InventoryMovement2.
                    setVariant(relatedVariant2);
                }
            
                const relatedVariant3 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const InventoryMovement3 = await InventoryMovements.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryMovement3?.setVariant)
                {
                    await
                    InventoryMovement3.
                    setVariant(relatedVariant3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateProductReviewWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductReview0 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductReview0?.setProduct)
                {
                    await
                    ProductReview0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductReview1 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductReview1?.setProduct)
                {
                    await
                    ProductReview1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductReview2 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductReview2?.setProduct)
                {
                    await
                    ProductReview2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const ProductReview3 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductReview3?.setProduct)
                {
                    await
                    ProductReview3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
            
            async function associateProductReviewWithCustomer() {
            
                const relatedCustomer0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProductReview0 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ProductReview0?.setCustomer)
                {
                    await
                    ProductReview0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProductReview1 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ProductReview1?.setCustomer)
                {
                    await
                    ProductReview1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProductReview2 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ProductReview2?.setCustomer)
                {
                    await
                    ProductReview2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ProductReview3 = await ProductReviews.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ProductReview3?.setCustomer)
                {
                    await
                    ProductReview3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateWishlistWithCustomer() {
            
                const relatedCustomer0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Wishlist0 = await Wishlists.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Wishlist0?.setCustomer)
                {
                    await
                    Wishlist0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Wishlist1 = await Wishlists.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Wishlist1?.setCustomer)
                {
                    await
                    Wishlist1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Wishlist2 = await Wishlists.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Wishlist2?.setCustomer)
                {
                    await
                    Wishlist2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Wishlist3 = await Wishlists.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Wishlist3?.setCustomer)
                {
                    await
                    Wishlist3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    

    
    
    
        
            
            async function associateWishlistItemWithWishlist() {
            
                const relatedWishlist0 = await Wishlists.findOne({
                    offset: Math.floor(Math.random() * (await Wishlists.count())),
                });
                const WishlistItem0 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WishlistItem0?.setWishlist)
                {
                    await
                    WishlistItem0.
                    setWishlist(relatedWishlist0);
                }
            
                const relatedWishlist1 = await Wishlists.findOne({
                    offset: Math.floor(Math.random() * (await Wishlists.count())),
                });
                const WishlistItem1 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WishlistItem1?.setWishlist)
                {
                    await
                    WishlistItem1.
                    setWishlist(relatedWishlist1);
                }
            
                const relatedWishlist2 = await Wishlists.findOne({
                    offset: Math.floor(Math.random() * (await Wishlists.count())),
                });
                const WishlistItem2 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WishlistItem2?.setWishlist)
                {
                    await
                    WishlistItem2.
                    setWishlist(relatedWishlist2);
                }
            
                const relatedWishlist3 = await Wishlists.findOne({
                    offset: Math.floor(Math.random() * (await Wishlists.count())),
                });
                const WishlistItem3 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WishlistItem3?.setWishlist)
                {
                    await
                    WishlistItem3.
                    setWishlist(relatedWishlist3);
                }
            
        }
        
    
        
            
            async function associateWishlistItemWithProduct() {
            
                const relatedProduct0 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const WishlistItem0 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WishlistItem0?.setProduct)
                {
                    await
                    WishlistItem0.
                    setProduct(relatedProduct0);
                }
            
                const relatedProduct1 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const WishlistItem1 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WishlistItem1?.setProduct)
                {
                    await
                    WishlistItem1.
                    setProduct(relatedProduct1);
                }
            
                const relatedProduct2 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const WishlistItem2 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WishlistItem2?.setProduct)
                {
                    await
                    WishlistItem2.
                    setProduct(relatedProduct2);
                }
            
                const relatedProduct3 = await Products.findOne({
                    offset: Math.floor(Math.random() * (await Products.count())),
                });
                const WishlistItem3 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WishlistItem3?.setProduct)
                {
                    await
                    WishlistItem3.
                    setProduct(relatedProduct3);
                }
            
        }
        
    
        
            
            async function associateWishlistItemWithVariant() {
            
                const relatedVariant0 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const WishlistItem0 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (WishlistItem0?.setVariant)
                {
                    await
                    WishlistItem0.
                    setVariant(relatedVariant0);
                }
            
                const relatedVariant1 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const WishlistItem1 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (WishlistItem1?.setVariant)
                {
                    await
                    WishlistItem1.
                    setVariant(relatedVariant1);
                }
            
                const relatedVariant2 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const WishlistItem2 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (WishlistItem2?.setVariant)
                {
                    await
                    WishlistItem2.
                    setVariant(relatedVariant2);
                }
            
                const relatedVariant3 = await ProductVariants.findOne({
                    offset: Math.floor(Math.random() * (await ProductVariants.count())),
                });
                const WishlistItem3 = await WishlistItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (WishlistItem3?.setVariant)
                {
                    await
                    WishlistItem3.
                    setVariant(relatedVariant3);
                }
            
        }
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            // Similar logic for "relation_many"
        
    

    
    
    
        
            
            async function associateSupportTicketWithCustomer() {
            
                const relatedCustomer0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket0 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (SupportTicket0?.setCustomer)
                {
                    await
                    SupportTicket0.
                    setCustomer(relatedCustomer0);
                }
            
                const relatedCustomer1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket1 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (SupportTicket1?.setCustomer)
                {
                    await
                    SupportTicket1.
                    setCustomer(relatedCustomer1);
                }
            
                const relatedCustomer2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket2 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (SupportTicket2?.setCustomer)
                {
                    await
                    SupportTicket2.
                    setCustomer(relatedCustomer2);
                }
            
                const relatedCustomer3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const SupportTicket3 = await SupportTickets.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (SupportTicket3?.setCustomer)
                {
                    await
                    SupportTicket3.
                    setCustomer(relatedCustomer3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await StoreSettings.bulkCreate(StoreSettingsData);
                
            
            
                
                await Categories.bulkCreate(CategoriesData);
                
            
            
                
                await Brands.bulkCreate(BrandsData);
                
            
            
                
                await Products.bulkCreate(ProductsData);
                
            
            
                
                await ProductVariants.bulkCreate(ProductVariantsData);
                
            
            
                
                await PromoCodes.bulkCreate(PromoCodesData);
                
            
            
                
                await Carts.bulkCreate(CartsData);
                
            
            
                
                await CartItems.bulkCreate(CartItemsData);
                
            
            
                
                await Addresses.bulkCreate(AddressesData);
                
            
            
                
                await ShippingMethods.bulkCreate(ShippingMethodsData);
                
            
            
                
                await Orders.bulkCreate(OrdersData);
                
            
            
                
                await OrderItems.bulkCreate(OrderItemsData);
                
            
            
                
                await Payments.bulkCreate(PaymentsData);
                
            
            
                
                await PaymentEvents.bulkCreate(PaymentEventsData);
                
            
            
                
                await Refunds.bulkCreate(RefundsData);
                
            
            
                
                await InventoryMovements.bulkCreate(InventoryMovementsData);
                
            
            
                
                await ProductReviews.bulkCreate(ProductReviewsData);
                
            
            
                
                await Wishlists.bulkCreate(WishlistsData);
                
            
            
                
                await WishlistItems.bulkCreate(WishlistItemsData);
                
            
            
                
                await CmsPages.bulkCreate(CmsPagesData);
                
            
            
                
                await HomepageSections.bulkCreate(HomepageSectionsData);
                
            
            
                
                await SupportTickets.bulkCreate(SupportTicketsData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateCategoryWithParent_category(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                        
                        await associateProductWithCategory(),
                    
                
                    
                        
                        await associateProductWithBrand(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateProductVariantWithProduct(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCartWithCustomer(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateCartItemWithCart(),
                    
                
                    
                        
                        await associateCartItemWithProduct(),
                    
                
                    
                        
                        await associateCartItemWithVariant(),
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAddressWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                        
                        await associateOrderWithCustomer(),
                    
                
                    
                        
                        await associateOrderWithShipping_addres(),
                    
                
                    
                        
                        await associateOrderWithShipping_method(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateOrderItemWithOrder(),
                    
                
                    
                        
                        await associateOrderItemWithProduct(),
                    
                
                    
                        
                        await associateOrderItemWithVariant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePaymentWithOrder(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePaymentEventWithPayment(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateRefundWithPayment(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateInventoryMovementWithProduct(),
                    
                
                    
                        
                        await associateInventoryMovementWithVariant(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateProductReviewWithProduct(),
                    
                
                    
                        
                        await associateProductReviewWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateWishlistWithCustomer(),
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateWishlistItemWithWishlist(),
                    
                
                    
                        
                        await associateWishlistItemWithProduct(),
                    
                
                    
                        
                        await associateWishlistItemWithVariant(),
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
            
                
                
                    
                        
                        await associateSupportTicketWithCustomer(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('store_settings', null, {});
            
            
            await queryInterface.bulkDelete('categories', null, {});
            
            
            await queryInterface.bulkDelete('brands', null, {});
            
            
            await queryInterface.bulkDelete('products', null, {});
            
            
            await queryInterface.bulkDelete('product_variants', null, {});
            
            
            await queryInterface.bulkDelete('promo_codes', null, {});
            
            
            await queryInterface.bulkDelete('carts', null, {});
            
            
            await queryInterface.bulkDelete('cart_items', null, {});
            
            
            await queryInterface.bulkDelete('addresses', null, {});
            
            
            await queryInterface.bulkDelete('shipping_methods', null, {});
            
            
            await queryInterface.bulkDelete('orders', null, {});
            
            
            await queryInterface.bulkDelete('order_items', null, {});
            
            
            await queryInterface.bulkDelete('payments', null, {});
            
            
            await queryInterface.bulkDelete('payment_events', null, {});
            
            
            await queryInterface.bulkDelete('refunds', null, {});
            
            
            await queryInterface.bulkDelete('inventory_movements', null, {});
            
            
            await queryInterface.bulkDelete('product_reviews', null, {});
            
            
            await queryInterface.bulkDelete('wishlists', null, {});
            
            
            await queryInterface.bulkDelete('wishlist_items', null, {});
            
            
            await queryInterface.bulkDelete('cms_pages', null, {});
            
            
            await queryInterface.bulkDelete('homepage_sections', null, {});
            
            
            await queryInterface.bulkDelete('support_tickets', null, {});
            
        
    },
};