/*
 Navicat Premium Dump SQL

 Source Server         : MysqlLocal
 Source Server Type    : MySQL
 Source Server Version : 80403 (8.4.3)
 Source Host           : localhost:3306
 Source Schema         : tambak

 Target Server Type    : MySQL
 Target Server Version : 80403 (8.4.3)
 File Encoding         : 65001

 Date: 21/04/2026 06:13:19
*/


-- ----------------------------
-- Table structure for activity_logs
-- ----------------------------
CREATE TABLE `activity_logs`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NULL DEFAULT NULL,
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `module` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `model_id` bigint UNSIGNED NULL DEFAULT NULL,
  `old_values` json NULL,
  `new_values` json NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `activity_logs_user_id_foreign`(`user_id` ASC) USING BTREE,
  INDEX `activity_logs_model_type_model_id_index`(`model_type` ASC, `model_id` ASC) USING BTREE,
  INDEX `activity_logs_action_index`(`action` ASC) USING BTREE,
  INDEX `activity_logs_module_index`(`module` ASC) USING BTREE,
  CONSTRAINT `activity_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of activity_logs
-- ----------------------------
INSERT INTO `activity_logs` VALUES (1, 2, 'update', 'supplier', 'Update Supplier: PT. GUNAWAN (G00001)', NULL, NULL, NULL, '{\"new\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:41:52.000000Z\", \"limit_hutang\": \"25000000.00\", \"kontak_person\": \"H. Gunawan\"}, \"old\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:17:41.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-13 03:41:52', '2026-04-13 03:41:52');
INSERT INTO `activity_logs` VALUES (2, 2, 'update', 'supplier', 'Update Supplier: PT. GUNAWAN (G00001)', NULL, NULL, NULL, '{\"new\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:42:08.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}, \"old\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:41:52.000000Z\", \"limit_hutang\": \"25000000.00\", \"kontak_person\": \"H. Gunawan\"}}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-13 03:42:08', '2026-04-13 03:42:08');
INSERT INTO `activity_logs` VALUES (3, 2, 'update', 'supplier', 'Update Supplier: PT. GUNAWAN (G00001)', NULL, NULL, NULL, '{\"new\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": false, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:45:47.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}, \"old\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:42:08.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-13 03:45:47', '2026-04-13 03:45:47');
INSERT INTO `activity_logs` VALUES (4, 2, 'update', 'supplier', 'Update Supplier: PT. GUNAWAN (G00001)', NULL, NULL, NULL, '{\"new\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": true, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:45:55.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}, \"old\": {\"id\": 4, \"kode\": \"G00001\", \"nama\": \"PT. GUNAWAN\", \"npwp\": \"01.234.567.8-902.000\", \"email\": \"sales@gunawan.com\", \"tenor\": 45, \"alamat\": \"Jl. Industri No. 45\", \"telepon\": \"081234567891\", \"is_active\": false, \"created_at\": \"2026-04-12T20:17:41.000000Z\", \"deleted_at\": null, \"updated_at\": \"2026-04-12T20:45:47.000000Z\", \"limit_hutang\": \"75000000.00\", \"kontak_person\": \"H. Gunawan\"}}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-13 03:45:55', '2026-04-13 03:45:55');
INSERT INTO `activity_logs` VALUES (5, 2, 'create', 'pakan', 'Pakan 12 KG untuk kolam A01', 'App\\Models\\TPakan', 1, NULL, '{\"id\": 1, \"kolam\": \"A01\", \"jumlah\": \"12.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T13:40:01.000000Z\", \"created_by\": 2, \"keterangan\": \"12\", \"updated_at\": \"2026-04-15T13:40:01.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-15T05:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 20:40:01', '2026-04-15 20:40:01');
INSERT INTO `activity_logs` VALUES (6, 2, 'create', 'pakan', 'Pakan 12 KG untuk kolam A01', 'App\\Models\\TPakan', 2, NULL, '{\"id\": 2, \"kolam\": \"A01\", \"jumlah\": \"12.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T13:40:01.000000Z\", \"created_by\": 2, \"keterangan\": \"12\", \"updated_at\": \"2026-04-15T13:40:01.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-15T05:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 20:40:01', '2026-04-15 20:40:01');
INSERT INTO `activity_logs` VALUES (7, 2, 'create', 'pakan', 'Pakan 12 KG untuk kolam A01', 'App\\Models\\TPakan', 3, NULL, '{\"id\": 3, \"kolam\": \"A01\", \"jumlah\": \"12.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T13:40:02.000000Z\", \"created_by\": 2, \"keterangan\": \"12\", \"updated_at\": \"2026-04-15T13:40:02.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-15T05:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 20:40:02', '2026-04-15 20:40:02');
INSERT INTO `activity_logs` VALUES (8, 2, 'create', 'pakan', 'Pakan 1 KG untuk kolam A02', 'App\\Models\\TPakan', 4, NULL, '{\"id\": 4, \"kolam\": \"A02\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T13:49:55.000000Z\", \"created_by\": 2, \"keterangan\": \"dfas\", \"updated_at\": \"2026-04-15T13:49:55.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-15T16:52:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 20:49:55', '2026-04-15 20:49:55');
INSERT INTO `activity_logs` VALUES (9, 2, 'create', 'pakan', 'Pakan 1 KG untuk kolam A02', 'App\\Models\\TPakan', 5, NULL, '{\"id\": 5, \"kolam\": \"A02\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T13:49:56.000000Z\", \"created_by\": 2, \"keterangan\": \"dfas\", \"updated_at\": \"2026-04-15T13:49:56.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-15T16:52:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 20:49:56', '2026-04-15 20:49:56');
INSERT INTO `activity_logs` VALUES (10, 2, 'create_batch', 'pakan', 'Batch input pakan: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 22:09:58', '2026-04-15 22:09:58');
INSERT INTO `activity_logs` VALUES (11, 2, 'create_batch', 'pakan', 'Batch input pakan: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 22:09:59', '2026-04-15 22:09:59');
INSERT INTO `activity_logs` VALUES (12, 2, 'update', 'pakan', 'Update data pakan ID 7', 'App\\Models\\TPakan', 7, '{\"id\": 7, \"kolam\": \"A01\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:58.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:09:58.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:12:00.000000Z\"}', '{\"id\": 7, \"kolam\": \"A01\", \"jumlah\": \"1.00\", \"satuan\": \"M3\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:58.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:10:33.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:12:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 22:10:33', '2026-04-15 22:10:33');
INSERT INTO `activity_logs` VALUES (13, 2, 'update', 'pakan', 'Update data pakan ID 9', 'App\\Models\\TPakan', 9, '{\"id\": 9, \"kolam\": \"A01\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:59.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:09:59.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:12:00.000000Z\"}', '{\"id\": 9, \"kolam\": \"A01\", \"jumlah\": \"0.90\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:59.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:11:01.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:12:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 22:11:01', '2026-04-15 22:11:01');
INSERT INTO `activity_logs` VALUES (14, 2, 'update', 'pakan', 'Update data pakan ID 6', 'App\\Models\\TPakan', 6, '{\"id\": 6, \"kolam\": \"A01\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-14T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:58.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:09:58.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:10:00.000000Z\"}', '{\"id\": 6, \"kolam\": \"A01\", \"jumlah\": \"1.00\", \"satuan\": \"LITER\", \"tanggal\": \"2026-04-13T17:00:00.000000Z\", \"created_at\": \"2026-04-15T15:09:58.000000Z\", \"created_by\": 2, \"keterangan\": null, \"updated_at\": \"2026-04-15T15:11:01.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 781\", \"waktu_pemberian\": \"2026-04-14T18:10:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 22:11:01', '2026-04-15 22:11:01');
INSERT INTO `activity_logs` VALUES (15, 1, 'create_batch', 'pakan', 'Batch input pakan: 3 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 3}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:37:35', '2026-04-16 05:37:35');
INSERT INTO `activity_logs` VALUES (16, 1, 'create_batch', 'pakan', 'Batch input pakan: 3 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 3}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:37:36', '2026-04-16 05:37:36');
INSERT INTO `activity_logs` VALUES (17, 1, 'delete_batch', 'pakan', 'Hapus 6 data pakan', NULL, NULL, NULL, '{\"deleted_ids\": [\"23\", \"24\", \"26\", \"27\", \"22\", \"25\"]}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:38:10', '2026-04-16 05:38:10');
INSERT INTO `activity_logs` VALUES (18, 1, 'create_batch', 'pakan', 'Batch input pakan: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:55:25', '2026-04-16 05:55:25');
INSERT INTO `activity_logs` VALUES (19, 1, 'delete', 'pakan', 'Soft delete data pakan ID 28', NULL, NULL, '{\"id\": 28, \"kolam\": \"D01\", \"jumlah\": \"1.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T22:55:25.000000Z\", \"created_by\": 1, \"deleted_at\": null, \"keterangan\": \"pagi\", \"updated_at\": \"2026-04-15T22:55:25.000000Z\", \"jenis_pakan\": \"PAKAN UDANG SAKRAL 782\", \"waktu_pemberian\": \"2026-04-16T00:56:00.000000Z\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:55:49', '2026-04-16 05:55:49');
INSERT INTO `activity_logs` VALUES (20, 1, 'create_batch', 'pakan', 'Batch input pakan: 3 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 3}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:56:14', '2026-04-16 05:56:14');
INSERT INTO `activity_logs` VALUES (21, 1, 'update', 'pakan', 'Update data pakan ID 29', 'App\\Models\\TPakan', 29, '{\"id\": 29, \"kolam\": \"D01\", \"jumlah\": \"2.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T22:55:25.000000Z\", \"created_by\": 1, \"deleted_at\": null, \"keterangan\": \"siang\", \"updated_at\": \"2026-04-15T22:55:25.000000Z\", \"jenis_pakan\": \"PAKAN UDANG CHAMPION 2\", \"waktu_pemberian\": \"2026-04-16T00:58:00.000000Z\"}', '{\"id\": 29, \"kolam\": \"D02\", \"jumlah\": \"2.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T22:55:25.000000Z\", \"created_by\": 1, \"deleted_at\": null, \"keterangan\": \"siang\", \"updated_at\": \"2026-04-15T22:59:52.000000Z\", \"jenis_pakan\": \"PAKAN UDANG CHAMPION 2\", \"waktu_pemberian\": \"2026-04-16T00:58:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 05:59:52', '2026-04-16 05:59:52');
INSERT INTO `activity_logs` VALUES (22, 1, 'delete_batch', 'pakan', 'Soft delete 2 data pakan', NULL, NULL, NULL, '{\"deleted_ids\": [\"31\", \"30\"]}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 06:01:12', '2026-04-16 06:01:12');
INSERT INTO `activity_logs` VALUES (23, 1, 'delete_batch', 'pakan', 'Soft delete 2 data pakan', NULL, NULL, NULL, '{\"deleted_ids\": [\"29\", \"32\"]}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 06:16:46', '2026-04-16 06:16:46');
INSERT INTO `activity_logs` VALUES (24, 2, 'create_batch', 'pakan', 'Batch input pakan: 4 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 4}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 06:21:44', '2026-04-16 06:21:44');
INSERT INTO `activity_logs` VALUES (25, 2, 'update', 'pakan', 'Update data pakan ID 36', 'App\\Models\\TPakan', 36, '{\"id\": 36, \"kolam\": \"B04\", \"jumlah\": \"4.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T23:21:44.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"malam\", \"updated_at\": \"2026-04-15T23:21:44.000000Z\", \"jenis_pakan\": \"VITAMIN A FEED\", \"waktu_pemberian\": \"2026-04-16T12:24:00.000000Z\"}', '{\"id\": 36, \"kolam\": \"D02\", \"jumlah\": \"4.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T23:21:44.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"malam\", \"updated_at\": \"2026-04-15T23:22:05.000000Z\", \"jenis_pakan\": \"VITAMIN A FEED\", \"waktu_pemberian\": \"2026-04-16T12:24:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 06:22:05', '2026-04-16 06:22:05');
INSERT INTO `activity_logs` VALUES (26, 2, 'update', 'pakan', 'Update data pakan ID 36', 'App\\Models\\TPakan', 36, '{\"id\": 36, \"kolam\": \"D02\", \"jumlah\": \"4.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T23:21:44.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"malam\", \"updated_at\": \"2026-04-15T23:22:05.000000Z\", \"jenis_pakan\": \"VITAMIN A FEED\", \"waktu_pemberian\": \"2026-04-16T12:24:00.000000Z\"}', '{\"id\": 36, \"kolam\": \"C02\", \"jumlah\": \"4.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"created_at\": \"2026-04-15T23:21:44.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"malam\", \"updated_at\": \"2026-04-15T23:22:21.000000Z\", \"jenis_pakan\": \"VITAMIN A FEED\", \"waktu_pemberian\": \"2026-04-16T12:24:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 06:22:21', '2026-04-16 06:22:21');
INSERT INTO `activity_logs` VALUES (27, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-17 07:47:25', '2026-04-17 07:47:25');
INSERT INTO `activity_logs` VALUES (28, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-17 08:29:09', '2026-04-17 08:29:09');
INSERT INTO `activity_logs` VALUES (29, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-17 08:33:29', '2026-04-17 08:33:29');
INSERT INTO `activity_logs` VALUES (30, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 41', 'App\\Models\\TPemakaianBarang', 41, '{\"id\": 41, \"kolam\": \"B01\", \"jumlah\": \"50.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-16T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi\", \"updated_at\": \"2026-04-17T01:33:29.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '{\"id\": 41, \"kolam\": \"B01\", \"jumlah\": \"50.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-03-31T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi\", \"updated_at\": \"2026-04-18T04:19:14.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-18 11:19:14', '2026-04-18 11:19:14');
INSERT INTO `activity_logs` VALUES (31, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 41', 'App\\Models\\TPemakaianBarang', 41, '{\"id\": 41, \"kolam\": \"B01\", \"jumlah\": \"50.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-03-31T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi\", \"updated_at\": \"2026-04-18T04:19:14.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '{\"id\": 41, \"kolam\": \"A02\", \"jumlah\": \"10.00\", \"satuan\": \"4\", \"tanggal\": \"2026-04-01T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi malam\", \"updated_at\": \"2026-04-18T04:29:33.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Mobile Safari/537.36', '2026-04-18 11:29:33', '2026-04-18 11:29:33');
INSERT INTO `activity_logs` VALUES (32, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 39', 'App\\Models\\TPemakaianBarang', 39, '{\"id\": 39, \"kolam\": \"B10\", \"jumlah\": \"10.00\", \"satuan\": \"KG\", \"tanggal\": \"2026-04-16T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:29:09.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi\", \"updated_at\": \"2026-04-17T01:29:09.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:27:00.000000Z\"}', '{\"id\": 39, \"kolam\": \"B13\", \"jumlah\": \"10.00\", \"satuan\": \"5\", \"tanggal\": \"2026-04-16T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:29:09.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi siang\", \"updated_at\": \"2026-04-18T04:29:33.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:27:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Mobile Safari/537.36', '2026-04-18 11:29:33', '2026-04-18 11:29:33');
INSERT INTO `activity_logs` VALUES (33, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 39', 'App\\Models\\TPemakaianBarang', 39, '{\"id\": 39, \"kolam\": \"B13\", \"jumlah\": \"10.00\", \"satuan\": \"5\", \"tanggal\": \"2026-04-16T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:29:09.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi siang\", \"updated_at\": \"2026-04-18T04:29:33.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:27:00.000000Z\"}', '{\"id\": 39, \"kolam\": \"TANDON3\", \"jumlah\": \"10.00\", \"satuan\": \"5\", \"tanggal\": \"2026-04-04T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:29:09.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi siang\", \"updated_at\": \"2026-04-18T04:31:13.000000Z\", \"jenis_barang\": \"PROBIOTIK PLUS\", \"waktu_pemberian\": \"2026-04-18T01:27:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-18 11:31:13', '2026-04-18 11:31:13');
INSERT INTO `activity_logs` VALUES (34, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 41', 'App\\Models\\TPemakaianBarang', 41, '{\"id\": 41, \"kolam\": \"A02\", \"jumlah\": \"10.00\", \"satuan\": \"4\", \"tanggal\": \"2026-04-01T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi malam\", \"updated_at\": \"2026-04-18T04:29:33.000000Z\", \"jenis_barang\": \"PAKAN UDANG STAR FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '{\"id\": 41, \"kolam\": \"TANDON3\", \"jumlah\": \"10.00\", \"satuan\": \"6\", \"tanggal\": \"2026-04-03T17:00:00.000000Z\", \"created_at\": \"2026-04-17T01:33:29.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"pagi malam\", \"updated_at\": \"2026-04-18T04:31:13.000000Z\", \"jenis_barang\": \"VITAMIN A FEED\", \"waktu_pemberian\": \"2026-04-18T01:32:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-18 11:31:13', '2026-04-18 11:31:13');
INSERT INTO `activity_logs` VALUES (35, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-19 12:02:15', '2026-04-19 12:02:15');
INSERT INTO `activity_logs` VALUES (36, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-19 13:32:42', '2026-04-19 13:32:42');
INSERT INTO `activity_logs` VALUES (37, 2, 'update', 'pemakaian_barang', 'Update data pemakaian barang ID 45', 'App\\Models\\TPemakaianBarang', 45, '{\"id\": 45, \"jumlah\": \"1.00\", \"tanggal\": \"2026-04-18T17:00:00.000000Z\", \"kolam_id\": 3, \"barang_id\": 29, \"satuan_id\": 2, \"created_at\": \"2026-04-19T06:32:42.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"Pagi\", \"updated_at\": \"2026-04-19T06:32:42.000000Z\", \"waktu_pemberian\": \"2026-04-19T06:31:00.000000Z\"}', '{\"id\": 45, \"jumlah\": \"1.00\", \"tanggal\": \"2026-04-15T17:00:00.000000Z\", \"kolam_id\": 3, \"barang_id\": \"23\", \"satuan_id\": 2, \"created_at\": \"2026-04-19T06:32:42.000000Z\", \"created_by\": 2, \"deleted_at\": null, \"keterangan\": \"siang\", \"updated_at\": \"2026-04-19T06:45:37.000000Z\", \"waktu_pemberian\": \"2026-04-19T06:31:00.000000Z\"}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-19 13:45:37', '2026-04-19 13:45:37');
INSERT INTO `activity_logs` VALUES (38, 2, 'delete_batch', 'pemakaian_barang', 'Soft delete 2 data pemakaian barang', NULL, NULL, NULL, '{\"deleted_ids\": [\"46\", \"45\"]}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-19 13:46:15', '2026-04-19 13:46:15');
INSERT INTO `activity_logs` VALUES (39, 2, 'create_batch', 'pemakaian_barang', 'Batch input pemakaian barang: 2 data', NULL, NULL, NULL, '{\"errors\": [], \"created_count\": 2}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-19 13:56:01', '2026-04-19 13:56:01');
INSERT INTO `activity_logs` VALUES (40, 2, 'delete_batch', 'pemakaian_barang', 'Soft delete 2 data pemakaian barang', NULL, NULL, NULL, '{\"deleted_ids\": [\"48\", \"47\"]}', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 05:56:35', '2026-04-21 05:56:35');

-- ----------------------------
-- Table structure for login_logs
-- ----------------------------
CREATE TABLE `login_logs`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NULL DEFAULT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `device_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `browser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `is_successful` tinyint(1) NOT NULL DEFAULT 1,
  `failure_reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `login_logs_user_id_foreign`(`user_id` ASC) USING BTREE,
  CONSTRAINT `login_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of login_logs
-- ----------------------------
INSERT INTO `login_logs` VALUES (1, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-13 03:17:50', '2026-04-13 03:17:51');
INSERT INTO `login_logs` VALUES (2, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-13 04:02:54', '2026-04-13 04:02:55');
INSERT INTO `login_logs` VALUES (3, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-13 10:01:45', '2026-04-13 10:01:46');
INSERT INTO `login_logs` VALUES (4, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-13 13:35:03', '2026-04-13 13:35:04');
INSERT INTO `login_logs` VALUES (5, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-13 13:35:03', '2026-04-13 13:35:04');
INSERT INTO `login_logs` VALUES (6, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-15 20:35:57', '2026-04-15 20:35:58');
INSERT INTO `login_logs` VALUES (7, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-16 05:18:40', '2026-04-16 05:18:41');
INSERT INTO `login_logs` VALUES (8, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-16 06:19:49', '2026-04-16 06:19:50');
INSERT INTO `login_logs` VALUES (9, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-16 06:19:49', '2026-04-16 06:19:50');
INSERT INTO `login_logs` VALUES (10, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-16 06:19:50', '2026-04-16 06:19:50');
INSERT INTO `login_logs` VALUES (11, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-17 05:07:55', '2026-04-17 05:07:56');
INSERT INTO `login_logs` VALUES (12, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-17 15:46:27', '2026-04-17 15:46:27');
INSERT INTO `login_logs` VALUES (13, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 04:31:02', '2026-04-18 04:31:03');
INSERT INTO `login_logs` VALUES (14, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 04:31:02', '2026-04-18 04:31:03');
INSERT INTO `login_logs` VALUES (15, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 04:31:32', '2026-04-18 04:31:33');
INSERT INTO `login_logs` VALUES (16, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 04:41:03', '2026-04-18 04:41:04');
INSERT INTO `login_logs` VALUES (17, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 04:41:21', '2026-04-18 04:41:22');
INSERT INTO `login_logs` VALUES (18, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 10:56:44', '2026-04-18 10:56:45');
INSERT INTO `login_logs` VALUES (19, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-18 10:56:44', '2026-04-18 10:56:45');
INSERT INTO `login_logs` VALUES (20, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 0, 'Invalid credentials', '2026-04-19 11:31:06', '2026-04-19 11:31:07');
INSERT INTO `login_logs` VALUES (21, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 0, 'Invalid credentials', '2026-04-19 11:31:10', '2026-04-19 11:31:10');
INSERT INTO `login_logs` VALUES (22, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-19 11:31:16', '2026-04-19 11:31:17');
INSERT INTO `login_logs` VALUES (23, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-20 14:15:38', '2026-04-20 14:15:40');
INSERT INTO `login_logs` VALUES (24, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-20 14:15:38', '2026-04-20 14:15:40');
INSERT INTO `login_logs` VALUES (25, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-20 16:11:05', '2026-04-20 16:11:06');
INSERT INTO `login_logs` VALUES (26, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-20 16:16:59', '2026-04-20 16:17:00');
INSERT INTO `login_logs` VALUES (27, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-20 16:17:10', '2026-04-20 16:17:11');
INSERT INTO `login_logs` VALUES (28, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-21 05:38:50', '2026-04-21 05:38:51');
INSERT INTO `login_logs` VALUES (29, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'desktop', 'Chrome', 'Windows', 1, NULL, '2026-04-21 05:39:24', '2026-04-21 05:39:24');

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
CREATE TABLE `migrations`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES (1, '2024_01_01_000001_create_users_table', 1);
INSERT INTO `migrations` VALUES (2, '2024_01_01_000002_create_rbac_tables', 1);
INSERT INTO `migrations` VALUES (3, '2024_01_01_000003_create_activity_logs_table', 1);
INSERT INTO `migrations` VALUES (4, '2024_01_01_000004_create_login_logs_table', 1);
INSERT INTO `migrations` VALUES (5, '2024_01_01_000005_create_master_tables', 1);
INSERT INTO `migrations` VALUES (6, '2024_01_01_000006_create_barang_table', 1);
INSERT INTO `migrations` VALUES (7, '2024_01_01_000007_create_tambak_operations_tables', 1);
INSERT INTO `migrations` VALUES (8, '2024_01_01_000008_create_transaksi_tables', 1);
INSERT INTO `migrations` VALUES (9, '2026_04_12_185516_add_updated_at_to_login_logs_table', 1);
INSERT INTO `migrations` VALUES (10, '2026_04_12_191431_create_supporting_t_tables', 1);
INSERT INTO `migrations` VALUES (11, '2026_04_12_201622_create_tebar_table', 1);
INSERT INTO `migrations` VALUES (12, '2026_04_12_203019_add_email_and_role_id_to_users_table', 1);
INSERT INTO `migrations` VALUES (13, '2026_04_13_031821_add_soft_deletes_to_tables', 2);
INSERT INTO `migrations` VALUES (14, '2026_04_16_000001_add_soft_deletes_to_pakan_table', 3);
INSERT INTO `migrations` VALUES (15, '2024_01_01_000007_update_barang_table_structure', 4);
INSERT INTO `migrations` VALUES (16, '2024_01_01_000008_rename_tpakan_to_tpemakaian_barang', 4);
INSERT INTO `migrations` VALUES (19, '2024_01_01_000009_update_tpemakaian_barang_columns', 5);
INSERT INTO `migrations` VALUES (20, '2024_01_01_000010_convert_kategori_to_kategori_id_in_barang', 5);
INSERT INTO `migrations` VALUES (21, '2024_01_01_000011_convert_satuan_to_satuan_id_in_barang', 6);
INSERT INTO `migrations` VALUES (22, '2026_04_17_080424_update_kolam_table_columns', 7);
INSERT INTO `migrations` VALUES (23, '2026_04_17_155812_add_missing_columns_to_tkolam_table', 8);
INSERT INTO `migrations` VALUES (26, '2026_04_18_000001_fix_is_active_column', 9);
INSERT INTO `migrations` VALUES (31, '2026_04_18_113342_change_satuan_to_satuan_id_in_tpemakaian_barang_table', 10);
INSERT INTO `migrations` VALUES (32, '2026_04_19_122300_change_jenis_barang_to_barang_id_in_tpemakaian_barang_table', 11);
INSERT INTO `migrations` VALUES (34, '2026_04_19_124944_change_kolam_to_kolam_id_in_tpemakaian_barang_table', 12);
INSERT INTO `migrations` VALUES (35, '2026_04_20_170329_add_dari_id_and_tujuan_id_to_tpemakaian_barang_table', 13);

-- ----------------------------
-- Records of password_reset_tokens
-- ----------------------------

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
CREATE TABLE `permissions`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `module` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'web',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `permissions_name_unique`(`name` ASC) USING BTREE,
  INDEX `permissions_module_index`(`module` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of permissions
-- ----------------------------
INSERT INTO `permissions` VALUES (1, 'users.view', 'View Users', NULL, 'users', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (2, 'users.create', 'Create Users', NULL, 'users', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (3, 'users.edit', 'Edit Users', NULL, 'users', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (4, 'users.delete', 'Delete Users', NULL, 'users', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (5, 'roles.view', 'View Roles', NULL, 'roles', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (6, 'roles.create', 'Create Roles', NULL, 'roles', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (7, 'roles.edit', 'Edit Roles', NULL, 'roles', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (8, 'roles.delete', 'Delete Roles', NULL, 'roles', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (9, 'kolam.view', 'View Ponds', NULL, 'kolam', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (10, 'kolam.create', 'Create Ponds', NULL, 'kolam', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (11, 'kolam.edit', 'Edit Ponds', NULL, 'kolam', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (12, 'kolam.delete', 'Delete Ponds', NULL, 'kolam', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (13, 'tebar.view', 'View Stocking', NULL, 'tebar', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (14, 'tebar.create', 'Create Stocking', NULL, 'tebar', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (15, 'tebar.edit', 'Edit Stocking', NULL, 'tebar', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (16, 'tebar.delete', 'Delete Stocking', NULL, 'tebar', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (17, 'panen.view', 'View Harvest', NULL, 'panen', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (18, 'panen.create', 'Create Harvest', NULL, 'panen', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (19, 'panen.edit', 'Edit Harvest', NULL, 'panen', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (20, 'panen.delete', 'Delete Harvest', NULL, 'panen', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (21, 'sampling.view', 'View Sampling', NULL, 'sampling', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (22, 'sampling.create', 'Create Sampling', NULL, 'sampling', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (23, 'sampling.edit', 'Edit Sampling', NULL, 'sampling', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (24, 'sampling.delete', 'Delete Sampling', NULL, 'sampling', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (25, 'pakan.view', 'View Feed', NULL, 'pakan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (26, 'pakan.create', 'Create Feed', NULL, 'pakan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (27, 'pakan.edit', 'Edit Feed', NULL, 'pakan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (28, 'pakan.delete', 'Delete Feed', NULL, 'pakan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (29, 'cek-anco.view', 'View Anco Check', NULL, 'cek-anco', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (30, 'cek-anco.create', 'Create Anco Check', NULL, 'cek-anco', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (31, 'cek-anco.edit', 'Edit Anco Check', NULL, 'cek-anco', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (32, 'cek-anco.delete', 'Delete Anco Check', NULL, 'cek-anco', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (33, 'cek-air.view', 'View Water Check', NULL, 'cek-air', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (34, 'cek-air.create', 'Create Water Check', NULL, 'cek-air', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (35, 'cek-air.edit', 'Edit Water Check', NULL, 'cek-air', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (36, 'cek-air.delete', 'Delete Water Check', NULL, 'cek-air', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (37, 'kematian.view', 'View Mortality', NULL, 'kematian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (38, 'kematian.create', 'Create Mortality', NULL, 'kematian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (39, 'kematian.edit', 'Edit Mortality', NULL, 'kematian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (40, 'kematian.delete', 'Delete Mortality', NULL, 'kematian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (41, 'pembelian.view', 'View Purchasing', NULL, 'pembelian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (42, 'pembelian.create', 'Create Purchasing', NULL, 'pembelian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (43, 'pembelian.edit', 'Edit Purchasing', NULL, 'pembelian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (44, 'pembelian.delete', 'Delete Purchasing', NULL, 'pembelian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (45, 'pembelian.approve', 'Approve Purchasing', NULL, 'pembelian', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (46, 'stok.view', 'View Stock', NULL, 'stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (47, 'stok.create', 'Create Stock', NULL, 'stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (48, 'stok.edit', 'Edit Stock', NULL, 'stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (49, 'stok.delete', 'Delete Stock', NULL, 'stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (50, 'mutasi-stok.view', 'View Stock Mutation', NULL, 'mutasi-stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (51, 'mutasi-stok.create', 'Create Stock Mutation', NULL, 'mutasi-stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (52, 'mutasi-stok.edit', 'Edit Stock Mutation', NULL, 'mutasi-stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (53, 'mutasi-stok.delete', 'Delete Stock Mutation', NULL, 'mutasi-stok', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (54, 'keuangan.view', 'View Finance', NULL, 'keuangan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (55, 'keuangan.create', 'Create Finance', NULL, 'keuangan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (56, 'keuangan.edit', 'Edit Finance', NULL, 'keuangan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (57, 'keuangan.delete', 'Delete Finance', NULL, 'keuangan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (58, 'laporan.view', 'View Reports', NULL, 'laporan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (59, 'laporan.export', 'Export Reports', NULL, 'laporan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (60, 'laporan.print', 'Print Reports', NULL, 'laporan', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (61, 'logs.view', 'View Activity Logs', NULL, 'logs', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (62, 'logs.export', 'Export Activity Logs', NULL, 'logs', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `permissions` VALUES (63, 'pakan.trashed', 'View Trash Feed', NULL, 'pakan', 'web', '2026-04-16 06:05:58', '2026-04-16 06:05:58');
INSERT INTO `permissions` VALUES (64, 'pakan.restore', 'Restore Feed', NULL, 'pakan', 'web', '2026-04-16 06:05:58', '2026-04-16 06:05:58');
INSERT INTO `permissions` VALUES (65, 'pakan.force-delete', 'Force Delete Feed', NULL, 'pakan', 'web', '2026-04-16 06:05:58', '2026-04-16 06:05:58');

-- ----------------------------
-- Table structure for rlpb
-- ----------------------------
CREATE TABLE `rlpb`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_lpb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kode_barang` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` decimal(10, 2) NOT NULL,
  `satuan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'KG',
  `lokasi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `rlpb_lokasi_foreign`(`lokasi` ASC) USING BTREE,
  INDEX `rlpb_no_lpb_index`(`no_lpb` ASC) USING BTREE,
  INDEX `rlpb_kode_barang_index`(`kode_barang` ASC) USING BTREE,
  CONSTRAINT `rlpb_kode_barang_foreign` FOREIGN KEY (`kode_barang`) REFERENCES `tbarang` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `rlpb_lokasi_foreign` FOREIGN KEY (`lokasi`) REFERENCES `tlokasi` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `rlpb_no_lpb_foreign` FOREIGN KEY (`no_lpb`) REFERENCES `tlpb` (`no_lpb`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of rlpb
-- ----------------------------
INSERT INTO `rlpb` VALUES (1, 'LPB/2604/0001', 'BRG003', 758.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (2, 'LPB/2604/0002', 'BRG003', 469.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (3, 'LPB/2604/0003', 'BRG001', 1891.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (4, 'LPB/2604/0004', 'BRG001', 1639.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (5, 'LPB/2604/0005', 'BRG003', 1546.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (6, 'LPB/2604/0006', 'BRG002', 778.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (7, 'LPB/2604/0007', 'BRG001', 1583.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (8, 'LPB/2604/0008', 'BRG003', 791.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (9, 'LPB/2604/0009', 'BRG003', 526.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `rlpb` VALUES (10, 'LPB/2604/0010', 'BRG002', 1365.00, 'KG', 'GUDANG PAKAN', '2026-04-13 03:17:41', '2026-04-13 03:17:41');

-- ----------------------------
-- Table structure for role_permissions
-- ----------------------------
CREATE TABLE `role_permissions`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `role_id` bigint UNSIGNED NOT NULL,
  `permission_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `role_permissions_role_id_permission_id_unique`(`role_id` ASC, `permission_id` ASC) USING BTREE,
  INDEX `role_permissions_permission_id_foreign`(`permission_id` ASC) USING BTREE,
  CONSTRAINT `role_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `role_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 247 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role_permissions
-- ----------------------------
INSERT INTO `role_permissions` VALUES (1, 1, 1, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (2, 1, 2, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (3, 1, 3, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (4, 1, 4, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (5, 1, 5, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (6, 1, 6, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (7, 1, 7, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (8, 1, 8, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (9, 1, 9, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (10, 1, 10, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (11, 1, 11, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (12, 1, 12, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (13, 1, 13, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (14, 1, 14, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (15, 1, 15, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (16, 1, 16, '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `role_permissions` VALUES (17, 1, 17, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (18, 1, 18, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (19, 1, 19, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (20, 1, 20, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (21, 1, 21, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (22, 1, 22, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (23, 1, 23, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (24, 1, 24, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (25, 1, 25, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (26, 1, 26, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (27, 1, 27, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (28, 1, 28, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (29, 1, 29, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (30, 1, 30, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (31, 1, 31, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (32, 1, 32, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (33, 1, 33, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (34, 1, 34, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (35, 1, 35, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (36, 1, 36, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (37, 1, 37, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (38, 1, 38, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (39, 1, 39, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (40, 1, 40, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (41, 1, 41, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (42, 1, 42, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (43, 1, 43, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (44, 1, 44, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (45, 1, 45, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (46, 1, 46, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (47, 1, 47, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (48, 1, 48, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (49, 1, 49, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (50, 1, 50, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (51, 1, 51, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (52, 1, 52, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (53, 1, 53, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (54, 1, 54, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (55, 1, 55, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (56, 1, 56, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (57, 1, 57, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (58, 1, 58, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (59, 1, 59, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (60, 1, 60, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (61, 1, 61, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (62, 1, 62, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (63, 2, 5, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (64, 2, 6, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (65, 2, 7, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (66, 2, 8, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (67, 2, 9, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (68, 2, 10, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (69, 2, 11, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (70, 2, 12, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (71, 2, 13, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (72, 2, 14, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (73, 2, 15, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (74, 2, 16, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (75, 2, 17, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (76, 2, 18, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (77, 2, 19, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (78, 2, 20, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (79, 2, 21, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (80, 2, 22, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (81, 2, 23, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (82, 2, 24, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (83, 2, 25, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (84, 2, 26, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (85, 2, 27, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (86, 2, 28, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (87, 2, 29, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (88, 2, 30, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (89, 2, 31, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (90, 2, 32, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (91, 2, 33, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (92, 2, 34, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (93, 2, 35, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (94, 2, 36, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (95, 2, 37, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (96, 2, 38, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (97, 2, 39, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (98, 2, 40, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (99, 2, 41, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (100, 2, 42, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (101, 2, 43, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (102, 2, 44, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (103, 2, 45, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (104, 2, 46, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (105, 2, 47, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (106, 2, 48, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (107, 2, 49, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (108, 2, 50, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (109, 2, 51, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (110, 2, 52, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (111, 2, 53, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (112, 2, 54, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (113, 2, 55, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (114, 2, 56, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (115, 2, 57, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (116, 2, 58, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (117, 2, 59, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (118, 2, 60, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (119, 2, 61, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (120, 2, 62, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (121, 3, 9, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (122, 3, 10, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (123, 3, 11, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (124, 3, 12, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (125, 3, 13, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (126, 3, 14, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (127, 3, 15, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (128, 3, 16, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (129, 3, 17, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (130, 3, 18, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (131, 3, 19, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (132, 3, 20, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (133, 3, 21, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (134, 3, 22, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (135, 3, 23, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (136, 3, 24, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (137, 3, 25, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (138, 3, 26, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (139, 3, 27, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (140, 3, 28, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (141, 3, 29, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (142, 3, 30, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (143, 3, 31, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (144, 3, 32, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (145, 3, 33, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (146, 3, 34, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (147, 3, 35, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (148, 3, 36, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (149, 3, 37, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (150, 3, 38, '2026-04-13 03:17:36', '2026-04-13 03:17:36');
INSERT INTO `role_permissions` VALUES (151, 3, 39, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (152, 3, 40, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (153, 3, 58, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (154, 3, 59, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (155, 3, 60, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (156, 4, 9, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (157, 4, 10, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (158, 4, 11, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (159, 4, 12, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (160, 4, 13, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (161, 4, 14, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (162, 4, 15, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (163, 4, 16, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (164, 4, 17, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (165, 4, 18, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (166, 4, 19, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (167, 4, 20, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (168, 4, 21, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (169, 4, 22, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (170, 4, 23, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (171, 4, 24, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (172, 4, 25, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (173, 4, 26, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (174, 4, 27, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (175, 4, 28, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (176, 4, 29, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (177, 4, 30, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (178, 4, 31, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (179, 4, 32, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (180, 4, 33, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (181, 4, 34, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (182, 4, 35, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (183, 4, 36, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (184, 4, 37, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (185, 4, 38, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (186, 4, 39, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (187, 4, 40, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (188, 4, 58, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (189, 5, 9, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (190, 5, 13, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (191, 5, 17, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (192, 5, 21, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (193, 5, 25, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (194, 5, 29, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (195, 5, 30, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (196, 5, 33, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (197, 5, 34, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (198, 5, 37, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (199, 5, 38, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (200, 5, 26, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (201, 5, 22, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (202, 6, 41, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (203, 6, 42, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (204, 6, 43, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (205, 6, 44, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (206, 6, 45, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (207, 7, 9, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (208, 7, 13, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (209, 7, 17, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (210, 7, 21, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (211, 7, 25, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (212, 7, 29, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (213, 7, 30, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (214, 7, 33, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (215, 7, 34, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (216, 7, 37, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (217, 7, 38, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (218, 7, 26, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (219, 7, 22, '2026-04-13 03:17:37', '2026-04-13 03:17:37');
INSERT INTO `role_permissions` VALUES (220, 1, 63, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (221, 1, 64, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (222, 1, 65, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (223, 2, 63, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (224, 2, 64, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (225, 2, 65, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (226, 3, 63, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (227, 3, 64, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (228, 3, 65, '2026-04-16 06:06:33', '2026-04-16 06:06:33');
INSERT INTO `role_permissions` VALUES (229, 4, 63, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (230, 4, 64, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (231, 4, 65, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (232, 6, 46, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (233, 6, 47, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (234, 6, 48, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (235, 6, 49, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (236, 6, 50, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (237, 6, 51, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (238, 6, 52, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (239, 6, 53, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (240, 6, 54, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (241, 6, 55, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (242, 6, 56, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (243, 6, 57, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (244, 6, 58, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (245, 6, 59, '2026-04-16 06:06:34', '2026-04-16 06:06:34');
INSERT INTO `role_permissions` VALUES (246, 6, 60, '2026-04-16 06:06:34', '2026-04-16 06:06:34');

-- ----------------------------
-- Table structure for roles
-- ----------------------------
CREATE TABLE `roles`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'web',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `roles_name_unique`(`name` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO `roles` VALUES (1, 'super-admin', 'Super Administrator', 'Full access to all resources', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (2, 'admin', 'Administrator', 'Administrative access', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (3, 'kepala-produksi', 'Kepala Produksi', 'Production manager', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (4, 'supervisor', 'Supervisor', 'Field supervisor', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (5, 'operator', 'Operator', 'Field operator', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (6, 'keuangan', 'Keuangan', 'Finance staff', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');
INSERT INTO `roles` VALUES (7, 'mobile-user', 'Mobile User', 'Mobile app user', 'web', '2026-04-13 03:17:35', '2026-04-13 03:17:35');

-- ----------------------------
-- Table structure for rpo
-- ----------------------------
CREATE TABLE `rpo`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_po` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kode_barang` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` decimal(10, 2) NOT NULL,
  `satuan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'KG',
  `harga` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `subtotal` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `rpo_no_po_index`(`no_po` ASC) USING BTREE,
  INDEX `rpo_kode_barang_index`(`kode_barang` ASC) USING BTREE,
  CONSTRAINT `rpo_kode_barang_foreign` FOREIGN KEY (`kode_barang`) REFERENCES `tbarang` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `rpo_no_po_foreign` FOREIGN KEY (`no_po`) REFERENCES `tpo` (`no_po`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of rpo
-- ----------------------------

-- ----------------------------
-- Table structure for sessions
-- ----------------------------
CREATE TABLE `sessions`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED NULL DEFAULT NULL,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `sessions_user_id_index`(`user_id` ASC) USING BTREE,
  INDEX `sessions_last_activity_index`(`last_activity` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sessions
-- ----------------------------
INSERT INTO `sessions` VALUES ('fuYDAnDndWaSbAWfDJSzUxRL4CedNyRBWLJgMy2P', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiWVVaUlJFZ2hTTE8yelpueFl1TEd5S09BaU92YkZ6QmNCYVpyZXJTaSI7czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjI6e3M6MzoidXJsIjtzOjM1OiJodHRwOi8vdGFtYmFrLnRlc3QvcGVtYWthaWFuLWJhcmFuZyI7czo1OiJyb3V0ZSI7czoyMjoicGVtYWthaWFuLWJhcmFuZy5pbmRleCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7fQ==', 1776726382);
INSERT INTO `sessions` VALUES ('ZPoapR9tK3aHEqCi5MFUvh807WdyvUKYjnBu1JJF', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiSThLSDYwcjM5MnJuUHdxTW93UkdwYWFkU3hXRXY0b0hNS3oycFFvdiI7czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjI6e3M6MzoidXJsIjtzOjI4OiJodHRwOi8vdGFtYmFrLnRlc3QvZGFzaGJvYXJkIjtzOjU6InJvdXRlIjtzOjk6ImRhc2hib2FyZCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7fQ==', 1776724734);

-- ----------------------------
-- Table structure for taktivitas
-- ----------------------------
CREATE TABLE `taktivitas`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_bukti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `qty` decimal(10, 2) NOT NULL,
  `size` decimal(10, 2) NOT NULL DEFAULT 0.00,
  `grade` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'FS' COMMENT 'FS, BS, BD',
  `harga` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `customer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `jenis` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'BIBIT, PANEN, PARTIAL, AKHIR, TB',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `no_polisi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `supir` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `jam` time NULL DEFAULT NULL,
  `pembuat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `satuan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'KG',
  `total` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `taktivitas_tanggal_kolam_jenis_index`(`tanggal` ASC, `kolam` ASC, `jenis` ASC) USING BTREE,
  INDEX `taktivitas_no_bukti_index`(`no_bukti` ASC) USING BTREE,
  INDEX `taktivitas_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `taktivitas_kolam_index`(`kolam` ASC) USING BTREE,
  INDEX `taktivitas_pembuat_index`(`pembuat` ASC) USING BTREE,
  CONSTRAINT `taktivitas_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `taktivitas_pembuat_foreign` FOREIGN KEY (`pembuat`) REFERENCES `users` (`username`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of taktivitas
-- ----------------------------

-- ----------------------------
-- Table structure for tbarang
-- ----------------------------
CREATE TABLE `tbarang`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kategori_id` bigint UNSIGNED NULL DEFAULT NULL,
  `satuan_id` bigint UNSIGNED NULL DEFAULT NULL,
  `stok` int NOT NULL DEFAULT 0,
  `min_stok` int NOT NULL DEFAULT 0,
  `lokasi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `suplier_id` bigint UNSIGNED NULL DEFAULT NULL,
  `tgl_buat` datetime NULL DEFAULT NULL,
  `pembuat` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `tgl_awal` datetime NULL DEFAULT NULL,
  `stok_awal` int NOT NULL DEFAULT 0,
  `tgl_edit` datetime NULL DEFAULT NULL,
  `pengedit` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `harga_beli` double NULL DEFAULT NULL,
  `harga_jual` double NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tbarang_kode_unique`(`kode` ASC) USING BTREE,
  UNIQUE INDEX `tbarang_nama_unique`(`nama` ASC) USING BTREE,
  INDEX `tbarang_lokasi_foreign`(`lokasi` ASC) USING BTREE,
  INDEX `tbarang_suplier_id_foreign`(`suplier_id` ASC) USING BTREE,
  INDEX `tbarang_kategori_id_foreign`(`kategori_id` ASC) USING BTREE,
  INDEX `tbarang_satuan_id_foreign`(`satuan_id` ASC) USING BTREE,
  CONSTRAINT `tbarang_kategori_id_foreign` FOREIGN KEY (`kategori_id`) REFERENCES `tkategori` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tbarang_lokasi_foreign` FOREIGN KEY (`lokasi`) REFERENCES `tlokasi` (`nama`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tbarang_satuan_id_foreign` FOREIGN KEY (`satuan_id`) REFERENCES `tsatuan` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tbarang_suplier_id_foreign` FOREIGN KEY (`suplier_id`) REFERENCES `tsupplier` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbarang
-- ----------------------------
INSERT INTO `tbarang` VALUES (1, 'PK001', 'PAKAN UDANG SAKRAL 781', 1, 1, 1500, 300, 'GUDANG PAKAN', 'Pakan udang premium', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (2, 'PK002', 'PAKAN UDANG SAKRAL 782', 1, 1, 1200, 250, 'GUDANG PAKAN', 'Pakan udang super premium', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (3, 'PK003', 'PAKAN UDANG CHAMPION 1', 1, 1, 1000, 200, 'GUDANG PAKAN', 'Pakan udang standar', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (4, 'PK004', 'PAKAN UDANG CHAMPION 2', 1, 1, 900, 180, 'GUDANG PAKAN', 'Pakan udang standar plus', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (5, 'PK005', 'PAKAN UDANG MOTO 1', 1, 1, 850, 170, 'GUDANG PAKAN', 'Pakan udang ekonomis', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (6, 'PK006', 'PAKAN UDANG MOTO 2', 1, 1, 800, 160, 'GUDANG PAKAN', 'Pakan udang ekonomis plus', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (7, 'PK007', 'PAKAN UDANG GOLD 1', 1, 1, 750, 150, 'GUDANG PAKAN', 'Pakan udang gold series', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (8, 'PK008', 'PAKAN UDANG GOLD 2', 1, 1, 700, 140, 'GUDANG PAKAN', 'Pakan udang gold premium', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (9, 'PK009', 'PAKAN UDANG STAR FEED', 1, 1, 660, 130, 'GUDANG PAKAN', 'Pakan udang murah', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-18 11:31:13', NULL, NULL);
INSERT INTO `tbarang` VALUES (10, 'PK010', 'PAKAN UDANG SUPER FEED', 1, 1, 600, 120, 'GUDANG PAKAN', 'Pakan udang hemat', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (11, 'VT001', 'VITAMIN C TAMBAK', 4, 1, 100, 20, 'GUDANG OBAT', 'Vitamin C kualitas tinggi', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (12, 'VT002', 'VITAMIN E PREMIUM', 4, 9, 50, 10, 'GUDANG OBAT', 'Vitamin E premium', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (13, 'VT003', 'VITAMIN B COMPLEX', 4, 1, 75, 15, 'GUDANG OBAT', 'Vitamin B complex', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (14, 'VT004', 'VITAMIN A FEED', 4, 9, 50, 12, 'GUDANG OBAT', 'Vitamin A untuk feed', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-18 11:31:13', NULL, NULL);
INSERT INTO `tbarang` VALUES (15, 'VT005', 'VITAMIN D3 PLUS', 4, 1, 80, 16, 'GUDANG OBAT', 'Vitamin D3 plus', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (16, 'PR001', 'PROBIOTIK TAMBAK', 3, 9, 200, 40, 'GUDANG OBAT', 'Probiotik standar', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (17, 'PR002', 'PROBIOTIK SUPER', 3, 9, 150, 30, 'GUDANG OBAT', 'Probiotik super', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (18, 'PR003', 'PROBIOTIK GOLD', 3, 9, 120, 24, 'GUDANG OBAT', 'Probiotik gold', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (19, 'PR004', 'PROBIOTIK PLUS', 3, 1, 80, 18, 'GUDANG OBAT', 'Probiotik plus', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-18 11:31:13', NULL, NULL);
INSERT INTO `tbarang` VALUES (20, 'PR005', 'PROBIOTIK PREMIUM', 3, 9, 100, 20, 'GUDANG OBAT', 'Probiotik premium', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (21, 'OB001', 'OBAT KUMUH OBAT', 2, 1, 50, 10, 'GUDANG OBAT', 'Obat anti kumuluh', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (22, 'OB002', 'OBAT BACTERIA', 2, 9, 40, 8, 'GUDANG OBAT', 'Obat anti bacteria', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (23, 'OB003', 'OBAT VIRUS', 2, 1, 30, 6, 'GUDANG OBAT', 'Obat anti virus', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-19 13:46:15', NULL, NULL);
INSERT INTO `tbarang` VALUES (24, 'OB004', 'OBAT JAMUR', 2, 9, 35, 7, 'GUDANG OBAT', 'Obat anti jamur', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (25, 'OB005', 'OBAT PARASIT', 2, 1, 25, 5, 'GUDANG OBAT', 'Obat anti parasit', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (26, 'DS001', 'DISINFECTAN TAMBAK', 5, 9, 100, 20, 'GUDANG OBAT', 'Disinfektan standar', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-21 05:56:35', NULL, NULL);
INSERT INTO `tbarang` VALUES (27, 'DS002', 'DISINFECTAN SUPER', 5, 9, 68, 16, 'GUDANG OBAT', 'Disinfektan super', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-21 05:56:35', NULL, NULL);
INSERT INTO `tbarang` VALUES (28, 'DS003', 'IODIN + COPPER', 5, 9, 60, 12, 'GUDANG OBAT', 'Iodin + Copper', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (29, 'BN001', 'BENUR VANAMEI', 6, 5, 100000, 20000, 'GUDANG UMUM', 'Benur udang vanamei', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-19 13:45:37', NULL, NULL);
INSERT INTO `tbarang` VALUES (30, 'BN002', 'BENUR TIGER', 6, 5, 49990, 10000, 'GUDANG UMUM', 'Benur udang tiger', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2026-04-19 12:02:15', NULL, NULL);
INSERT INTO `tbarang` VALUES (31, 'AL001', 'JARING INSTAN', 7, 5, 50, 10, 'GUDANG UMUM', 'Jaring instan', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (32, 'AL002', 'SEKOP NET', 7, 5, 30, 6, 'GUDANG UMUM', 'Sekop net', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (33, 'AL003', 'ANKLE BUAH', 7, 5, 40, 8, 'GUDANG UMUM', 'Ankle buah', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (34, 'AL004', 'MULTIPARAMETER', 8, 10, 5, 1, 'GUDANG UMUM', 'Alat ukur multiparameter', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `tbarang` VALUES (35, 'AL005', 'MIKROSKOP', 8, 10, 3, 1, 'GUDANG UMUM', 'Mikroskop', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for tbayar_hutang
-- ----------------------------
CREATE TABLE `tbayar_hutang`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_kti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Kas Tahun Invoice',
  `tanggal` date NOT NULL,
  `kode_supplier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `akun` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Bank account',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `jumlah` decimal(15, 2) NOT NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tbayar_hutang_no_kti_unique`(`no_kti` ASC) USING BTREE,
  INDEX `tbayar_hutang_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tbayar_hutang_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tbayar_hutang_kode_supplier_index`(`kode_supplier` ASC) USING BTREE,
  CONSTRAINT `tbayar_hutang_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tbayar_hutang_kode_supplier_foreign` FOREIGN KEY (`kode_supplier`) REFERENCES `tsupplier` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbayar_hutang
-- ----------------------------

-- ----------------------------
-- Table structure for tbayar_piutang
-- ----------------------------
CREATE TABLE `tbayar_piutang`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_bukti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `kode_customer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `akun` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Bank account',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `jumlah` decimal(15, 2) NOT NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tbayar_piutang_no_bukti_unique`(`no_bukti` ASC) USING BTREE,
  INDEX `tbayar_piutang_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tbayar_piutang_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tbayar_piutang_kode_customer_index`(`kode_customer` ASC) USING BTREE,
  CONSTRAINT `tbayar_piutang_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tbayar_piutang_kode_customer_foreign` FOREIGN KEY (`kode_customer`) REFERENCES `tcustomer` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbayar_piutang
-- ----------------------------

-- ----------------------------
-- Table structure for tcek_air
-- ----------------------------
CREATE TABLE `tcek_air`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `jam` time NOT NULL,
  `ph` decimal(4, 2) NULL DEFAULT NULL COMMENT 'pH level',
  `do` decimal(4, 2) NULL DEFAULT NULL COMMENT 'Dissolved Oxygen (mg/L)',
  `salinitas` decimal(4, 2) NULL DEFAULT NULL COMMENT 'Salinity (ppt)',
  `suhu` decimal(4, 2) NULL DEFAULT NULL COMMENT 'Temperature (°C)',
  `alkalinitas` decimal(4, 2) NULL DEFAULT NULL COMMENT 'Alkalinity (mg/L)',
  `kecerahan` decimal(4, 2) NULL DEFAULT NULL COMMENT 'Clarity (cm)',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tcek_air_kolam_tanggal_jam_unique`(`kolam` ASC, `tanggal` ASC, `jam` ASC) USING BTREE,
  INDEX `tcek_air_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tcek_air_kolam_index`(`kolam` ASC) USING BTREE,
  INDEX `tcek_air_tanggal_index`(`tanggal` ASC) USING BTREE,
  CONSTRAINT `tcek_air_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tcek_air_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tcek_air
-- ----------------------------

-- ----------------------------
-- Table structure for tcek_anco
-- ----------------------------
CREATE TABLE `tcek_anco`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `waktu_pemberian` time NOT NULL,
  `waktu_cek` time NOT NULL,
  `jumlah_pakan` decimal(10, 2) NOT NULL COMMENT 'Feed amount (kg)',
  `anco_1_status` enum('habis','sedikit','banyak') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sedikit',
  `anco_2_status` enum('habis','sedikit','banyak') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sedikit',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tcek_anco_kolam_tanggal_waktu_pemberian_unique`(`kolam` ASC, `tanggal` ASC, `waktu_pemberian` ASC) USING BTREE,
  INDEX `tcek_anco_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tcek_anco_kolam_index`(`kolam` ASC) USING BTREE,
  INDEX `tcek_anco_tanggal_index`(`tanggal` ASC) USING BTREE,
  CONSTRAINT `tcek_anco_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tcek_anco_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 61 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tcek_anco
-- ----------------------------

-- ----------------------------
-- Table structure for tclosing
-- ----------------------------
CREATE TABLE `tclosing`  (
  `TANGGAL` datetime NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tclosing
-- ----------------------------
INSERT INTO `tclosing` VALUES ('2026-01-31 00:00:00');

-- ----------------------------
-- Table structure for tcustomer
-- ----------------------------
CREATE TABLE `tcustomer`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `telepon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `kontak_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `npwp` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `limit_piutang` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `tenor` int NOT NULL DEFAULT 0 COMMENT 'hari',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tcustomer_kode_unique`(`kode` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tcustomer
-- ----------------------------
INSERT INTO `tcustomer` VALUES (1, 'CUST001', 'UPDATED CUSTOMER NAME', 'Jl. Pasar Ikan No. 1', '08111111111', NULL, 'Doni', NULL, 100000000.00, 30, 1, NULL, '2026-04-13 03:20:21', NULL);
INSERT INTO `tcustomer` VALUES (2, 'CUST002', 'PT Seafood Indonesia', 'Jl. Export No. 2', '08222222222', NULL, 'Eko', NULL, 150000000.00, 45, 1, NULL, NULL, NULL);
INSERT INTO `tcustomer` VALUES (3, 'C01', 'CUSTOMER LOkal', 'Jl. Lokal No. 1', '081111111111', 'local@email.com', 'Pak Lokal', NULL, 5000000.00, 7, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tcustomer` VALUES (4, 'GL', 'PT. GLOBAL', 'Jl. Global No. 123', '081222222222', 'info@ptglobal.co.id', 'Direktur', '02.345.678.9-012.000', 200000000.00, 30, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tcustomer` VALUES (5, 'HA69', 'HA69', 'LAMPUNG', '081333333333', NULL, 'H. Ahmad', NULL, 150000000.00, 14, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tcustomer` VALUES (6, 'SC', 'BU NINIK', 'Jl. Ninik No. 456', '081444444444', NULL, 'Ibu Ninik', NULL, 100000000.00, 21, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tcustomer` VALUES (7, 'TB', 'TAMBAK', 'Jl. Tambak No. 789', '081555555555', 'tambak@email.com', 'Manager', '02.345.678.9-013.000', 50000000.00, 30, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);

-- ----------------------------
-- Table structure for thak
-- ----------------------------
CREATE TABLE `thak`  (
  `NAMA` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `KD_MENU` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `TAMBAH` tinyint(1) NULL DEFAULT 0,
  `EDIT` tinyint(1) NULL DEFAULT 0,
  `HAPUS` tinyint(1) NULL DEFAULT 0,
  `CETAK` tinyint(1) NULL DEFAULT 0
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of thak
-- ----------------------------

-- ----------------------------
-- Table structure for tharga
-- ----------------------------
CREATE TABLE `tharga`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kode_barang` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal_berlaku` date NOT NULL,
  `harga` decimal(15, 2) NOT NULL,
  `grade` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'FS' COMMENT 'FS, BS, BD',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `tharga_kode_barang_grade_tanggal_berlaku_index`(`kode_barang` ASC, `grade` ASC, `tanggal_berlaku` ASC) USING BTREE,
  CONSTRAINT `tharga_kode_barang_foreign` FOREIGN KEY (`kode_barang`) REFERENCES `tbarang` (`kode`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tharga
-- ----------------------------

-- ----------------------------
-- Table structure for tjenis_cek
-- ----------------------------
CREATE TABLE `tjenis_cek`  (
  `JENIS` varchar(510) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `BATASBAWAH` double NULL DEFAULT NULL,
  `BATASATAS` double NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tjenis_cek
-- ----------------------------
INSERT INTO `tjenis_cek` VALUES ('ALKALI', 80, 150);
INSERT INTO `tjenis_cek` VALUES ('PH', 7.5, 8.5);
INSERT INTO `tjenis_cek` VALUES ('MAGNESIUM', 1200, 1440);
INSERT INTO `tjenis_cek` VALUES ('KALSIUM', 0, 320);
INSERT INTO `tjenis_cek` VALUES ('DO', 6, 0);
INSERT INTO `tjenis_cek` VALUES ('SALINITAS', 0, 0);
INSERT INTO `tjenis_cek` VALUES ('NITRIT', 0, 0);
INSERT INTO `tjenis_cek` VALUES ('KAPORIT', 0, 0);
INSERT INTO `tjenis_cek` VALUES ('AMONIA', 0, 0);
INSERT INTO `tjenis_cek` VALUES ('KECERAHAN', 0, 0);
INSERT INTO `tjenis_cek` VALUES ('SUHU', 0, 0);

-- ----------------------------
-- Table structure for tjurnal_umum
-- ----------------------------
CREATE TABLE `tjurnal_umum`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_bukti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `akun` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Account code',
  `tipe` enum('DEBIT','KREDIT') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DEBIT',
  `debit` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `kredit` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `module_ref` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Reference to originating module',
  `ref_id` bigint UNSIGNED NULL DEFAULT NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tjurnal_umum_no_bukti_unique`(`no_bukti` ASC) USING BTREE,
  INDEX `tjurnal_umum_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tjurnal_umum_module_ref_ref_id_index`(`module_ref` ASC, `ref_id` ASC) USING BTREE,
  INDEX `tjurnal_umum_tanggal_index`(`tanggal` ASC) USING BTREE,
  CONSTRAINT `tjurnal_umum_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tjurnal_umum
-- ----------------------------

-- ----------------------------
-- Table structure for tkategori
-- ----------------------------
CREATE TABLE `tkategori`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tkategori_nama_unique`(`nama` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tkategori
-- ----------------------------
INSERT INTO `tkategori` VALUES (1, 'PAKAN', 'Pakan Udang', NULL, NULL);
INSERT INTO `tkategori` VALUES (2, 'OBAT', 'Obat-obatan', NULL, NULL);
INSERT INTO `tkategori` VALUES (3, 'PROBIONIK', 'Probionik', NULL, NULL);
INSERT INTO `tkategori` VALUES (4, 'VITAMIN', 'Vitamin', NULL, NULL);
INSERT INTO `tkategori` VALUES (5, 'DISINFECTAN', 'Disinfektan', NULL, NULL);
INSERT INTO `tkategori` VALUES (6, 'BENUR', 'Benur Udang', NULL, NULL);
INSERT INTO `tkategori` VALUES (7, 'PERALATAN', 'Peralatan Tambak', NULL, NULL);
INSERT INTO `tkategori` VALUES (8, 'LABORATORIUM', 'Alat Laboratorium', NULL, NULL);

-- ----------------------------
-- Table structure for tkolam
-- ----------------------------
CREATE TABLE `tkolam`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `luas` double NULL DEFAULT NULL,
  `kedalaman` decimal(5, 2) NULL DEFAULT NULL,
  `jenis` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tkolam_nama_unique`(`nama` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tkolam
-- ----------------------------
INSERT INTO `tkolam` VALUES (1, 'A01', 'Kolam utama untuk pembesaran udang vaname dengan sistem aerasi intensif', 1, NULL, '2026-04-17 16:22:21', 1700, 1.20, 'Intensif');
INSERT INTO `tkolam` VALUES (2, 'A02', 'Kolam cadangan dengan kualitas air yang stabil', 1, NULL, '2026-04-17 16:22:21', 2025, 1.20, 'Intensif');
INSERT INTO `tkolam` VALUES (3, 'A03', NULL, 1, NULL, '2026-04-17 16:22:21', 1280, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (4, 'A04', NULL, 1, NULL, '2026-04-17 16:22:21', 1200, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (5, 'A05', NULL, 1, NULL, '2026-04-17 16:22:21', 1280, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (6, 'A06', NULL, 1, NULL, '2026-04-17 16:22:21', 1600, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (7, 'A07', NULL, 1, NULL, '2026-04-17 16:22:21', 1300, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (8, 'A08', NULL, 1, NULL, '2026-04-17 16:22:21', 2000, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (9, 'A09', NULL, 1, NULL, '2026-04-17 16:22:21', 1900, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (10, 'A10', NULL, 1, NULL, '2026-04-17 16:22:21', 1340, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (11, 'A11', NULL, 1, NULL, '2026-04-17 16:22:21', 1340, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (12, 'A12', NULL, 1, NULL, '2026-04-17 16:22:21', 1240, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (13, 'A13', NULL, 1, NULL, '2026-04-17 16:22:21', 1880, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (14, 'A14', NULL, 1, NULL, '2026-04-17 16:22:21', 1680, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (15, 'A15', NULL, 1, NULL, '2026-04-17 16:22:21', 1500, NULL, 'Intensif');
INSERT INTO `tkolam` VALUES (16, 'B01', 'Kolam pembesaran tahap awal', 1, NULL, '2026-04-17 16:22:21', 2400, 1.50, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (17, 'B02', 'KOLAM BARU', 1, NULL, '2026-04-17 16:22:21', 2500, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (18, 'B03', 'KOLAM BARU', 1, NULL, '2026-04-17 16:22:21', 2500, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (19, 'B04', NULL, 1, NULL, '2026-04-17 16:22:21', 1670, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (20, 'B05', NULL, 1, NULL, '2026-04-17 16:22:21', 2050, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (21, 'B06', NULL, 1, NULL, '2026-04-17 16:22:21', 2410, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (22, 'B07', NULL, 1, NULL, '2026-04-17 16:22:21', 1950, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (23, 'B08', NULL, 1, NULL, '2026-04-17 16:22:21', 910, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (24, 'B09', NULL, 1, NULL, '2026-04-17 16:22:21', 1820, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (25, 'B10', NULL, 1, NULL, '2026-04-17 16:22:21', 1470, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (26, 'B11', NULL, 1, NULL, '2026-04-17 16:22:21', 1510, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (27, 'B12', NULL, 1, NULL, '2026-04-17 16:22:21', 1410, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (28, 'B13', NULL, 1, NULL, '2026-04-17 16:22:21', 1280, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (29, 'B14', NULL, 1, NULL, '2026-04-17 16:22:21', 2480, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (30, 'B15', NULL, 1, NULL, '2026-04-17 16:22:21', 2870, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (31, 'B16', NULL, 1, NULL, '2026-04-17 16:22:21', 1800, NULL, 'Semi Intensif');
INSERT INTO `tkolam` VALUES (32, 'TANDON1', 'Kolam penampung air dan sedimentasi', 1, NULL, '2026-04-17 16:22:21', 0, NULL, 'Tradisional');
INSERT INTO `tkolam` VALUES (33, 'TANDON2', 'Kolam penampung air dan sedimentasi', 1, NULL, '2026-04-17 16:22:21', 0, NULL, 'Tradisional');
INSERT INTO `tkolam` VALUES (34, 'TANDON3', NULL, 1, NULL, '2026-04-17 16:22:21', 0, NULL, 'Tradisional');
INSERT INTO `tkolam` VALUES (35, 'TANDON4', NULL, 1, NULL, '2026-04-17 16:22:21', 0, NULL, 'Tradisional');

-- ----------------------------
-- Table structure for tledger
-- ----------------------------
CREATE TABLE `tledger`  (
  `NO_PERK` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NAMA` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `NORMAL` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'D for Debit, K for Credit',
  `JENIS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `GRUP` tinyint(1) NULL DEFAULT NULL,
  `KURS` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `KELOMPOK` varchar(510) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`NO_PERK`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tledger
-- ----------------------------

-- ----------------------------
-- Table structure for tlokasi
-- ----------------------------
CREATE TABLE `tlokasi`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tlokasi_nama_unique`(`nama` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tlokasi
-- ----------------------------
INSERT INTO `tlokasi` VALUES (1, 'GUDANG PAKAN', 'Gudang penyimpanan pakan', NULL, NULL);
INSERT INTO `tlokasi` VALUES (2, 'GUDANG OBAT', 'Gudang penyimpanan obat', NULL, NULL);
INSERT INTO `tlokasi` VALUES (3, 'GUDANG UMUM', 'Lokasi utama penyimpanan barang', NULL, '2026-04-21 05:47:09');
INSERT INTO `tlokasi` VALUES (4, 'KOLAM', 'Area kolam', NULL, NULL);
INSERT INTO `tlokasi` VALUES (5, 'Gudang A', 'Gudang A', '2026-04-21 05:47:09', '2026-04-21 05:47:09');
INSERT INTO `tlokasi` VALUES (6, 'Gudang B', 'Gudang B', '2026-04-21 05:47:09', '2026-04-21 05:47:09');
INSERT INTO `tlokasi` VALUES (7, 'Gudang C', 'Gudang C', '2026-04-21 05:47:09', '2026-04-21 05:47:09');

-- ----------------------------
-- Table structure for tlpb
-- ----------------------------
CREATE TABLE `tlpb`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_lpb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `no_po` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `kode_supplier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `jumlah` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `status` enum('draft','received','verified') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tlpb_no_lpb_unique`(`no_lpb` ASC) USING BTREE,
  INDEX `tlpb_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tlpb_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tlpb_no_po_index`(`no_po` ASC) USING BTREE,
  INDEX `tlpb_kode_supplier_index`(`kode_supplier` ASC) USING BTREE,
  CONSTRAINT `tlpb_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tlpb_kode_supplier_foreign` FOREIGN KEY (`kode_supplier`) REFERENCES `tsupplier` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tlpb_no_po_foreign` FOREIGN KEY (`no_po`) REFERENCES `tpo` (`no_po`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tlpb
-- ----------------------------
INSERT INTO `tlpb` VALUES (1, 'LPB/2604/0001', '2026-03-29', NULL, 'SUP002', 'Penerimaan barang dari supplier', 18950000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (2, 'LPB/2604/0002', '2026-04-04', NULL, 'SUP002', 'Penerimaan barang dari supplier', 11725000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (3, 'LPB/2604/0003', '2026-04-13', NULL, 'SUP002', 'Penerimaan barang dari supplier', 28365000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (4, 'LPB/2604/0004', '2026-04-04', NULL, 'SUP001', 'Penerimaan barang dari supplier', 24585000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (5, 'LPB/2604/0005', '2026-03-27', NULL, 'SUP001', 'Penerimaan barang dari supplier', 38650000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (6, 'LPB/2604/0006', '2026-02-17', NULL, 'SUP002', 'Penerimaan barang dari supplier', 3890000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (7, 'LPB/2604/0007', '2026-03-26', NULL, 'SUP002', 'Penerimaan barang dari supplier', 23745000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (8, 'LPB/2604/0008', '2026-03-12', NULL, 'SUP001', 'Penerimaan barang dari supplier', 19775000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (9, 'LPB/2604/0009', '2026-03-23', NULL, 'SUP002', 'Penerimaan barang dari supplier', 13150000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');
INSERT INTO `tlpb` VALUES (10, 'LPB/2604/0010', '2026-02-20', NULL, 'SUP002', 'Penerimaan barang dari supplier', 6825000.00, 'verified', 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41');

-- ----------------------------
-- Table structure for tmati
-- ----------------------------
CREATE TABLE `tmati`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `umur` int NOT NULL COMMENT 'Days since stocking',
  `total_berat` decimal(10, 2) NULL DEFAULT NULL,
  `size` decimal(10, 2) NULL DEFAULT NULL COMMENT 'Size (ekor/kg)',
  `jumlah` int NOT NULL COMMENT 'Number of dead shrimp',
  `penyebab` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Cause of death',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `tmati_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tmati_kolam_tanggal_index`(`kolam` ASC, `tanggal` ASC) USING BTREE,
  INDEX `tmati_kolam_index`(`kolam` ASC) USING BTREE,
  INDEX `tmati_tanggal_index`(`tanggal` ASC) USING BTREE,
  CONSTRAINT `tmati_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tmati_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tmati
-- ----------------------------

-- ----------------------------
-- Table structure for tpemakaian_barang
-- ----------------------------
CREATE TABLE `tpemakaian_barang`  (
  `kolam_id` bigint UNSIGNED NOT NULL,
  `tts_id` bigint UNSIGNED NULL DEFAULT NULL,
  `dari_id` bigint UNSIGNED NULL DEFAULT NULL,
  `tujuan_id` bigint UNSIGNED NULL DEFAULT NULL,
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `waktu_pemberian` time NOT NULL,
  `barang_id` bigint UNSIGNED NOT NULL,
  `jumlah` decimal(10, 2) NOT NULL,
  `satuan_id` bigint UNSIGNED NOT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `tpakan_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tpakan_kolam_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tpakan_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tpemakaian_barang_barang_id_foreign`(`barang_id` ASC) USING BTREE,
  INDEX `tpemakaian_barang_satuan_id_foreign`(`satuan_id` ASC) USING BTREE,
  INDEX `tpemakaian_barang_kolam_id_foreign`(`kolam_id` ASC) USING BTREE,
  INDEX `tpemakaian_barang_dari_id_foreign`(`dari_id` ASC) USING BTREE,
  INDEX `tpemakaian_barang_tujuan_id_foreign`(`tujuan_id` ASC) USING BTREE,
  CONSTRAINT `tpakan_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tpemakaian_barang_barang_id_foreign` FOREIGN KEY (`barang_id`) REFERENCES `tbarang` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tpemakaian_barang_dari_id_foreign` FOREIGN KEY (`dari_id`) REFERENCES `tlokasi` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tpemakaian_barang_kolam_id_foreign` FOREIGN KEY (`kolam_id`) REFERENCES `tkolam` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tpemakaian_barang_satuan_id_foreign` FOREIGN KEY (`satuan_id`) REFERENCES `tsatuan` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `tpemakaian_barang_tujuan_id_foreign` FOREIGN KEY (`tujuan_id`) REFERENCES `tlokasi` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tpemakaian_barang
-- ----------------------------

-- ----------------------------
-- Table structure for tperusahaan
-- ----------------------------
CREATE TABLE `tperusahaan`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `telepon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `npwp` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tperusahaan
-- ----------------------------
INSERT INTO `tperusahaan` VALUES (1, 'PT TAMBAK MAJU', 'Jl. Tambak No. 1', '021-12345678', 'info@tambakmaju.com', NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for tpo
-- ----------------------------
CREATE TABLE `tpo`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_po` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `kode_supplier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `term` int NOT NULL DEFAULT 0 COMMENT 'Payment term (days)',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `total` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `status` enum('draft','approved','partial','complete','cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft',
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tpo_no_po_unique`(`no_po` ASC) USING BTREE,
  INDEX `tpo_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tpo_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `tpo_kode_supplier_index`(`kode_supplier` ASC) USING BTREE,
  CONSTRAINT `tpo_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tpo_kode_supplier_foreign` FOREIGN KEY (`kode_supplier`) REFERENCES `tsupplier` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tpo
-- ----------------------------

-- ----------------------------
-- Table structure for tsampling
-- ----------------------------
CREATE TABLE `tsampling`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `mbw` decimal(10, 2) NOT NULL COMMENT 'Mean Body Weight (gram)',
  `adg` decimal(10, 2) NULL DEFAULT NULL COMMENT 'Average Daily Gain (gram)',
  `umur` int NULL DEFAULT NULL COMMENT 'Days since stocking',
  `qty_sample` int NULL DEFAULT NULL COMMENT 'Number of samples',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tsampling_kolam_tanggal_unique`(`kolam` ASC, `tanggal` ASC) USING BTREE,
  INDEX `tsampling_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `tsampling_kolam_index`(`kolam` ASC) USING BTREE,
  INDEX `tsampling_tanggal_index`(`tanggal` ASC) USING BTREE,
  CONSTRAINT `tsampling_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `tsampling_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tsampling
-- ----------------------------

-- ----------------------------
-- Table structure for tsatuan
-- ----------------------------
CREATE TABLE `tsatuan`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `keterangan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tsatuan_nama_unique`(`nama` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tsatuan
-- ----------------------------
INSERT INTO `tsatuan` VALUES (1, 'KG', 'Kilogram', NULL, NULL);
INSERT INTO `tsatuan` VALUES (2, 'GR', 'Gram', NULL, NULL);
INSERT INTO `tsatuan` VALUES (3, 'M2', 'Meter Persegi', NULL, NULL);
INSERT INTO `tsatuan` VALUES (4, 'M3', 'Meter Kubik', NULL, NULL);
INSERT INTO `tsatuan` VALUES (5, 'PCS', 'Pieces', NULL, NULL);
INSERT INTO `tsatuan` VALUES (6, 'BOX', 'Box', NULL, NULL);
INSERT INTO `tsatuan` VALUES (7, 'KARUNG', 'Karung', NULL, NULL);
INSERT INTO `tsatuan` VALUES (8, 'TON', 'Ton', NULL, NULL);
INSERT INTO `tsatuan` VALUES (9, 'LITER', 'Liter', NULL, NULL);
INSERT INTO `tsatuan` VALUES (10, 'UNIT', 'Unit', NULL, NULL);

-- ----------------------------
-- Table structure for tsupplier
-- ----------------------------
CREATE TABLE `tsupplier`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `kode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nama` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `alamat` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `telepon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `kontak_person` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `npwp` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `limit_hutang` decimal(15, 2) NOT NULL DEFAULT 0.00,
  `tenor` int NOT NULL DEFAULT 0 COMMENT 'hari',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `tsupplier_kode_unique`(`kode` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tsupplier
-- ----------------------------
INSERT INTO `tsupplier` VALUES (1, 'SUP001', 'CV Pakan Udang Jaya', 'Jl. Pakan No. 1', '08123456789', NULL, 'Budi', NULL, 50000000.00, 30, 1, NULL, NULL, NULL);
INSERT INTO `tsupplier` VALUES (2, 'SUP002', 'PT Benur Berkah', 'Jl. Benur No. 2', '08198765432', NULL, 'Ahmad', NULL, 30000000.00, 14, 1, NULL, NULL, NULL);
INSERT INTO `tsupplier` VALUES (3, 'S00001', 'PT. INDOMAKMUR', 'Jl. Raya Bangka No. 123', '081234567890', 'info@indomakmur.co.id', 'Budi Santoso', '01.234.567.8-901.000', 50000000.00, 30, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tsupplier` VALUES (4, 'G00001', 'PT. GUNAWAN', 'Jl. Industri No. 45', '081234567891', 'sales@gunawan.com', 'H. Gunawan', '01.234.567.8-902.000', 75000000.00, 45, 1, '2026-04-13 03:17:41', '2026-04-13 03:45:55', NULL);
INSERT INTO `tsupplier` VALUES (5, 'L00001', 'CV. LAMPUNG', 'Jl. Lampung No. 789', '081234567892', 'order@lampungcv.com', 'Sari', '01.234.567.8-903.000', 30000000.00, 14, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tsupplier` VALUES (6, 'P00001', 'PT. BABEL', 'Jl. Pangkalbalam No. 12', '081234567893', 'info@babel.co.id', 'Agus', '01.234.567.8-904.000', 100000000.00, 60, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tsupplier` VALUES (7, 'P00002', 'UD. PRIMA', 'Jl. Prima No. 345', '081234567894', 'udprima@email.com', 'Dedi', '01.234.567.8-905.000', 25000000.00, 30, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tsupplier` VALUES (8, 'T00001', 'TOKO ASUI', 'Pasar Tradisional Blok A No. 5', '081234567895', NULL, 'Ibu Asui', NULL, 10000000.00, 7, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);
INSERT INTO `tsupplier` VALUES (9, 'T00002', 'TOKO TANI MAKMUR', 'Jl. Tani No. 56', '081234567896', 'tokotani@email.com', 'Pak Tani', NULL, 15000000.00, 14, 1, '2026-04-13 03:17:41', '2026-04-13 03:17:41', NULL);

-- ----------------------------
-- Table structure for ttebar
-- ----------------------------
CREATE TABLE `ttebar`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_bukti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal_tebar` date NOT NULL,
  `kd_kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `sumber_benih` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `jml_bibit` int NOT NULL,
  `avg_berat` decimal(5, 2) NULL DEFAULT NULL,
  `harga_satuan` decimal(12, 2) NULL DEFAULT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `ttebar_no_bukti_unique`(`no_bukti` ASC) USING BTREE,
  INDEX `ttebar_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `ttebar_tanggal_tebar_index`(`tanggal_tebar` ASC) USING BTREE,
  INDEX `ttebar_kd_kolam_index`(`kd_kolam` ASC) USING BTREE,
  CONSTRAINT `ttebar_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `ttebar_kd_kolam_foreign` FOREIGN KEY (`kd_kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ttebar
-- ----------------------------

-- ----------------------------
-- Table structure for tts
-- ----------------------------
CREATE TABLE `tts`  (
  `KD_TS` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `NAMA` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `TIPE` varchar(510) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'M=Masuk, K=Keluar, P=Pemakaian, etc',
  PRIMARY KEY (`KD_TS`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tts
-- ----------------------------
INSERT INTO `tts` VALUES ('01', 'BONUS SUPPLIER', 'M');
INSERT INTO `tts` VALUES ('02', 'KOREKSI STOK OPNAME', 'MK');
INSERT INTO `tts` VALUES ('03', 'MUTASI GUDANG', 'P');
INSERT INTO `tts` VALUES ('04', 'PEMAKAIAN SENDIRI', 'K');
INSERT INTO `tts` VALUES ('05', 'PEMUSNAHAN BARANG', 'K');
INSERT INTO `tts` VALUES ('06', 'KOREKSI', 'MK');
INSERT INTO `tts` VALUES ('07', 'KIRIMAN GUDANG', 'M');
INSERT INTO `tts` VALUES ('08', 'PAKAN', 'K');

-- ----------------------------
-- Table structure for ttstok
-- ----------------------------
CREATE TABLE `ttstok`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `no_bukti` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `jenis` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'PEMAKAIAN SENDIRI, TRANSFER, PENYESUAIAN',
  `tipe` enum('MASUK','KELUAR') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'KELUAR',
  `dari` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Source location/warehouse',
  `tujuan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Destination location/pond',
  `kode_barang` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `kolam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `qty` decimal(10, 2) NOT NULL,
  `satuan` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'KG',
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `created_by` bigint UNSIGNED NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `ttstok_no_bukti_unique`(`no_bukti` ASC) USING BTREE,
  INDEX `ttstok_created_by_foreign`(`created_by` ASC) USING BTREE,
  INDEX `ttstok_dari_foreign`(`dari` ASC) USING BTREE,
  INDEX `ttstok_tujuan_foreign`(`tujuan` ASC) USING BTREE,
  INDEX `ttstok_tanggal_index`(`tanggal` ASC) USING BTREE,
  INDEX `ttstok_kode_barang_index`(`kode_barang` ASC) USING BTREE,
  INDEX `ttstok_kolam_index`(`kolam` ASC) USING BTREE,
  CONSTRAINT `ttstok_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
  CONSTRAINT `ttstok_dari_foreign` FOREIGN KEY (`dari`) REFERENCES `tlokasi` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ttstok_kode_barang_foreign` FOREIGN KEY (`kode_barang`) REFERENCES `tbarang` (`kode`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ttstok_kolam_foreign` FOREIGN KEY (`kolam`) REFERENCES `tkolam` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ttstok_tujuan_foreign` FOREIGN KEY (`tujuan`) REFERENCES `tlokasi` (`nama`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ttstok
-- ----------------------------

-- ----------------------------
-- Table structure for user_permissions
-- ----------------------------
CREATE TABLE `user_permissions`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `permission_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_permissions_user_id_permission_id_unique`(`user_id` ASC, `permission_id` ASC) USING BTREE,
  INDEX `user_permissions_permission_id_foreign`(`permission_id` ASC) USING BTREE,
  CONSTRAINT `user_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `user_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_permissions
-- ----------------------------

-- ----------------------------
-- Table structure for user_roles
-- ----------------------------
CREATE TABLE `user_roles`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_roles_user_id_role_id_unique`(`user_id` ASC, `role_id` ASC) USING BTREE,
  INDEX `user_roles_role_id_foreign`(`role_id` ASC) USING BTREE,
  CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_roles
-- ----------------------------
INSERT INTO `user_roles` VALUES (1, 1, 1, '2026-04-13 03:17:40', '2026-04-13 03:17:40');
INSERT INTO `user_roles` VALUES (2, 2, 2, '2026-04-13 03:17:40', '2026-04-13 03:17:40');
INSERT INTO `user_roles` VALUES (3, 3, 3, '2026-04-13 03:17:40', '2026-04-13 03:17:40');
INSERT INTO `user_roles` VALUES (4, 4, 4, '2026-04-13 03:17:40', '2026-04-13 03:17:40');
INSERT INTO `user_roles` VALUES (5, 5, 5, '2026-04-13 03:17:40', '2026-04-13 03:17:40');
INSERT INTO `user_roles` VALUES (6, 6, 6, '2026-04-13 03:17:40', '2026-04-13 03:17:40');

