-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `aset`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `GenerateAssetCode` (IN `p_kategori_id` INT, IN `p_dept_id` INT, OUT `p_asset_code` VARCHAR(50))   BEGIN
    DECLARE v_kategori_code VARCHAR(10);
    DECLARE v_dept_code VARCHAR(10);
    DECLARE v_counter INT DEFAULT 1;
    DECLARE v_new_code VARCHAR(50);
    
    -- Get kategori code
    SELECT kategori_code INTO v_kategori_code 
    FROM tbl_kategori 
    WHERE kategori_id = p_kategori_id;
    
    -- Get dept code (dari database HRIS - simulasi)
    -- Ini nanti diganti dengan query ke database HRIS
    SET v_dept_code = 'IT'; -- Contoh default
    
    -- Get atau update counter
    INSERT INTO tbl_asset_counter (kategori_id, dept_id, counter)
    VALUES (p_kategori_id, p_dept_id, 1)
    ON DUPLICATE KEY UPDATE 
        counter = counter + 1,
        updated_at = CURRENT_TIMESTAMP;
    
    -- Get current counter
    SELECT counter INTO v_counter
    FROM tbl_asset_counter
    WHERE kategori_id = p_kategori_id AND dept_id = p_dept_id;
    
    -- Generate asset code: KATEGORI-DEPT-XXX
    SET v_new_code = CONCAT(v_kategori_code, '-', v_dept_code, '-', LPAD(v_counter, 3, '0'));
    
    -- Update last asset code
    UPDATE tbl_asset_counter 
    SET last_asset_code = v_new_code
    WHERE kategori_id = p_kategori_id AND dept_id = p_dept_id;
    
    SET p_asset_code = v_new_code;
END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `overview`
--

CREATE TABLE `overview` (
  `id` int UNSIGNED NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4  NOT NULL,
  `content` text CHARACTER SET utf8mb4  NOT NULL,
  `image` varchar(255) CHARACTER SET utf8mb4  NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

-- --------------------------------------------------------

--
-- Table structure for table `tbl_aset`
--

CREATE TABLE `tbl_aset` (
  `asset_id` int NOT NULL,
  `kode_asset` varchar(50) CHARACTER SET utf8mb4  DEFAULT NULL COMMENT 'Format: KATEGORI_CODE-DEPT_CODE-XXX',
  `kode_invent_lama` varchar(25) DEFAULT NULL,
  `asset_sap` varchar(15) DEFAULT NULL,
  `lokasi_id` smallint UNSIGNED DEFAULT NULL,
  `kategori_id` int DEFAULT NULL,
  `tipe_asset` varchar(200) DEFAULT NULL,
  `nama_asset` varchar(100) CHARACTER SET utf8mb4  DEFAULT NULL,
  `qty` int DEFAULT '1',
  `nik_pic` varchar(20) CHARACTER SET utf8mb4  DEFAULT NULL COMMENT 'NIK PIC dari database HRIS',
  `lainnya` varchar(255) DEFAULT NULL,
  `satuan` varchar(20) CHARACTER SET utf8mb4  DEFAULT 'Unit' COMMENT 'Unit, Pcs, Set, dll',
  `keterangan` text,
  `kegunaan` text,
  `dept_id` int DEFAULT NULL,
  `digunakan` varchar(50) CHARACTER SET utf8mb4  DEFAULT NULL,
  `masa_pakai` smallint DEFAULT NULL COMMENT 'Dalam Tahun',
  `estimasi_harga` decimal(15,2) DEFAULT NULL,
  `tgl_beli` date DEFAULT NULL,
  `serial_number` varchar(50) DEFAULT NULL,
  `foto_asset` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `site` varchar(150) DEFAULT NULL,
  `nama_lokasi` varchar(150) DEFAULT NULL,
  `lokasi_name` varchar(150) DEFAULT NULL,
  `asset_class` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_aset`
--

INSERT INTO `tbl_aset` (`asset_id`, `kode_asset`, `kode_invent_lama`, `asset_sap`, `lokasi_id`, `kategori_id`, `tipe_asset`, `nama_asset`, `qty`, `nik_pic`, `lainnya`, `satuan`, `keterangan`, `kegunaan`, `dept_id`, `digunakan`, `masa_pakai`, `estimasi_harga`, `tgl_beli`, `serial_number`, `foto_asset`, `created_at`, `updated_at`, `deleted_at`, `site`, `nama_lokasi`, `lokasi_name`, `asset_class`) VALUES
(1, 'LAP-C.2-001', NULL, '2302058', NULL, 18, NULL, 'Laptop', 1, '1', NULL, 'unit', 'Detailnya', 'digunaguna', 20, 'aktif', 10, '2340000000.00', '2025-09-16', '230102058', 'Foto_.jpg', '2025-09-16 00:16:00', '2025-09-16 00:16:00', NULL, NULL, NULL, NULL, NULL),
(2, 'MUL-B.2-001', NULL, '2302059', NULL, 20, NULL, 'Printer', 2, '1', NULL, 'unit', 'sedetailnya', 'segunanya', 8, 'aktif', 10, '23450000000.00', '2025-09-16', '230102059', 'Foto_.jpg', '2025-09-16 00:26:09', '2025-09-16 00:26:09', NULL, NULL, NULL, NULL, NULL),
(3, 'LAP-C.1-001', NULL, '230202060', 3, 18, NULL, 'Honda', 3, 'Budi Santoso', NULL, 'unit', 'aset', 'gunaguna', 15, 'aktif', 19, '234000000.00', '2025-09-22', '230102060', 'Foto_.jpg', '2025-09-16 00:40:06', '2025-09-21 17:46:27', NULL, NULL, NULL, NULL, NULL),
(4, 'MES-A.2-001', NULL, '2302062', NULL, NULL, 'bangunan', 'namain', 1, 'Budi Santoso', NULL, 'unit', 'detail banget', 'digunain', 4, 'aktif', 10, '123900000.00', '2025-09-22', NULL, NULL, NULL, NULL, NULL, 'Industri', 'INDINEI', NULL, NULL),
(5, 'SOF-C.5-001', NULL, '23012063', NULL, 13, NULL, 'Brio', 1, '1', NULL, 'unit', 'aset', 'gunaguna', 25, 'aktif', 19, '234000000.00', '2025-09-22', '230102063', 'Foto_.png', '2025-09-21 18:48:30', '2025-09-21 18:48:30', NULL, NULL, NULL, NULL, NULL),
(6, 'LCS-B.4-001', NULL, '230202065', NULL, 14, NULL, 'Honda', 3, '1', NULL, 'unit', 'aset', 'gunaguna', 11, 'tidak aktif', 19, '234000000.00', '2025-09-22', '230102064', 'Foto_.png', '2025-09-21 19:35:46', '2025-09-21 19:35:46', NULL, NULL, NULL, NULL, NULL),
(7, 'SPA-B.6-001', NULL, '230202065', 15, 29, NULL, 'Honda', 3, 'Budi Santoso', NULL, 'unit', 'aset', 'gunaguna', 18, 'aktif', 19, '234000000.00', '2025-09-22', '230102065', 'Foto_.png', '2025-09-21 20:00:19', '2025-09-21 20:01:36', NULL, NULL, NULL, NULL, NULL),
(8, 'MES-D.6-001', NULL, '230202070', 0, 12, 'Motor', 'BML', 1, '0', 'L', 'unit', 'sedetailnya', 'digunakan', 0, 'aktif', 20, '123000000.00', '2025-09-29', '230102070', 'Foto_.jpg', '2025-09-28 20:21:09', '2025-10-01 19:39:41', NULL, NULL, NULL, NULL, NULL),
(9, 'LAP-B.4-001', NULL, '230202075', NULL, 18, '', 'Laptopan', 2, '1', NULL, 'unit', 'detailnya', 'gunain', 0, 'aktif', 10, '23.00', '2025-10-07', NULL, 'Foto_.jpg', '2025-10-06 19:11:35', '2025-11-05 18:31:26', NULL, NULL, NULL, NULL, NULL),
(11, 'DIE-D.3-001', NULL, '230202080', NULL, 14, '', 'dinamain', 1, '0', NULL, 'unit', 'sedetailnya', 'gunakan', 1, 'aktif', 10, '2301999999.00', '2025-10-09', NULL, NULL, NULL, NULL, NULL, 'Industri', 'INDSIP', NULL, NULL),
(12, 'MOU-D.0-001', NULL, '230202081', 2, 23, 'tanah', 'kananam', 3, '1', '', 'hektar', 'seasetnya hektar', 'aguano', 26, 'aktif', 9, '23128000.00', '2025-10-09', '230102081', 'Foto_.jpg', '2025-10-08 19:03:38', '2025-10-08 19:03:38', NULL, NULL, NULL, NULL, NULL),
(25, 'FUR-A.0-001', NULL, NULL, 1, NULL, 'bangunan', 'NAMAIN', 2, NULL, NULL, 'unit', 'DETAIL', 'GUNAIN', 1, 'aktif', 10, '98000000.00', NULL, NULL, NULL, '2025-10-20 18:50:27', '2025-10-20 18:50:27', NULL, 'Industri', NULL, NULL, NULL),
(27, 'FUR-A.0-002', NULL, NULL, 2, 21, 'bangunan', 'NAMAIN', 12, NULL, NULL, 'unit', 'DESKRIPSIKAN', 'GUNAIN', 1, 'aktif', 19, '98000000.00', NULL, NULL, 'Foto_.jpg', '2025-10-20 19:12:15', '2025-10-20 19:12:15', NULL, 'Baros', '1', NULL, NULL),
(28, 'LCS-B.4-002', NULL, NULL, 1, 14, 'bangunan', 'NAMANYA', 12, NULL, NULL, 'Hektar', 'DETAIL', 'GUNAIN', 11, 'aktif', 18, '89401200000.00', NULL, NULL, 'Foto_.jpg', '2025-10-20 19:14:02', '2025-10-20 19:14:02', NULL, 'Baros', '2', NULL, NULL),
(29, 'FUR-A.1-001', NULL, '2301020481', NULL, 13, '', 'NAMNYA KAN', 90, NULL, NULL, 'hektar', 'DETAIL BANGET ADA CACINGNYA', 'GUNA GUNA', 0, 'aktif', 20, '908888880000.00', NULL, NULL, 'Foto_.jpg', '2025-10-20 19:17:02', '2025-11-05 19:18:24', NULL, 'Industri', '1', NULL, NULL),
(30, 'LAP-A.0-001', NULL, '230102090', NULL, NULL, '', 'ASETIN', 1, NULL, NULL, 'unit', 'DETAIL ', 'GUNAIN', 1, 'aktif', 5, '8999000000.00', NULL, NULL, NULL, NULL, NULL, NULL, 'Industri', 'INDINEI', NULL, NULL),
(31, 'MES-A.1-001', NULL, '230101200', NULL, 12, 'bangunan', 'LOHALA', 1, NULL, NULL, 'unit', 'Detailnya oy', 'gunain', 3, 'tidak aktif', 0, '89000.00', NULL, NULL, 'Foto_.jpg', '2025-11-06 00:21:32', '2025-11-06 00:21:32', NULL, 'Baros', 'BALOK', 'BALINE', NULL),
(34, 'dsbfwehfew', NULL, '82385032', NULL, 25, 'mesin', 'nsafbjwebfw', 2, NULL, NULL, 'unit', 'nebwfbwehfwe', 'jksfasfbjwefw', 4, 'aktif', 1, '0.00', NULL, NULL, 'foto_asset', '2025-11-12 09:32:47', '2025-11-12 09:32:47', NULL, 'Industri', 'POS SECURITY', 'Wood Line', NULL),
(44, 'hsfjkhjwehhwej', NULL, 'rjkbejbri23u432', NULL, NULL, 'tanah', 'bdnfbsbhfbe', 1, NULL, NULL, 'unit', 'bnmfbdsbfherhbsbnmawe', 'bfnsbdbghberbre', NULL, 'tidak aktif', 1, '10.00', NULL, NULL, 'foto_asset', '2025-11-13 04:29:39', '2025-11-13 04:29:39', NULL, 'Industri', 'GDIC', 'PRD Kantor', NULL),
(45, 'hjkhehwfuiewrh', NULL, 'bjfewbhfbwhefe', NULL, NULL, 'mesin', 'sbfbbfehhwe', 1, NULL, NULL, 'unit', 'bdnbfhebfjwjefw', 'fndnfrbbdfr', NULL, 'aktif', 1, '19.00', NULL, NULL, 'foto_asset', '2025-11-13 06:02:43', '2025-11-13 06:02:43', NULL, 'Industri', 'GEDUNG DEPAN INDUSTRI LT1', 'PRD Kantor', NULL),
(49, 'PC-A.0-001', 'fbabafbwefnnnamf', 'samfamnan', NULL, NULL, 'inventaris_kantor', 'hfsfbbabfasjbfdsgf', 1, NULL, NULL, 'unit', 'vsdvbdshanxnfe', 'jasnmnfndsunsdka', 2, 'aktif', 1, '19.00', NULL, NULL, NULL, NULL, NULL, NULL, 'Industri', 'RND', NULL, NULL),
(51, 'MOU-A.0-001', 'ajkajsdjhhefhfs', 'bdsfhwenfw', NULL, 23, 'tanah', 'ncmdnfjsjfwe', 1, NULL, NULL, 'unit', 'nxmnjdsdjwe', 'fnmsfbjwbebfw', 1, 'aktif', 1, '19.00', NULL, NULL, 'foto_asset', '2025-11-14 01:49:14', '2025-11-14 01:49:14', NULL, 'Industri', 'LORONG ABSENSI', 'Gudang Lansir', NULL);

--
-- Triggers `tbl_aset`
--
DELIMITER $$
CREATE TRIGGER `tr_asset_audit_insert` AFTER INSERT ON `tbl_aset` FOR EACH ROW BEGIN
    INSERT INTO tbl_asset_history (
        asset_id, 
        action, 
        new_data, 
        user_nik, 
        keterangan
    ) VALUES (
        NEW.asset_id,
        'Create',
        JSON_OBJECT(
            'kode_asset', NEW.kode_asset,
            'nama_asset', NEW.nama_asset,
            'kategori_id', NEW.kategori_id,
            'lokasi_id', NEW.lokasi_id,
            'site', NEW.site,
            'nama_lokasi', NEW.nama_lokasi,
            'line', NEW.lokasi_name
        ),
        NEW.nik_pic,
        'Asset baru ditambahkan'
    );
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `tbl_asset_counter`
--

CREATE TABLE `tbl_asset_counter` (
  `id` int NOT NULL,
  `kategori_id` int NOT NULL,
  `dept_id` int NOT NULL,
  `counter` int NOT NULL DEFAULT '0',
  `last_asset_code` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

-- --------------------------------------------------------

--
-- Table structure for table `tbl_asset_history`
--

CREATE TABLE `tbl_asset_history` (
  `history_id` int NOT NULL,
  `asset_id` int NOT NULL,
  `action` enum('Create','Update','Delete','Transfer','Maintenance','Disposal') NOT NULL,
  `old_data` json DEFAULT NULL,
  `new_data` json DEFAULT NULL,
  `user_nik` varchar(20) CHARACTER SET utf8mb4  DEFAULT NULL,
  `keterangan` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_asset_history`
--

INSERT INTO `tbl_asset_history` (`history_id`, `asset_id`, `action`, `old_data`, `new_data`, `user_nik`, `keterangan`, `created_at`) VALUES
(1, 1, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"LAP-C.2-001\", \"nama_asset\": \"Laptop\", \"kategori_id\": 18, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-16 07:16:00'),
(2, 2, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"MUL-B.2-001\", \"nama_asset\": \"Printer\", \"kategori_id\": 20, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-16 07:26:09'),
(3, 3, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"LAP-C.0-001\", \"nama_asset\": \"Honda\", \"kategori_id\": 18, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-16 07:40:06'),
(4, 4, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"MUL-C.3-001\", \"nama_asset\": \"namain\", \"kategori_id\": 20, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-22 00:54:57'),
(5, 5, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"SOF-C.5-001\", \"nama_asset\": \"Brio\", \"kategori_id\": 13, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-22 01:48:30'),
(6, 6, 'Create', NULL, '{\"lokasi_id\": null, \"kode_asset\": \"LCS-B.4-001\", \"nama_asset\": \"Honda\", \"kategori_id\": 14, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-22 02:35:46'),
(7, 7, 'Create', NULL, '{\"lokasi_id\": 14, \"kode_asset\": \"APA-C.0-001\", \"nama_asset\": \"Honda\", \"kategori_id\": 28, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-09-22 03:00:19'),
(8, 8, 'Create', NULL, '{\"lokasi_id\": 2, \"kode_asset\": \"KEN-B.3-001\", \"nama_asset\": \"BMW\", \"kategori_id\": 22, \"status_asset\": \"\"}', '0', 'Asset baru ditambahkan', '2025-09-29 03:21:09'),
(9, 9, 'Create', NULL, '{\"lokasi_id\": 2, \"kode_asset\": \"LAP-B.4-001\", \"nama_asset\": \"Laptopan\", \"kategori_id\": 18, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-10-07 02:11:35'),
(11, 11, 'Create', NULL, '{\"lokasi_id\": 2, \"kode_asset\": \"DIE-D.3-001\", \"nama_asset\": \"dinamain\", \"kategori_id\": 24, \"status_asset\": \"\"}', '0', 'Asset baru ditambahkan', '2025-10-09 02:00:50'),
(12, 12, 'Create', NULL, '{\"lokasi_id\": 2, \"kode_asset\": \"MOU-D.0-001\", \"nama_asset\": \"kananam\", \"kategori_id\": 23, \"status_asset\": \"\"}', '1', 'Asset baru ditambahkan', '2025-10-09 02:03:38'),
(13, 25, 'Create', NULL, '{\"line\": null, \"site\": \"Industri\", \"lokasi_id\": 1, \"kode_asset\": \"FUR-A.0-001\", \"nama_asset\": \"NAMAIN\", \"kategori_id\": null, \"nama_lokasi\": null}', NULL, 'Asset baru ditambahkan', '2025-10-21 01:50:27'),
(14, 27, 'Create', NULL, '{\"line\": null, \"site\": \"Baros\", \"lokasi_id\": 2, \"kode_asset\": \"FUR-A.0-002\", \"nama_asset\": \"NAMAIN\", \"kategori_id\": 21, \"nama_lokasi\": \"1\"}', NULL, 'Asset baru ditambahkan', '2025-10-21 02:12:15'),
(15, 28, 'Create', NULL, '{\"line\": null, \"site\": \"Baros\", \"lokasi_id\": 1, \"kode_asset\": \"LCS-B.4-002\", \"nama_asset\": \"NAMANYA\", \"kategori_id\": 14, \"nama_lokasi\": \"2\"}', NULL, 'Asset baru ditambahkan', '2025-10-21 02:14:02'),
(16, 29, 'Create', NULL, '{\"line\": null, \"site\": \"Industri\", \"lokasi_id\": 2, \"kode_asset\": \"FUR-A.1-001\", \"nama_asset\": \"NAMNYA KAN\", \"kategori_id\": 21, \"nama_lokasi\": \"1\"}', NULL, 'Asset baru ditambahkan', '2025-10-21 02:17:02'),
(17, 30, 'Create', NULL, '{\"line\": null, \"site\": \"Industri\", \"lokasi_id\": 1, \"kode_asset\": \"MES-A.0-001\", \"nama_asset\": \"ASETIN\", \"kategori_id\": 12, \"nama_lokasi\": \"1\"}', NULL, 'Asset baru ditambahkan', '2025-10-21 10:05:37'),
(18, 31, 'Create', NULL, '{\"line\": \"BALINE\", \"site\": \"Baros\", \"lokasi_id\": null, \"kode_asset\": \"MES-A.1-001\", \"nama_asset\": \"LOHALA\", \"kategori_id\": 12, \"nama_lokasi\": \"BALOK\"}', NULL, 'Asset baru ditambahkan', '2025-11-06 07:21:32'),
(20, 34, 'Create', NULL, '{\"line\": \"Wood Line\", \"site\": \"Industri\", \"lokasi_id\": null, \"kode_asset\": \"dsbfwehfew\", \"nama_asset\": \"nsafbjwebfw\", \"kategori_id\": 25, \"nama_lokasi\": \"POS SECURITY\"}', NULL, 'Asset baru ditambahkan', '2025-11-12 09:32:47'),
(21, 44, 'Create', NULL, '{\"line\": \"PRD Kantor\", \"site\": \"Industri\", \"lokasi_id\": null, \"kode_asset\": \"hsfjkhjwehhwej\", \"nama_asset\": \"bdnfbsbhfbe\", \"kategori_id\": null, \"nama_lokasi\": \"GDIC\"}', NULL, 'Asset baru ditambahkan', '2025-11-13 04:29:39'),
(22, 45, 'Create', NULL, '{\"line\": \"PRD Kantor\", \"site\": \"Industri\", \"lokasi_id\": null, \"kode_asset\": \"hjkhehwfuiewrh\", \"nama_asset\": \"sbfbbfehhwe\", \"kategori_id\": null, \"nama_lokasi\": \"GEDUNG DEPAN INDUSTRI LT1\"}', NULL, 'Asset baru ditambahkan', '2025-11-13 06:02:43'),
(25, 49, 'Create', NULL, '{\"line\": \"PRD Kantor\", \"site\": \"Industri\", \"lokasi_id\": null, \"kode_asset\": \"DIE-A.1-001\", \"nama_asset\": \"hfsfbbabfasjbfdsgf\", \"kategori_id\": 24, \"nama_lokasi\": \"POS SECURITY\"}', NULL, 'Asset baru ditambahkan', '2025-11-13 06:57:08'),
(26, 51, 'Create', NULL, '{\"line\": \"Gudang Lansir\", \"site\": \"Industri\", \"lokasi_id\": null, \"kode_asset\": \"MOU-A.0-001\", \"nama_asset\": \"ncmdnfjsjfwe\", \"kategori_id\": 23, \"nama_lokasi\": \"LORONG ABSENSI\"}', NULL, 'Asset baru ditambahkan', '2025-11-14 01:49:14');

-- --------------------------------------------------------

--
-- Table structure for table `tbl_capex`
--

CREATE TABLE `tbl_capex` (
  `id_capex` int NOT NULL,
  `no` int DEFAULT NULL,
  `biaya` varchar(255) DEFAULT NULL,
  `cost_center` varchar(100) DEFAULT NULL,
  `jumlah` int DEFAULT NULL,
  `harga` decimal(18,2) DEFAULT NULL,
  `nilai_invest` varchar(255) DEFAULT NULL,
  `kategori` varchar(255) CHARACTER SET utf8mb4  DEFAULT NULL,
  `rencana_kedatangan` varchar(100) DEFAULT NULL,
  `umur_ekonomis` int DEFAULT NULL,
  `depresiasi_perbulan` varchar(150) DEFAULT NULL,
  `account` varchar(200) DEFAULT NULL,
  `tahun` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_capex`
--

INSERT INTO `tbl_capex` (`id_capex`, `no`, `biaya`, `cost_center`, `jumlah`, `harga`, `nilai_invest`, `kategori`, `rencana_kedatangan`, `umur_ekonomis`, `depresiasi_perbulan`, `account`, `tahun`) VALUES
(1, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(2, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(3, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(4, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(5, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(6, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(7, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(8, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(9, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(10, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(11, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(12, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(13, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(14, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(15, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(16, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(17, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(18, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(19, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(20, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023),
(21, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(22, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(23, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(24, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(25, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(26, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(27, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(28, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(29, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(30, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(31, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(32, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(33, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(34, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(35, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(36, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(37, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(38, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(39, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(40, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023),
(41, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(42, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(43, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(44, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(45, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(46, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(47, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(48, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(49, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(50, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(51, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(52, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(53, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(54, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(55, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(56, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(57, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(58, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(59, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(60, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023),
(61, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(62, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(63, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(64, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(65, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(66, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(67, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(68, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(69, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(70, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(71, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(72, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(73, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(74, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(75, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(76, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(77, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(78, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(79, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(80, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023),
(81, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(82, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(83, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(84, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(85, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(86, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(87, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(88, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(89, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(90, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(91, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(92, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(93, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(94, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(95, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(96, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(97, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(98, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(99, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(100, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023),
(101, 1, 'Asset 01', 'CC-001', 1, '15000000.00', '15000000', 'Kendaraan', 'Des ', 72, '208333.32999999998719', '15010001', 2025),
(102, 2, 'Asset 02', 'CC-002', 5, '20000000.00', '100000000', 'Kendaraan', 'Des ', 84, '1190476.18999999994412', '15010002', 2025),
(103, 3, 'Asset 03', 'CC-003', 5, '50000000.00', '250000000', 'Infrastruktur', 'Mei ', 84, '2976190.47999999998137', '15010003', 2025),
(104, 4, 'Asset 04', 'CC-004', 2, '15000000.00', '30000000', 'Mesin Produksi', 'Des ', 48, '625000', '15010004', 2022),
(105, 5, 'Asset 05', 'CC-005', 1, '50000000.00', '50000000', 'Infrastruktur', 'Des ', 84, '595238.099999999976717', '15010005', 2024),
(106, 6, 'Asset 06', 'CC-006', 1, '5000000.00', '5000000', 'Kendaraan', 'Des ', 60, '83333.33000000000175', '15010006', 2022),
(107, 7, 'Asset 07', 'CC-007', 2, '50000000.00', '100000000', 'Kendaraan', 'Mei ', 72, '1388888.88999999989755', '15010007', 2025),
(108, 8, 'Asset 08', 'CC-008', 3, '20000000.00', '60000000', 'Infrastruktur', 'Des ', 36, '1666666.66999999992549', '15010008', 2024),
(109, 9, 'Asset 09', 'CC-009', 5, '20000000.00', '100000000', 'Security', 'Des ', 72, '1388888.88999999989755', '15010009', 2024),
(110, 10, 'Asset 10', 'CC-010', 5, '10000000.00', '50000000', 'Peralatan IT', 'Des ', 48, '1041666.67000000004191', '15010010', 2023),
(111, 11, 'Asset 11', 'CC-011', 5, '5000000.00', '25000000', 'Security', 'Mei ', 84, '297619.049999999988358', '15010011', 2023),
(112, 12, 'Asset 12', 'CC-012', 3, '50000000.00', '150000000', 'Kendaraan', 'Des ', 60, '2500000', '15010012', 2021),
(113, 13, 'Asset 13', 'CC-013', 1, '5000000.00', '5000000', 'Security', 'Des ', 60, '83333.33000000000175', '15010013', 2021),
(114, 14, 'Asset 14', 'CC-014', 2, '15000000.00', '30000000', 'Kendaraan', 'Des ', 72, '416666.6699999999837', '15010014', 2023),
(115, 15, 'Asset 15', 'CC-015', 2, '10000000.00', '20000000', 'Mesin Produksi', 'Mei ', 60, '333333.3300000000163', '15010015', 2022),
(116, 16, 'Asset 16', 'CC-016', 5, '7500000.00', '37500000', 'Security', 'Des ', 84, '446428.57000000000698', '15010016', 2023),
(117, 17, 'Asset 17', 'CC-017', 2, '7500000.00', '15000000', 'Mesin Produksi', 'Des ', 72, '208333.32999999998719', '15010017', 2021),
(118, 18, 'Asset 18', 'CC-018', 1, '10000000.00', '10000000', 'Infrastruktur', 'Des ', 48, '208333.32999999998719', '15010018', 2024),
(119, 19, 'Asset 19', 'CC-019', 5, '5000000.00', '25000000', 'Mesin Produksi', 'Mei ', 72, '347222.21999999997206', '15010019', 2024),
(120, 20, 'Asset 20', 'CC-020', 2, '15000000.00', '30000000', 'Security', 'Jan', 84, '357142.85999999998603', '15010020', 2023);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_comp`
--

CREATE TABLE `tbl_comp` (
  `comp_code` varchar(10) NOT NULL,
  `name_company` varchar(40) CHARACTER SET utf8mb4  NOT NULL,
  `deskripsi` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_comp`
--

INSERT INTO `tbl_comp` (`comp_code`, `name_company`, `deskripsi`, `created_at`, `updated_at`, `deleted_at`) VALUES
('CINT', 'Chitose Internasional Tbk.', 'Mable', '2025-09-15 03:10:50', '2025-09-15 03:18:32', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_dept`
--

CREATE TABLE `tbl_dept` (
  `dept_id` int NOT NULL,
  `dept_name` varchar(60) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_dept`
--

INSERT INTO `tbl_dept` (`dept_id`, `dept_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '0. UTAMA', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL),
(2, 'OPERASIONAL', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL),
(3, '1. ADMINISTRASI & KEUANGAN', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL),
(4, '2. SALES & MARKETING', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL),
(5, '3. BUSINESS DEVELOPMENT', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL),
(6, '4. PRODUKSI', '2025-09-08 06:11:03', '2025-09-08 06:11:03', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_inventory`
--

CREATE TABLE `tbl_inventory` (
  `id_invest` int NOT NULL,
  `kode_asset` varchar(25) DEFAULT NULL,
  `kode_invent_lama` varchar(50) CHARACTER SET utf8mb4  DEFAULT NULL,
  `asset_sap` varchar(15) DEFAULT NULL,
  `digunakan` varchar(50) DEFAULT NULL,
  `tgl_pengajuan` date DEFAULT NULL,
  `dept_id` varchar(50) DEFAULT NULL,
  `asset_name` varchar(200) DEFAULT NULL,
  `kategori` varchar(200) DEFAULT NULL,
  `deskripsi` varchar(255) DEFAULT NULL,
  `estimasi_harga` int DEFAULT NULL,
  `masa_pakai` int DEFAULT NULL,
  `site` varchar(200) DEFAULT NULL,
  `nama_lokasi` varchar(200) DEFAULT NULL,
  `lokasi_name` varchar(200) DEFAULT NULL,
  `penawaran` varchar(100) DEFAULT NULL,
  `f002` varchar(100) DEFAULT NULL,
  `feasibility` varchar(100) DEFAULT NULL,
  `LAUC` varchar(100) DEFAULT NULL,
  `capex` varchar(25) DEFAULT NULL,
  `cross_capex` varchar(25) DEFAULT NULL,
  `tipe_asset` varchar(50) DEFAULT NULL,
  `auc` varchar(100) DEFAULT NULL,
  `kegunaan` varchar(255) DEFAULT NULL,
  `qty` int DEFAULT NULL,
  `satuan` varchar(50) DEFAULT NULL,
  `alasan_tdk_setuju` varchar(255) DEFAULT NULL,
  `status` enum('pengajuan','approve_manager','reject_manager','approve_direksi','reject_direksi','fiaco_input','selesai') DEFAULT 'pengajuan',
  `asset_class` varchar(100) DEFAULT NULL,
  `kode_asset_auc` varchar(100) DEFAULT NULL,
  `kode_asset_sap` varchar(100) DEFAULT NULL,
  `tgl_reclass` date DEFAULT NULL,
  `bast` varchar(255) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_inventory`
--

INSERT INTO `tbl_inventory` (`id_invest`, `kode_asset`, `kode_invent_lama`, `asset_sap`, `digunakan`, `tgl_pengajuan`, `dept_id`, `asset_name`, `kategori`, `deskripsi`, `estimasi_harga`, `masa_pakai`, `site`, `nama_lokasi`, `lokasi_name`, `penawaran`, `f002`, `feasibility`, `LAUC`, `capex`, `cross_capex`, `tipe_asset`, `auc`, `kegunaan`, `qty`, `satuan`, `alasan_tdk_setuju`, `status`, `asset_class`, `kode_asset_auc`, `kode_asset_sap`, `tgl_reclass`, `bast`, `foto`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'MES-A.0-001', NULL, NULL, NULL, '2025-10-21', '1', 'ASETIN', '12', NULL, 2147483647, 10, 'Industri', NULL, NULL, NULL, NULL, NULL, NULL, 'ya', NULL, 'tanah', 'ya', 'GUNAIN', 19, 'Hektar', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-21 08:50:23', '2025-10-21 08:50:23', '2025-10-21 08:50:23'),
(2, 'SOF-A.0-001', NULL, NULL, NULL, '2025-10-21', '1', 'NAMAIN', '13', NULL, 908000000, 10, 'Industri', NULL, NULL, NULL, NULL, NULL, NULL, 'ya', NULL, 'mesin', 'ya', 'GUNAIN', 19, 'UNIT', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-21 08:57:46', '2025-10-21 08:57:46', '2025-10-21 08:57:46'),
(3, 'KEN-A.0-001', NULL, NULL, NULL, '2025-10-22', '1', 'ASETIN', '22', NULL, 980000000, 10, 'Subkom', NULL, NULL, NULL, NULL, NULL, NULL, 'ya', NULL, 'tanah', 'ya', 'Gunain', 19, 'hektar', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-22 06:15:13', '2025-10-22 06:15:13', '2025-10-22 06:15:13'),
(4, 'SOF-A.0-002', NULL, NULL, NULL, '2025-10-23', '1', 'ASETAIN', '13', NULL, 2147483647, 10, 'Industri', NULL, NULL, 'uploads/pdf1761182346_44ac7f9bb42c8ee6bdb7.pdf', 'uploads/pdf1761182346_478e5c0aa3b8644ed214.pdf', 'uploads/pdf1761182346_d782db1839b004441a28.pdf', 'uploads/pdf1761182346_bcc7cef57bb111f30687.pdf', 'ya', NULL, 'mesin', 'ya', 'gunain', 10, 'unit', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-23 01:19:06', '2025-10-23 01:19:06', '2025-10-23 01:19:06'),
(5, 'JIP-A.0-001', NULL, NULL, NULL, '2025-10-27', '1', 'NAMANYA', '25', NULL, 0, 9, 'Baros', NULL, NULL, 'uploads/pdf1761531604_6051484bcb2208d6e6ec.pdf', 'uploads/pdf1761531604_e354ec14e8c84d473310.pdf', 'uploads/pdf1761531604_54b9e52736f31af1924c.pdf', 'uploads/pdf1761531604_6b599973a7cfed27e8d1.pdf', 'ya', NULL, 'tanah', 'ya', 'GUNAIN', 19, 'hektar', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-27 02:20:04', '2025-10-27 02:20:04', '2025-10-27 02:20:04'),
(6, 'SOF-A.0-003', NULL, NULL, NULL, '2025-10-27', '1', 'ASSETTT', '13', NULL, 980000000, 10, 'Industri', 'INDSIP', 'INDILIN', 'uploads/pdf1761532822_bcf0befd0077dff78c55.pdf', 'uploads/pdf1761532822_0cba3120e4e5e1b9524c.pdf', 'uploads/pdf1761532822_5d8c28da3db5b9dfd87e.pdf', 'uploads/pdf1761532822_880e4e14be7df436d584.pdf', 'ya', NULL, 'inventaris_kantor', 'ya', 'gunain', 19, 'unit', '', 'selesai', 'BANGUNAN', '18181818', '28282828', '2025-11-05', 'BAST', NULL, '2025-10-27 02:40:22', '2025-11-04 23:37:52', '2025-10-27 02:40:22'),
(7, 'DIE-A.1-001', NULL, NULL, NULL, '2025-10-27', '3', 'NAMAIN YAA', '24', 'Detail banget', 98000000, 10, 'Industri', 'INDSIP', 'INDILIN', 'uploads/pdf1761534876_9d5d7fa01eb18cf8940c.pdf', 'uploads/pdf1761534876_a7eaae044db68b976b68.pdf', 'uploads/pdf1761534876_788c864b1ee33040de33.pdf', 'uploads/pdf1761534876_46a88bce559dcbb16907.pdf', 'tidak', NULL, 'INVENTARIS KANTOR', 'Tidak', 'GUNAIN', 10, 'unit', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-27 03:14:36', '2025-10-27 03:14:36', '2025-10-27 03:14:36'),
(8, 'MUL-A.1-001', NULL, NULL, NULL, '2025-10-27', '3', 'Cannon', '20', 'bisa jepret', 0, 10, 'Baros', 'BALOK', 'BLINE', 'uploads/pdf1761535264_af076d9a8e710a325ef7.pdf', 'uploads/pdf1761535264_4294d4907078bc2481f2.pdf', 'uploads/pdf1761535264_bcdc34ab747092648174.pdf', 'uploads/pdf1761535264_7bad8e1c5dcfb59d50f4.pdf', 'tidak', NULL, 'INVENTARIS KANTOR', 'Ya', 'Gunain', 10, 'unit', '', 'selesai', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-27 03:21:04', '2025-11-04 23:12:56', '2025-10-27 03:21:04'),
(9, 'JIN-A.1-001', NULL, NULL, NULL, '2025-11-14', '3', 'BMW', '26', 'sandjnajsjfbwbwewf', 102000000, 1, 'Industri', 'CIWS (gudang nailing)', 'GEDUNG DEPAN INDUSTRI LT1', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1FD9.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1FDA.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1FEB.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1FFB.tmp', 'ya', 'Ya', 'BANGUNAN', 'Ya', 'Gunain', 19, 'unit', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-10-27 03:24:35', '2025-11-14 08:06:55', '2025-10-27 03:24:35'),
(22, 'MES-A.0-003', NULL, NULL, NULL, '2025-11-14', '1', 'ASEETIN', '12', 'FSF NBF SDFE', 19, 1, 'Baros', 'TOILET', 'PRODUKSI BAROS', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1A08.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1A09.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1A0A.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php1A1A.tmp', 'ya', 'Tidak', 'TANAH', '', 'snfjwehncshcherhfiw', 1, 'unit', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-14 06:29:05', '2025-11-14 06:31:52', NULL),
(23, 'MOU-A.0-001', NULL, NULL, NULL, '2025-11-14', '1', 'bsdbnbfansbhjfbwebfwenj', '23', 'nsabfwehbfwebfnmwe', 18, 1, 'Baros', 'GUDANG FG', 'PRODUKSI BAROS', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php8937.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php8948.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php8958.tmp', 'C:\\Users\\ASUS\\AppData\\Local\\Temp\\php8959.tmp', 'ya', 'Ya', 'TANAH', 'Ya', 'samnbfasbhbwfw', 1, 'duidinrnr', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-14 06:49:38', '2025-11-14 08:05:11', NULL),
(24, 'MOU-A.0-002', 'dbnsbfbhwbefbwe', 'wbfnwbenfbwnb', 'aktif', NULL, '1', 'fnabnfbwebfbhw', '23', NULL, 20, 1, 'Industri', 'LORONG ABSENSI', 'Wood Line', NULL, NULL, NULL, NULL, NULL, NULL, 'bangunan', NULL, 's fnbenfbbwehbfweb jenfjewjf', 1, 'snfnebjfbwjebfw', NULL, 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-14 07:27:12', '2025-11-14 09:00:54', NULL),
(25, 'IMO-A.1-001', 'APC-02', '1703000', 'aktif', NULL, '3', 'Pneumatic Riveting Machine-02', '27', NULL, 10000000, 1, 'Industri', 'GDIC', 'Wood Line', NULL, NULL, NULL, NULL, NULL, NULL, 'tanah', NULL, 'AGDADNEUANDS', 1, 'Unit', NULL, 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-17 01:58:00', '2025-11-17 01:58:00', NULL),
(26, 'KEN-A.1-001', 'APC-03', '1703000', 'aktif', NULL, '3', 'Press Pneumatic LegPlastic Cup-1 (Kawai/Roland)', '22', NULL, 199000, 2, 'Industri', 'LORONG ABSENSI', 'PRD Kantor', NULL, NULL, NULL, NULL, NULL, NULL, 'tanah', NULL, 'GUNAIN', 1, 'unit', NULL, 'approve_direksi', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-17 02:02:05', '2025-11-17 02:11:17', NULL),
(27, 'PC-A.1-001', NULL, NULL, NULL, '2025-11-17', '3', 'ASETNYA', '17', NULL, 10000, 1, 'Industri', 'POS SECURITY', 'Gudang Lansir', 'uploads/pdf/penawaran/1763345066_12337ed7dfa1422d1056.pdf', 'uploads/pdf/f002/1763345066_80448f42ee567b15e409.pdf', 'uploads/pdf/feasibility/1763345066_81f0acc72ee7f74b82bb.pdf', 'uploads/pdf/auc/ 1763345066_0fa38c92a6d8441080ba.pdf', 'ya', 'Ya', 'BANGUNAN', 'Tidak', 'NJSJABJBAF', 1, 'unit', '', 'pengajuan', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-17 02:04:26', '2025-11-17 02:04:26', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_kategori`
--

CREATE TABLE `tbl_kategori` (
  `kategori_id` int NOT NULL,
  `kategori_name` varchar(35) CHARACTER SET utf8mb4  DEFAULT NULL,
  `inisial` varchar(10) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_kategori`
--

INSERT INTO `tbl_kategori` (`kategori_id`, `kategori_name`, `inisial`, `created_at`, `updated_at`, `deleted_at`) VALUES
(12, 'MESIN', 'MES', '2025-08-27 02:07:14', '2025-09-26 00:06:45', NULL),
(13, 'SOFTWARE', 'SOF', '2025-08-27 02:08:45', '2025-09-15 04:16:56', NULL),
(14, 'LICENSE', 'LCS', '2025-08-27 02:08:45', '2025-09-15 04:16:56', NULL),
(17, 'PC', 'PC', '2025-08-27 02:11:23', '2025-09-15 04:16:56', NULL),
(18, 'LAPTOP', 'LAP', '2025-08-27 02:11:23', '2025-09-15 04:16:56', NULL),
(19, 'SERVER', 'SER', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(20, 'MULTIMEDIA', 'MUL', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(21, 'FURNITURE', 'FUR', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(22, 'KENDARAAN', 'KEN', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(23, 'MOULD', 'MOU', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(24, 'DIES', 'DIE', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(25, 'JIG PROSES', 'JIP', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(26, 'JIG INSPECTION', 'JIN', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(27, 'INJECTION MOULD', 'IMO', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(28, 'ALAT PABRIK', 'APA', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(29, 'SPAREPART MESIN', 'SME', '2025-08-27 02:17:11', '2025-09-15 04:16:56', NULL),
(37, 'COBAIN', 'CO', '2025-09-02 18:21:39', '2025-09-15 04:16:56', NULL),
(38, 'TAMBAHIN', 'TA', '2025-09-02 20:54:57', '2025-09-15 04:16:56', NULL),
(39, 'KETAMBAHAN', 'KET', '2025-09-03 00:02:56', '2025-09-15 04:16:56', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_lokasi`
--

CREATE TABLE `tbl_lokasi` (
  `lokasi_id` smallint NOT NULL,
  `comp_code` varchar(10) DEFAULT NULL,
  `lokasi_name` varchar(50) CHARACTER SET utf8mb4  NOT NULL COMMENT 'Line/area',
  `nama_lokasi` varchar(255) DEFAULT NULL COMMENT 'buat nama perusahaan',
  `site` varchar(255) DEFAULT NULL,
  `status` varchar(25) CHARACTER SET utf8mb4  DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ;

--
-- Dumping data for table `tbl_lokasi`
--

INSERT INTO `tbl_lokasi` (`lokasi_id`, `comp_code`, `lokasi_name`, `nama_lokasi`, `site`, `status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'CINT', 'RND', 'RND', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(2, 'CINT', 'GDIC', 'GDIC', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(3, 'CINT', 'QC', 'QC', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(4, 'CINT', 'CICR (NSB)', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(5, 'CINT', 'Lab PK', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(6, 'CINT', 'CICT (multibanding)', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(7, 'CINT', 'CIWS (gudang nailing)', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(8, 'CINT', 'CIWS (gudang WIP)', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(9, 'CINT', 'Nailing', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(10, 'CINT', 'PRD Kantor', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(11, 'CINT', 'Assembling Industri', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(12, 'CINT', 'Assembling Baros', 'PRODUKSI BAROS', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(13, 'CINT', 'Wood Line', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(14, 'CINT', 'Gudang Lansir', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(15, 'CINT', 'Gudang CPRO', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(16, 'CINT', 'CT Yamato', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(17, 'CINT', 'Engineering', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(18, 'CINT', 'PPIC', 'KANTOR SCM', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(19, 'CINT', 'CMS', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(20, 'CINT', 'PCH', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(21, 'CINT', 'HC', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(22, 'CINT', 'RM Woodline', 'PRODUKSI INDUSTRI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(23, 'CINT', 'Absen PPIC I', 'LORONG ABSENSI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(24, 'CINT', 'Absen PPIC II', 'LORONG ABSENSI', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(25, 'CINT', 'Security Industri', 'POS SECURITY', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(26, 'CINT', 'Security Baros', 'POS SECURITY', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(27, 'CINT', 'HC (Toilet Tamu)', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(28, 'CINT', 'FIACO', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(29, 'CINT', 'Officer Lt 2', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(30, 'CINT', 'Officer Lt 3', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(31, 'CINT', 'IT', 'GEDUNG DEPAN INDUSTRI LT1', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(32, 'CINT', 'Cafetaria', 'KANTIN', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(33, 'CINT', 'Daishogun', 'GEDUNG DAISHOGUN', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(34, 'CINT', 'Server Bawah', 'GEDUNGTENGAH INDUSTRI LT2', 'Industri', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(35, 'CINT', 'LOBBY', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(36, 'CINT', 'AUDITORIUM', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(37, 'CINT', 'TOILET', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(38, 'CINT', 'WHSA', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(39, 'CINT', 'GENSET ENGINERIING', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(40, 'CINT', 'GUDANG FG', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(41, 'CINT', 'CIWB', 'GEDUNG BAROS LT1', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(42, 'CINT', 'OFFICE LT 2', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(43, 'CINT', 'R. MEET DIREKSI', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(44, 'CINT', 'R. MEETING KECIL 1', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(45, 'CINT', 'SERVER IT', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(46, 'CINT', 'AREA LOKER', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(47, 'CINT', 'R. SUSANTO', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(48, 'CINT', 'PANTRY', 'GEDUNG BAROS LT2', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL),
(49, 'CINT', 'SHOWROOM', 'GEDUNG BAROS LT3', 'BAROS', 'AKTIF', '2025-11-10 09:01:43', '2025-11-10 09:01:43', NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `overview`
--
ALTER TABLE `overview`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_aset`
--
ALTER TABLE `tbl_aset`
  ADD PRIMARY KEY (`asset_id`),
  ADD UNIQUE KEY `kode_asset` (`kode_asset`),
  ADD KEY `fk_aset_lokasi` (`lokasi_id`),
  ADD KEY `fk_aset_kategori` (`kategori_id`),
  ADD KEY `idx_nik_pic` (`nik_pic`),
  ADD KEY `idx_dept_id` (`dept_id`);

--
-- Indexes for table `tbl_asset_counter`
--
ALTER TABLE `tbl_asset_counter`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_kategori_dept` (`kategori_id`,`dept_id`),
  ADD KEY `fk_counter_kategori` (`kategori_id`),
  ADD KEY `fk_counter_dept` (`dept_id`);

--
-- Indexes for table `tbl_asset_history`
--
ALTER TABLE `tbl_asset_history`
  ADD PRIMARY KEY (`history_id`),
  ADD KEY `fk_history_asset` (`asset_id`),
  ADD KEY `idx_action` (`action`),
  ADD KEY `idx_user` (`user_nik`);

--
-- Indexes for table `tbl_capex`
--
ALTER TABLE `tbl_capex`
  ADD PRIMARY KEY (`id_capex`);

--
-- Indexes for table `tbl_comp`
--
ALTER TABLE `tbl_comp`
  ADD PRIMARY KEY (`comp_code`);

--
-- Indexes for table `tbl_dept`
--
ALTER TABLE `tbl_dept`
  ADD PRIMARY KEY (`dept_id`);

--
-- Indexes for table `tbl_inventory`
--
ALTER TABLE `tbl_inventory`
  ADD PRIMARY KEY (`id_invest`);

--
-- Indexes for table `tbl_kategori`
--
ALTER TABLE `tbl_kategori`
  ADD PRIMARY KEY (`kategori_id`);

--
-- Indexes for table `tbl_lokasi`
--
ALTER TABLE `tbl_lokasi`
  ADD PRIMARY KEY (`lokasi_id`),
  ADD KEY `fk_lokasi_company` (`comp_code`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `overview`
--
ALTER TABLE `overview`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbl_aset`
--
ALTER TABLE `tbl_aset`
  MODIFY `asset_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

--
-- AUTO_INCREMENT for table `tbl_asset_counter`
--
ALTER TABLE `tbl_asset_counter`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbl_asset_history`
--
ALTER TABLE `tbl_asset_history`
  MODIFY `history_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `tbl_capex`
--
ALTER TABLE `tbl_capex`
  MODIFY `id_capex` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=121;

--
-- AUTO_INCREMENT for table `tbl_dept`
--
ALTER TABLE `tbl_dept`
  MODIFY `dept_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `tbl_inventory`
--
ALTER TABLE `tbl_inventory`
  MODIFY `id_invest` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `tbl_kategori`
--
ALTER TABLE `tbl_kategori`
  MODIFY `kategori_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT for table `tbl_lokasi`
--
ALTER TABLE `tbl_lokasi`
  MODIFY `lokasi_id` smallint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `tbl_aset`
--
ALTER TABLE `tbl_aset`
  ADD CONSTRAINT `fk_aset_kategori` FOREIGN KEY (`kategori_id`) REFERENCES `tbl_kategori` (`kategori_id`) ON DELETE RESTRICT ON UPDATE CASCADE;

--
-- Constraints for table `tbl_asset_counter`
--
ALTER TABLE `tbl_asset_counter`
  ADD CONSTRAINT `fk_counter_kategori` FOREIGN KEY (`kategori_id`) REFERENCES `tbl_kategori` (`kategori_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `tbl_asset_history`
--
ALTER TABLE `tbl_asset_history`
  ADD CONSTRAINT `fk_history_asset` FOREIGN KEY (`asset_id`) REFERENCES `tbl_aset` (`asset_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `tbl_lokasi`
--
ALTER TABLE `tbl_lokasi`
  ADD CONSTRAINT `fk_lokasi_company` FOREIGN KEY (`comp_code`) REFERENCES `tbl_comp` (`comp_code`) ON DELETE RESTRICT ON UPDATE CASCADE;
COMMIT;

