-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 08 Nov 2021 pada 10.46
-- Versi server: 10.4.17-MariaDB
-- Versi PHP: 7.4.15

START TRANSACTION;



--
-- Database: `db_claim2021`
--

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

--
-- Struktur dari tabel `tm_caused_type`
--

CREATE TABLE `tm_caused_type` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_caused_type`
--

INSERT INTO `tm_caused_type` (`id`, `name`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('CAT-21100001', 'Vandalisme', NULL, '2021-10-22 14:26:44', 'USR-21100004', NULL, NULL, NULL, NULL),
('CAT-21100002', 'Fraud', NULL, '2021-10-22 14:26:56', 'USR-21100004', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_customer_type`
--

CREATE TABLE `tm_customer_type` (
  `id` char(12) NOT NULL,
  `name` varchar(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` char(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` char(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` char(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_customer_type`
--

INSERT INTO `tm_customer_type` (`id`, `name`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('CTYP-2107001', 'Retail', '2021-07-22 09:53:08', 'USR-21040000', '2021-07-22 10:46:19', 'USR-21040000', NULL, NULL),
('CTYP-2107002', 'Reseller A', '2021-07-22 09:53:08', 'USR-21040000', NULL, NULL, NULL, NULL),
('CTYP-2107003', 'Reseller B', '2021-07-22 09:53:08', 'USR-21040000', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_group`
--

CREATE TABLE `tm_group` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_group`
--

INSERT INTO `tm_group` (`id`, `name`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('GRP-21040001', 'Developer', NULL, '2021-04-29 07:36:52', 'USR-21040000', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_menu`
--

CREATE TABLE `tm_menu` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `caption` varchar(50) NOT NULL,
  `url` varchar(256) NOT NULL,
  `icon` varchar(50) DEFAULT NULL,
  `parent` varchar(15) DEFAULT NULL,
  `hierarchy` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_menu`
--

INSERT INTO `tm_menu` (`id`, `name`, `caption`, `url`, `icon`, `parent`, `hierarchy`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('MNU-21040001', 'Dashboard', 'Dasbor', 'dashboard', 'bx bx-tachometer', NULL, 1, '2021-04-29 07:51:35', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21040002', 'Data Master', 'Master', '#', 'bx bx-data', NULL, 3, '2021-04-29 07:51:35', 'USR-21040000', '2021-05-17 15:45:04', 'USR-21040000', NULL, NULL),
('MNU-21040003', 'Warehouse', 'Cabang', 'master/warehouse', NULL, 'MNU-21040002', 1, '2021-04-29 07:51:35', 'USR-21040000', '2021-10-11 14:12:33', 'USR-21040000', NULL, NULL),
('MNU-21040004', 'User', 'User', 'master/user', NULL, 'MNU-21040002', 2, '2021-04-29 07:51:35', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21040005', 'Menu', 'Menu', 'master/menu', NULL, 'MNU-21040002', 3, '2021-04-29 07:51:35', 'USR-21040000', '2021-05-05 17:17:29', 'USR-21040000', NULL, NULL),
('MNU-21050002', 'Customer', 'Customer', 'master/customer', '', 'MNU-21040002', 4, '2021-05-10 13:54:37', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21050003', 'Role', 'Role', 'master/role', '', 'MNU-21040002', 5, '2021-05-11 11:24:18', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21090001', 'Report', 'Laporan', '#', 'bx bxs-report', NULL, 4, '2021-09-01 13:39:43', 'USR-21040000', '2021-09-01 14:52:29', 'USR-21040000', NULL, NULL),
('MNU-21100001', 'Client', 'Client', 'master/client', '', 'MNU-21040002', 6, '2021-10-11 18:17:48', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21100002', 'Insurance', 'Insurance', 'master/insurance', '', 'MNU-21040002', 7, '2021-10-11 18:18:20', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21100003', 'Adjuster', 'Adjuster', 'master/adjuster', '', 'MNU-21040002', 8, '2021-10-11 18:18:53', 'USR-21040000', NULL, NULL, NULL, NULL),
('MNU-21100004', 'Data Claim', 'Claim', 'claim', 'bx bx-file', NULL, 2, '2021-10-12 12:11:56', 'USR-21040000', '2021-10-12 16:44:33', 'USR-21040000', NULL, NULL),
('MNU-21100005', 'Type of cause', 'Type of cause', 'master/causedType', '', 'MNU-21040002', 9, '2021-10-15 05:54:56', 'USR-21040000', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_permission`
--

CREATE TABLE `tm_permission` (
  `id` varchar(15) NOT NULL,
  `menu_id` varchar(15) NOT NULL,
  `description` varchar(50) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_permission`
--

INSERT INTO `tm_permission` (`id`, `menu_id`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('PRM-21050001', 'MNU-21040004', 'read User', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050002', 'MNU-21040004', 'write User', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050003', 'MNU-21040005', 'read Menu', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050004', 'MNU-21040005', 'write Menu', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050005', 'MNU-21040003', 'read Warehouse', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050006', 'MNU-21040001', 'read Dashboard', '2021-05-04 09:51:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050009', 'MNU-21050002', 'read Customer', '2021-05-17 10:13:05', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050010', 'MNU-21050002', 'write Customer', '2021-05-17 10:13:05', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050011', 'MNU-21050003', 'read Role', '2021-05-17 10:13:05', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050012', 'MNU-21050003', 'write Role', '2021-05-17 10:13:05', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050033', 'MNU-21040003', 'write Warehouse', '2021-05-19 10:32:29', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050046', 'MNU-21040002', 'read Data Master', '2021-05-31 14:30:20', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21050047', 'MNU-21040002', 'write Data Master', '2021-05-31 14:30:20', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21090001', 'MNU-21090001', 'read Report', '2021-09-01 13:39:43', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21090002', 'MNU-21090001', 'write Report', '2021-09-01 13:39:43', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100001', 'MNU-21100001', 'read Client', '2021-10-11 18:17:48', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100002', 'MNU-21100001', 'write Client', '2021-10-11 18:17:48', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100003', 'MNU-21100002', 'read Insurance', '2021-10-11 18:18:20', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100004', 'MNU-21100002', 'write Insurance', '2021-10-11 18:18:20', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100005', 'MNU-21100003', 'read Adjuster', '2021-10-11 18:18:53', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100006', 'MNU-21100003', 'write Adjuster', '2021-10-11 18:18:53', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100007', 'MNU-21100004', 'read Claim', '2021-10-12 12:11:56', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100008', 'MNU-21100004', 'write Claim', '2021-10-12 12:11:56', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100009', 'MNU-21100005', 'read Type of cause', '2021-10-15 05:54:56', 'USR-21040000', NULL, NULL, NULL, NULL),
('PRM-21100010', 'MNU-21100005', 'write Type of cause', '2021-10-15 05:54:56', 'USR-21040000', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_progress`
--

CREATE TABLE `tm_progress` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_progress`
--

INSERT INTO `tm_progress` (`id`, `name`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
(0, '0%', NULL, '2021-10-19 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(1, '10%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(2, '20%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(3, '30%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(4, '40%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(5, '50%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(6, '60%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(7, '70%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(8, '80%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(9, '90%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL),
(10, '100%', NULL, '2021-10-11 00:00:00', 'fauzan', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_region`
--

CREATE TABLE `tm_region` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `symbol` varchar(2) NOT NULL,
  `remark` varchar(100) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_region`
--

INSERT INTO `tm_region` (`id`, `name`, `symbol`, `remark`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('RGN-21040001', 'Jakarta', 'JK', '', '2021-04-29 11:49:00', 'USR-21040001', NULL, NULL, NULL, NULL),
('RGN-21040002', 'Jombang', 'JB', '', '2021-04-29 11:49:00', 'USR-21040001', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_role`
--

CREATE TABLE `tm_role` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_role`
--

INSERT INTO `tm_role` (`id`, `name`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('ROL-21050001', 'Administrator', 'Admin+dari+sistem+internal+Sedana+Agro', '2021-05-05 10:10:00', 'USR-21040000', '2021-10-11 17:41:38', 'USR-21040000', NULL, NULL),
('ROL-21050002', 'Marketing', '', '2021-05-05 10:10:00', 'USR-21040000', '2021-08-30 14:46:47', 'USR-21040000', NULL, NULL),
('ROL-21080001', 'Finance', '', '2021-08-23 09:27:27', 'USR-21040000', '2021-08-23 09:27:21', 'USR-21040000', NULL, NULL),
('ROL-21080002', 'Management', '', '2021-08-23 09:27:27', 'USR-21040000', '2021-08-23 09:27:27', 'USR-21040000', NULL, NULL),
('ROL-21100001', 'Client SSI', 'User SSI', '2021-10-11 17:40:56', 'USR-21040000', '2021-10-15 09:39:31', 'USR-21040000', NULL, NULL);

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

--
-- Struktur dari tabel `tm_third_party`
--

CREATE TABLE `tm_third_party` (
  `id` varchar(15) NOT NULL,
  `region_id` varchar(15) DEFAULT NULL,
  `third_party_type_id` varchar(15) NOT NULL DEFAULT '' COMMENT '3RDPT-21040001= warehouse,3RDPT-21040002=customer,3RDPT-21040003=marketing, 3RDPT-21100001=Insurance, 3RDPT-21100002=Client, 3RDPT-21100003=Loss Adjuster',
  `customer_type_id` char(12) DEFAULT NULL,
  `name` varchar(50) NOT NULL,
  `credit_limit` decimal(10,0) NOT NULL DEFAULT 0,
  `credit_limit_day` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `can_use_as_partner` tinyint(4) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_third_party`
--

INSERT INTO `tm_third_party` (`id`, `region_id`, `third_party_type_id`, `customer_type_id`, `name`, `credit_limit`, `credit_limit_day`, `can_use_as_partner`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('3RDP-21050002', 'RGN-21040002', '3RDPT-21040002', 'CTYP-2107002', 'Fauzan', '1000000', 2, 0, '2021-05-10 14:33:22', 'USR-21040000', '2021-07-22 10:26:16', 'USR-21040000', NULL, NULL),
('3RDP-21050004', 'RGN-21040002', '3RDPT-21040001', NULL, 'SEDANA JOMBANG', '0', 0, 0, '2021-05-19 09:38:33', 'USR-21040000', '2021-10-11 14:19:18', 'USR-21040000', '2021-10-11 14:19:18', 'USR-21040000'),
('3RDP-21050007', NULL, '3RDPT-21040003', NULL, 'Marketing', '0', 0, 0, '2021-05-25 11:06:11', 'USR-21040000', '2021-05-25 11:12:54', 'USR-21040000', NULL, NULL),
('3RDP-21060001', 'RGN-21040001', '3RDPT-21040001', NULL, 'SEDANA JAKARTA', '0', 0, 0, '2021-06-07 09:26:34', 'USR-21040000', '2021-10-11 14:22:51', 'USR-21040000', NULL, NULL),
('3RDP-21070001', NULL, '3RDPT-21040002', 'CTYP-2107001', 'Tokopedia', '0', 0, 0, '2021-07-14 15:44:51', 'USR-21040000', '2021-07-23 15:25:09', 'USR-21040000', NULL, NULL),
('3RDP-21070002', NULL, '3RDPT-21040002', 'CTYP-2107001', 'Shopee', '0', 0, 0, '2021-07-14 15:45:30', 'USR-21040000', '2021-07-23 15:24:59', 'USR-21040000', NULL, NULL),
('3RDP-21080001', NULL, '3RDPT-21040002', 'CTYP-2107002', 'Naura', '0', 0, 0, '2021-08-24 16:27:27', 'USR-21080001', NULL, NULL, NULL, NULL),
('3RDP-21100001', NULL, '3RDPT-21100002', '', 'PT. Swadharma Sarana Informatika', '0', 0, 0, '2021-08-24 16:27:27', 'USR-21080001', '2021-10-14 15:20:32', 'USR-21040000', NULL, NULL),
('3RDP-21100002', NULL, '3RDPT-21100001', '', 'PT. Asuransi Jasa Indonesia', '0', 0, 0, '2021-08-24 16:27:27', 'USR-21080001', NULL, NULL, NULL, NULL),
('3RDP-21100003', NULL, '3RDPT-21100003', '', 'PT. Adjusterindo', '0', 0, 0, '2021-08-24 16:27:27', 'USR-21080001', NULL, NULL, NULL, NULL),
('3RDP-21100004', NULL, '3RDPT-21100001', NULL, 'PT. Tugu Pratama Indonesia', '0', 0, 0, '2021-10-15 10:29:22', 'USR-21100002', NULL, NULL, NULL, NULL),
('3RDP-21100005', NULL, '3RDPT-21100003', NULL, 'PT Axis International Indonesia', '0', 0, 0, '2021-10-22 14:24:09', 'USR-21100004', NULL, NULL, NULL, NULL),
('3RDP-21100006', NULL, '3RDPT-21100003', NULL, 'PT Radita Hutama Internusa', '0', 0, 0, '2021-10-22 14:24:31', 'USR-21100004', NULL, NULL, NULL, NULL),
('3RDP-21100007', NULL, '3RDPT-21100003', NULL, 'PT Aqualis Braemer Indonesia Adjusting', '0', 0, 0, '2021-10-22 14:25:01', 'USR-21100004', NULL, NULL, NULL, NULL),
('3RDP-21100008', NULL, '3RDPT-21100001', NULL, 'PT Asuransi Artarindo', '0', 0, 0, '2021-10-22 14:32:46', 'USR-21100004', NULL, NULL, NULL, NULL),
('3RDP-21100009', NULL, '3RDPT-21100003', NULL, 'PT Asuransi Tugu Pratama Indonesia', '0', 0, 0, '2021-10-22 15:33:32', 'USR-21100004', NULL, NULL, NULL, NULL),
('3RDP-21100010', NULL, '3RDPT-21100003', NULL, 'PT Satria Dharma Pusaka Crawford', '0', 0, 0, '2021-10-22 15:46:01', 'USR-21100004', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tm_whatsapp_number`
--

CREATE TABLE `tm_whatsapp_number` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tm_whatsapp_number`
--

INSERT INTO `tm_whatsapp_number` (`id`, `name`, `description`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('WA-21100001', '08569133000', 'achmad fauzan', '2021-10-22 14:26:44', 'USR-21100004', NULL, NULL, NULL, NULL),
('WA-21100002', 'Fraud', NULL, '2021-10-22 14:26:56', 'USR-21100004', NULL, NULL, '2021-11-07 23:27:24', 'fauzan');

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

--
-- Struktur dari tabel `tp_claim`
--

CREATE TABLE `tp_claim` (
  `id` varchar(21) NOT NULL,
  `name` varchar(150) NOT NULL,
  `date` date DEFAULT NULL,
  `description` varchar(200) DEFAULT NULL,
  `policy_number` varchar(250) DEFAULT NULL,
  `insurance_id` varchar(21) NOT NULL,
  `client_id` varchar(21) NOT NULL DEFAULT '',
  `caused_type_id` varchar(21) NOT NULL,
  `caused_by` varchar(255) DEFAULT NULL,
  `own_risk` varchar(100) DEFAULT NULL,
  `estimated_loss` double(18,2) DEFAULT 0.00,
  `so_location` varchar(150) DEFAULT NULL,
  `atm_location` varchar(200) DEFAULT NULL,
  `atm_name` varchar(100) DEFAULT NULL,
  `atm_number` varchar(100) DEFAULT NULL,
  `loss_adjuster_id` varchar(21) DEFAULT NULL,
  `progress_id` int(11) DEFAULT 0,
  `is_closed` tinyint(4) DEFAULT 0,
  `closed_type_id` tinyint(4) DEFAULT 0 COMMENT '0:default;\r\n1:paid;\r\n5:withdraw',
  `closed_at` datetime DEFAULT NULL,
  `closed_by` varchar(15) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tp_claim`
--

INSERT INTO `tp_claim` (`id`, `name`, `date`, `description`, `policy_number`, `insurance_id`, `client_id`, `caused_type_id`, `caused_by`, `own_risk`, `estimated_loss`, `so_location`, `atm_location`, `atm_name`, `atm_number`, `loss_adjuster_id`, `progress_id`, `is_closed`, `closed_type_id`, `closed_at`, `closed_by`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('CLM-21100001', 'Fraud Balikpapan 28 Feb 2021', '2021-02-28', 'FG Balikpapan ', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '43042500', 286950000.00, 'Balikpapan', 'BPN Regency', 'BNI', 'S1ABPN12LL', '3RDP-21100005', 0, 0, 0, NULL, NULL, '2021-10-22 14:41:30', 'USR-21100004', '2021-10-22 14:42:21', 'USR-21100004', NULL, NULL),
('CLM-21100002', 'Fraud Tangerang 24 Mar 2021', '2021-03-24', 'FG Tangerang ', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '93637500', 624250000.00, 'Tangerang', 'Indomaret Kalasan', 'BRI', '74381', '3RDP-21100006', 0, 0, 0, NULL, NULL, '2021-10-22 14:52:13', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100003', 'Fraud Pangkalan Kerinci 20 Mar 2021', '2021-03-20', 'FG Pangkalan Kerinci', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '35000000', 97200000.00, 'Pangkalan Kerinci', 'Toko Jaya Baru', 'BRI', '621195', '3RDP-21100009', 0, 0, 0, NULL, NULL, '2021-10-22 15:34:43', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100004', 'Fraud Duri 22 Mar 2021', '2021-03-22', 'FG Duri', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '35000000', 150000000.00, 'Duri', '', '', '', '3RDP-21100009', 0, 0, 0, NULL, NULL, '2021-10-22 15:38:49', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100005', 'Fraud Mamuju 20 Mar 2021', '2021-03-20', 'FG Mamuju', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '67582500', 450550000.00, 'Mamuju', 'Kantor Bupati Pasangkayu', 'BNI', 'S1EMMJ11MX', '3RDP-21100010', 0, 0, 0, NULL, NULL, '2021-10-22 15:49:19', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100006', 'Fraud Denpasar 13 Apr 2021', '2021-04-13', 'FG Denpasar', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '79582500', 530550000.00, 'Denpasar', 'Bandara Ngurah Rai', 'BRI', '56469', '3RDP-21100006', 0, 0, 0, NULL, NULL, '2021-10-22 16:08:22', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100007', 'Fraud Lhokseumawe 21 Apr 2021', '2021-04-21', 'FG Lhokseumawe', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '35220000', 234800000.00, 'Lhokseumawe', 'Bandara Rembele', 'BNI', 'S1ABRNA008', '3RDP-21100009', 0, 0, 0, NULL, NULL, '2021-10-22 16:11:24', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100008', 'Fraud Tarakan 05 May 2021', '2021-05-05', 'FG Tarakan', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '35000000', 153150000.00, 'Tarakan', 'Kantor Pos', 'Mandiri', 'S1AN1NR9', '3RDP-21100009', 0, 0, 0, NULL, NULL, '2021-10-22 16:17:20', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100009', 'Fraud Bau Bau 01 May 2021', '2021-05-01', 'FG Bau Bau', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '145687500', 971250000.00, 'Bau Bau', 'Pasipa Raya', 'BNI', 'S1JBAUA020', '3RDP-21100006', 0, 0, 0, NULL, NULL, '2021-10-22 16:24:49', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100010', 'Fraud Depok 26 Apr 2021', '2021-04-26', 'FG Depok', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '45120000', 300800000.00, 'Depok', 'RS Hermina', 'BNI', 'S1FMGD10PL', '3RDP-21100007', 0, 0, 0, NULL, NULL, '2021-10-22 16:30:29', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100011', 'Fraud Rantau Prapat 06 Jun 2021', '2021-06-06', 'FG Rantau Prapat', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '83205000', 554700000.00, 'Rantau Prapat', 'KC Kota Pinang', 'BRI', '94743', '3RDP-21100007', 0, 0, 0, NULL, NULL, '2021-10-22 16:34:25', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100012', 'Fraud Palu 16 Jul 2021', '2021-07-16', 'FG Palu Ampana', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '99495000', 663300000.00, 'Palu', 'KK Ampana', 'BNI', 'S1JPRIA004', '3RDP-21100007', 0, 0, 0, NULL, NULL, '2021-10-22 16:37:22', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100013', 'Fraud Banjarmasin 20 May 2021', '2021-05-20', 'FG Banjarmasin', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '69825000', 465500000.00, 'Banjarmasin', '', '', '', '3RDP-21100009', 0, 0, 0, NULL, NULL, '2021-10-22 16:41:02', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100014', 'Fraud Ambon 01 Aug 2021', '2021-08-01', 'FG Ambon', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '61725000', 411500000.00, 'Ambon', 'KCP Seram Bagian Barat', 'BNI', 'S1AABNA054', '3RDP-21100005', 0, 0, 0, NULL, NULL, '2021-10-22 16:43:25', 'USR-21100004', NULL, NULL, NULL, NULL),
('CLM-21100015', 'Fraud Muara Enim 04 Aug 2021', '2021-08-04', 'FG Muara Enim Baturaja', 'PVV2100019', '3RDP-21100004', '3RDP-21100001', 'CAT-21100002', 'Fraud', '105000000', 700000000.00, 'Muara Enim', 'Baturaja', 'BNI', '', '3RDP-21100006', 0, 0, 0, NULL, NULL, '2021-10-22 16:45:23', 'USR-21100004', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tp_claim_document`
--

CREATE TABLE `tp_claim_document` (
  `id` int(11) NOT NULL,
  `claim_progress_id` varchar(21) NOT NULL DEFAULT '',
  `name` varchar(250) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `size` varchar(50) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Struktur dari tabel `tp_claim_progress`
--

CREATE TABLE `tp_claim_progress` (
  `id` varchar(15) NOT NULL,
  `name` varchar(50) NOT NULL,
  `date` date DEFAULT NULL,
  `claim_id` varchar(21) NOT NULL DEFAULT '',
  `description_1` varchar(250) DEFAULT NULL,
  `description_2` varchar(250) DEFAULT NULL,
  `video_1` varchar(150) DEFAULT NULL,
  `video_2` varchar(150) DEFAULT NULL,
  `video_3` varchar(150) DEFAULT NULL,
  `progress_id` int(11) DEFAULT 1,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Struktur dari tabel `tp_role_client`
--

CREATE TABLE `tp_role_client` (
  `client_id` varchar(15) NOT NULL,
  `role_id` varchar(15) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tp_role_client`
--

INSERT INTO `tp_role_client` (`client_id`, `role_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('3RDP-21100001', 'ROL-21100001', '2021-10-15 09:39:31', '2021-10-15 09:3', NULL, NULL, NULL, NULL),
('3RDP-21100001', 'ROL-21100004', '2021-10-15 08:28:01', '2021-10-15 08:2', NULL, NULL, NULL, NULL),
('3RDP-21100007', 'ROL-21100002', '2021-10-15 08:28:16', '2021-10-15 08:2', NULL, NULL, NULL, NULL),
('3RDP-21100007', 'ROL-21100004', '2021-10-15 08:28:01', '2021-10-15 08:2', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tp_role_menu`
--

CREATE TABLE `tp_role_menu` (
  `role_id` char(15) NOT NULL,
  `menu_id` char(15) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` char(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` char(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` char(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tp_role_menu`
--

INSERT INTO `tp_role_menu` (`role_id`, `menu_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('ROL-21050001', 'MNU-21040001', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21040002', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21040004', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21040005', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21050002', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21050003', '2021-08-24 09:05:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21040003', '2021-08-24 10:49:44', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21090001', '2021-09-21 15:35:51', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21040001', '2021-10-11 17:30:39', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21100001', '2021-10-11 18:19:09', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21100002', '2021-10-11 18:19:09', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21100003', '2021-10-11 18:19:09', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21040002', '2021-10-11 18:19:33', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21100001', '2021-10-11 18:19:33', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21100002', '2021-10-11 18:19:33', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21100003', '2021-10-11 18:19:33', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21100004', '2021-10-12 12:12:15', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21100001', 'MNU-21100004', '2021-10-14 23:35:42', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21100001', 'MNU-21040001', '2021-10-15 00:07:34', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21100004', '2021-10-15 00:10:01', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050001', 'MNU-21100005', '2021-10-15 05:55:07', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21100005', '2021-10-15 05:55:46', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21090001', '2021-10-15 11:06:33', 'USR-21040000', NULL, NULL, NULL, NULL),
('ROL-21050002', 'MNU-21040004', '2021-10-15 11:09:26', 'USR-21040000', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tp_user_loc_id`
--

CREATE TABLE `tp_user_loc_id` (
  `user_id` char(15) NOT NULL,
  `loc_id` char(15) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` char(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` char(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` char(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tp_user_loc_id`
--

INSERT INTO `tp_user_loc_id` (`user_id`, `loc_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('USR-21080001', '3RDP-21060001', '2021-10-11 14:23:06', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100001', '3RDP-21060001', '2021-10-14 23:25:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100002', '3RDP-21060001', '2021-10-15 10:27:09', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100003', '3RDP-21060001', '2021-10-15 10:27:40', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100004', '3RDP-21060001', '2021-10-19 16:50:57', 'USR-21100002', NULL, NULL, NULL, NULL);

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

--
-- Struktur dari tabel `tp_user_role`
--

CREATE TABLE `tp_user_role` (
  `user_id` varchar(15) NOT NULL,
  `role_id` varchar(15) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` varchar(15) NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(15) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `deleted_by` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `tp_user_role`
--

INSERT INTO `tp_user_role` (`user_id`, `role_id`, `created_at`, `created_by`, `updated_at`, `updated_by`, `deleted_at`, `deleted_by`) VALUES
('USR-21040000', 'ROL-21050001', '2021-05-05 10:10:00', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21080001', 'ROL-21050002', '2021-10-11 14:23:06', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100001', 'ROL-21100001', '2021-10-14 23:25:41', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100002', 'ROL-21050002', '2021-10-15 10:27:09', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100003', 'ROL-21100001', '2021-10-15 10:27:40', 'USR-21040000', NULL, NULL, NULL, NULL),
('USR-21100004', 'ROL-21050002', '2021-10-19 16:50:57', 'USR-21100002', NULL, NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `tm_caused_type`
--
ALTER TABLE `tm_caused_type`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`);

--
-- Indeks untuk tabel `tm_customer_type`
--
ALTER TABLE `tm_customer_type`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_group`
--
ALTER TABLE `tm_group`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`);

--
-- Indeks untuk tabel `tm_menu`
--
ALTER TABLE `tm_menu`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_permission`
--
ALTER TABLE `tm_permission`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_progress`
--
ALTER TABLE `tm_progress`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_region`
--
ALTER TABLE `tm_region`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD UNIQUE KEY `symbol` (`symbol`);

--
-- Indeks untuk tabel `tm_role`
--
ALTER TABLE `tm_role`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_third_party`
--
ALTER TABLE `tm_third_party`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tm_whatsapp_number`
--
ALTER TABLE `tm_whatsapp_number`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`);

--
-- Indeks untuk tabel `tp_claim`
--
ALTER TABLE `tp_claim`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tp_claim_document`
--
ALTER TABLE `tp_claim_document`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tp_claim_progress`
--
ALTER TABLE `tp_claim_progress`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `tp_role_client`
--
ALTER TABLE `tp_role_client`
  ADD PRIMARY KEY (`client_id`,`role_id`),
  ADD KEY `fk_user_role_user` (`client_id`),
  ADD KEY `fk_user_role_role` (`role_id`);

--
-- Indeks untuk tabel `tp_user_role`
--
ALTER TABLE `tp_user_role`
  ADD KEY `fk_user_role_user` (`user_id`),
  ADD KEY `fk_user_role_role` (`role_id`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `tp_claim_document`
--
ALTER TABLE `tp_claim_document`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
COMMIT;

