<?php
declare(strict_types=1);

return [
    'app_users' => [],
    'tb_supplier' => [],
    'tb_pelanggan' => [],
    'tb_kategori' => [],
    'tb_satuan' => [],
    'tb_bank' => [],
    'tb_metode_bayar' => [],
    'tb_closing_bulanan' => [],
    'tb_kategori_pengeluaran' => [],
    'tb_barang' => [
        'ignore_columns' => ['id_supplier', 'id_kategori', 'id_satuan'],
        'parent_rules' => [
            ['column' => 'supplier_uuid', 'parent_table' => 'tb_supplier'],
            ['column' => 'kategori_uuid', 'parent_table' => 'tb_kategori'],
            ['column' => 'satuan_uuid', 'parent_table' => 'tb_satuan'],
        ],
    ],
    'tb_kartu_stok' => [
        'ignore_columns' => ['id_barang', 'ref_id'],
        'parent_rules' => [
            ['column' => 'barang_uuid', 'parent_table' => 'tb_barang'],
        ],
    ],
    'tb_pembelian' => [
        'ignore_columns' => ['id_supplier'],
        'parent_rules' => [
            ['column' => 'supplier_uuid', 'parent_table' => 'tb_supplier'],
        ],
    ],
    'tb_pembelian_detail' => [
        'ignore_columns' => ['id_pembelian', 'id_barang'],
        'parent_rules' => [
            ['column' => 'pembelian_uuid', 'parent_table' => 'tb_pembelian'],
            ['column' => 'barang_uuid', 'parent_table' => 'tb_barang'],
        ],
    ],
    'tb_pembayaran_supplier' => [
        'ignore_columns' => ['id_pembelian', 'id_metode_bayar', 'id_bank'],
        'parent_rules' => [
            ['column' => 'pembelian_uuid', 'parent_table' => 'tb_pembelian'],
            ['column' => 'metode_bayar_uuid', 'parent_table' => 'tb_metode_bayar'],
            ['column' => 'bank_uuid', 'parent_table' => 'tb_bank'],
        ],
    ],
    'tb_pengeluaran' => [
        'ignore_columns' => ['id_kategori_pengeluaran'],
        'parent_rules' => [
            ['column' => 'kategori_pengeluaran_uuid', 'parent_table' => 'tb_kategori_pengeluaran'],
        ],
    ],
    'tb_penjualan' => [
        'ignore_columns' => ['id_pelanggan'],
        'parent_rules' => [
            ['column' => 'pelanggan_uuid', 'parent_table' => 'tb_pelanggan'],
        ],
    ],
    'tb_penjualan_detail' => [
        'ignore_columns' => ['id_penjualan', 'id_barang'],
        'parent_rules' => [
            ['column' => 'penjualan_uuid', 'parent_table' => 'tb_penjualan'],
            ['column' => 'barang_uuid', 'parent_table' => 'tb_barang'],
        ],
    ],
    'tb_pembayaran_pelanggan' => [
        'ignore_columns' => ['id_penjualan', 'id_metode_bayar', 'id_bank'],
        'parent_rules' => [
            ['column' => 'penjualan_uuid', 'parent_table' => 'tb_penjualan'],
            ['column' => 'metode_bayar_uuid', 'parent_table' => 'tb_metode_bayar'],
            ['column' => 'bank_uuid', 'parent_table' => 'tb_bank'],
        ],
    ],
    'tb_retur_penjualan' => [
        'ignore_columns' => ['id_penjualan_detail', 'id_barang'],
        'parent_rules' => [
            ['column' => 'penjualan_detail_uuid', 'parent_table' => 'tb_penjualan_detail'],
            ['column' => 'barang_uuid', 'parent_table' => 'tb_barang'],
        ],
    ],
    'tb_invoice' => [
        'ignore_columns' => ['id_pelanggan', 'id_penjualan'],
        'parent_rules' => [
            ['column' => 'pelanggan_uuid', 'parent_table' => 'tb_pelanggan'],
            ['column' => 'penjualan_uuid', 'parent_table' => 'tb_penjualan'],
        ],
    ],
    'tb_pembayaran_invoice' => [
        'ignore_columns' => ['id_invoice', 'id_metode_bayar', 'id_bank'],
        'parent_rules' => [
            ['column' => 'invoice_uuid', 'parent_table' => 'tb_invoice'],
            ['column' => 'metode_bayar_uuid', 'parent_table' => 'tb_metode_bayar'],
            ['column' => 'bank_uuid', 'parent_table' => 'tb_bank'],
        ],
    ],
];
