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

START TRANSACTION;



--
-- Database: `proj_dbase`
--

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

--
-- Table structure for table `activity_log`
--

CREATE TABLE `activity_log` (
  `id` int(11) NOT NULL,
  `ip_address` varchar(255) DEFAULT NULL,
  `activity` text DEFAULT NULL,
  `reference` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `activity_log`
--

TRUNCATE TABLE `activity_log`;
-- --------------------------------------------------------

--
-- Table structure for table `master_floor`
--

CREATE TABLE `master_floor` (
  `id` int(11) NOT NULL,
  `floor` varchar(20) DEFAULT NULL,
  `floor_image` varchar(255) DEFAULT NULL,
  `status` int(11) DEFAULT 1,
  `enable_donation` int(11) NOT NULL DEFAULT 0,
  `last_updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  `flag` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `master_floor`
--

TRUNCATE TABLE `master_floor`;
--
-- Dumping data for table `master_floor`
--

INSERT INTO `master_floor` (`id`, `floor`, `floor_image`, `status`, `enable_donation`, `last_updated_by`, `created_at`, `updated_at`, `deleted_at`, `flag`) VALUES
(2, 'Floor 1', 'simple', 1, 1, 1, '2023-12-22 07:42:45', '2024-02-11 15:02:32', NULL, 1);

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

--
-- Table structure for table `master_layout`
--

CREATE TABLE `master_layout` (
  `id` int(11) NOT NULL,
  `id_floor` int(11) DEFAULT NULL,
  `id_row` int(11) DEFAULT NULL,
  `no` decimal(10,0) DEFAULT NULL,
  `code` varchar(20) DEFAULT NULL,
  `seat_code` varchar(20) NOT NULL,
  `coords` varchar(255) DEFAULT NULL,
  `shape` varchar(50) DEFAULT NULL,
  `price` float(17,2) DEFAULT NULL,
  `status` int(11) DEFAULT 1,
  `last_updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  `flag` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `master_layout`
--

TRUNCATE TABLE `master_layout`;
--
-- Dumping data for table `master_layout`
--

INSERT INTO `master_layout` (`id`, `id_floor`, `id_row`, `no`, `code`, `seat_code`, `coords`, `shape`, `price`, `status`, `last_updated_by`, `created_at`, `updated_at`, `deleted_at`, `flag`) VALUES
(1, 2, 6, '1', '2-6-1', 'A1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(2, 2, 6, '2', '2-6-2', 'A2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(3, 2, 6, '3', '2-6-3', 'A3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(4, 2, 6, '5', '2-6-5', 'A5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(5, 2, 6, '4', '2-6-4', 'A4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(6, 2, 6, '6', '2-6-6', 'A6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(7, 2, 6, '7', '2-6-7', 'A7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(8, 2, 6, '8', '2-6-8', 'A8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(9, 2, 7, '1', '2-7-1', 'B1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(10, 2, 7, '2', '2-7-2', 'B2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(11, 2, 7, '3', '2-7-3', 'B3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(12, 2, 7, '4', '2-7-4', 'B4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(13, 2, 7, '5', '2-7-5', 'B5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(14, 2, 7, '6', '2-7-6', 'B6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(15, 2, 7, '7', '2-7-7', 'B7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(16, 2, 7, '8', '2-7-8', 'B8', NULL, 'circle', 30.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-22 11:10:18', NULL, 1),
(17, 2, 8, '1', '2-8-1', 'C1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:33', NULL, 1),
(18, 2, 8, '2', '2-8-2', 'C2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(19, 2, 8, '3', '2-8-3', 'C3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:39', NULL, 1),
(20, 2, 8, '4', '2-8-4', 'C4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:42', NULL, 1),
(21, 2, 8, '5', '2-8-5', 'C5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:45', NULL, 1),
(22, 2, 8, '6', '2-8-6', 'C6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:48', NULL, 1),
(23, 2, 8, '7', '2-8-7', 'C7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:51', NULL, 1),
(24, 2, 8, '8', '2-8-8', 'C8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:22:55', NULL, 1),
(25, 2, 9, '8', '2-9-8', 'D8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:23:23', NULL, 1),
(26, 2, 9, '7', '2-9-7', 'D7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(27, 2, 9, '1', '2-9-1', 'D1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:23:38', NULL, 1),
(28, 2, 9, '2', '2-9-2', 'D2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(29, 2, 9, '3', '2-9-3', 'D3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(30, 2, 9, '4', '2-9-4', 'D4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(31, 2, 9, '5', '2-9-5', 'D5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:23:51', NULL, 1),
(32, 2, 9, '6', '2-9-6', 'D6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:23:57', NULL, 1),
(33, 2, 10, '1', '2-10-1', 'E1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:00', NULL, 1),
(34, 2, 10, '2', '2-10-2', 'E2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(35, 2, 10, '3', '2-10-3', 'E3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:06', NULL, 1),
(36, 2, 10, '4', '2-10-4', 'E4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:09', NULL, 1),
(37, 2, 10, '5', '2-10-5', 'E5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:12', NULL, 1),
(38, 2, 10, '6', '2-10-6', 'E6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:15', NULL, 1),
(39, 2, 10, '7', '2-10-7', 'E7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:17', NULL, 1),
(40, 2, 10, '8', '2-10-8', 'E8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:20', NULL, 1),
(41, 2, 10, '9', '2-10-9', 'E9', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:24:23', NULL, 1),
(42, 2, 10, '10', '2-10-10', 'E10', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:15', NULL, 1),
(43, 2, 11, '1', '2-11-1', 'F1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(44, 2, 11, '2', '2-11-2', 'F2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:24', NULL, 1),
(45, 2, 11, '3', '2-11-3', 'F3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:25', NULL, 1),
(46, 2, 11, '4', '2-11-4', 'F4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:28', NULL, 1),
(47, 2, 11, '5', '2-11-5', 'F5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-07 04:14:33', NULL, 1),
(48, 2, 11, '6', '2-11-6', 'F6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:32', NULL, 1),
(49, 2, 11, '7', '2-11-7', 'F7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(50, 2, 11, '8', '2-11-8', 'F8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:38', NULL, 1),
(51, 2, 11, '9', '2-11-9', 'F9', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:44', NULL, 1),
(52, 2, 11, '10', '2-11-10', 'F10', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:48', NULL, 1),
(53, 2, 12, '1', '2-12-1', 'G1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:54', NULL, 1),
(54, 2, 12, '2', '2-12-2', 'G2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:56', NULL, 1),
(55, 2, 12, '3', '2-12-3', 'G3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:25:58', NULL, 1),
(56, 2, 12, '4', '2-12-4', 'G4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:01', NULL, 1),
(57, 2, 12, '5', '2-12-5', 'G5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(58, 2, 12, '6', '2-12-6', 'G6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:06', NULL, 1),
(59, 2, 12, '7', '2-12-7', 'G7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-03-02 16:04:02', NULL, 1),
(60, 2, 12, '8', '2-12-8', 'G8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:11', NULL, 1),
(61, 2, 12, '9', '2-12-9', 'G9', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:13', NULL, 1),
(62, 2, 12, '10', '2-12-10', 'G10', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:17', NULL, 1),
(63, 2, 13, '1', '2-13-1', 'H1', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:20', NULL, 1),
(64, 2, 13, '2', '2-13-2', 'H2', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:39', NULL, 1),
(65, 2, 13, '3', '2-13-3', 'H3', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:41', NULL, 1),
(66, 2, 13, '4', '2-13-4', 'H4', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:42', NULL, 1),
(67, 2, 13, '5', '2-13-5', 'H5', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:44', NULL, 1),
(68, 2, 13, '6', '2-13-6', 'H6', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:46', NULL, 1),
(69, 2, 13, '7', '2-13-7', 'H7', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:49', NULL, 1),
(70, 2, 13, '8', '2-13-8', 'H8', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:51', NULL, 1),
(71, 2, 13, '9', '2-13-9', 'H9', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:53', NULL, 1),
(72, 2, 13, '10', '2-13-10', 'H10', NULL, 'circle', 25.00, 1, NULL, '2024-01-16 18:38:19', '2024-02-19 23:26:57', NULL, 1);

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

--
-- Table structure for table `master_row`
--

CREATE TABLE `master_row` (
  `id` int(11) NOT NULL,
  `rows` varchar(20) DEFAULT NULL,
  `status` int(11) DEFAULT 1,
  `last_updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL,
  `flag` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `master_row`
--

TRUNCATE TABLE `master_row`;
--
-- Dumping data for table `master_row`
--

INSERT INTO `master_row` (`id`, `rows`, `status`, `last_updated_by`, `created_at`, `updated_at`, `deleted_at`, `flag`) VALUES
(6, 'A', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(7, 'B', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(8, 'C', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(9, 'D', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(10, 'E', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(11, 'F', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(12, 'G', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(13, 'H', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(14, 'I', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(15, 'J', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(16, 'K', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(17, 'L', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(18, 'M', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(19, 'N', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(20, 'O', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(21, 'P', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(22, 'Q', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(23, 'R', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(24, 'S', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(25, 'T', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(26, 'U', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(27, 'V', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(28, 'W', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(29, 'X', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(30, 'Y', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1),
(31, 'Z', 1, 1, '2023-12-22 07:50:36', '2023-12-22 07:50:36', NULL, 1);

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

--
-- Table structure for table `master_user`
--

CREATE TABLE `master_user` (
  `id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `middle_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` varchar(255) NOT NULL,
  `authKey` text DEFAULT NULL,
  `accessToken` text DEFAULT NULL,
  `isActive` int(11) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `master_user`
--

TRUNCATE TABLE `master_user`;
--
-- Dumping data for table `master_user`
--

INSERT INTO `master_user` (`id`, `username`, `first_name`, `middle_name`, `last_name`, `email`, `password`, `role`, `authKey`, `accessToken`, `isActive`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'superadmin', 'Natanael', NULL, 'Octodion', 'admin@dreamstechnology.web.id', '$2y$13$9vNSON3QOWwFZhH35WGgtubqwv99BVrgv22647f/c3FWf0yQe6MRm', 'ADMIN', NULL, NULL, 1, '2023-11-18 03:16:59', '2023-11-24 01:26:28', NULL),
(2, 'wliandri', 'William', NULL, 'Liandri', 'williamliandri@gmail.com', '$2a$12$e.Isfh/iUmJzn7EBYCCnqeh5TWiIZ.YnTmAy/DkegGI4I5H8ZGh6G', 'SUPER ADMIN', NULL, NULL, 1, '2023-11-19 15:35:09', '2024-02-03 04:00:15', NULL);

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

--
-- Table structure for table `org_setting`
--

CREATE TABLE `org_setting` (
  `id` int(11) NOT NULL,
  `payment_integration_type` varchar(30) DEFAULT NULL,
  `ABN` VARCHAR(50) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `contact_no` varchar(50) DEFAULT NULL,
  `contact_person` varchar(50) DEFAULT NULL,
  `contact_name` varchar(50) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `contact_website` varchar(255) DEFAULT NULL,
  `email_logo` varchar(255) DEFAULT NULL,
  `email_subject` varchar(255) DEFAULT NULL,
  `email_content` text DEFAULT NULL,
  `email_smtp` varchar(255) DEFAULT NULL,
  `email_user` varchar(255) DEFAULT NULL,
  `email_password` varchar(255) DEFAULT NULL,
  `email_port` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `org_setting`
--

TRUNCATE TABLE `org_setting`;
--
-- Dumping data for table `org_setting`
--

INSERT INTO `org_setting` (`id`, `payment_integration_type`, `logo`, `contact_no`, `contact_person`, `contact_name`, `contact_email`, `contact_website`, `email_logo`, `email_subject`, `email_content`, `email_smtp`, `email_user`, `email_password`, `email_port`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Stripe', '', '03499857694', 'Arnold Angelo', 'Musical Chair', 'musicchair@gmail.com', 'musicalchair.com', '/uploads/orgsetting/303.png', 'Booking Confirmation - {{firstname}} {{lastname}} - {{booking_no}}', '<p>Hi&nbsp;{{firstname}},</p>\r\n\r\n<p>Thank you for your purchase with us. Here is your summary of your order:</p>\r\n\r\n<p>Booking Number:&nbsp;{{booking_no}}</p>\r\n\r\n<p>Name:&nbsp;{{firstname}}&nbsp;{{lastname}}</p>\r\n\r\n<p>Total Price: ${{total_price}}</p>\r\n\r\n<p>Total Paid: ${{total_paid}}</p>\r\n\r\n<p>Donation Amount: ${{donation}}</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>Regards,</p>\r\n\r\n<p>{{orgname}}</p>\r\n', 'smtp.elasticemail.com', 'project@dreamstechnology.web.id', '27690E468AC9B29C9F059304A80AECC56682', 2525, '2023-12-02 01:43:33', '2023-12-02 01:43:33', NULL);


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

--
-- Table structure for table `payment_integration`
--

CREATE TABLE `payment_integration` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `server_key` varchar(255) DEFAULT NULL,
  `publish_key` varchar(255) DEFAULT NULL,
  `access_token` varchar(255) DEFAULT NULL,
  `refresh_token` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp DEFAULT NULL,
  `expired_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `payment_integration`
--

TRUNCATE TABLE `payment_integration`;

INSERT INTO `payment_integration` (`id`, `name`, `publish_key`, `server_key`, `access_token`, `refresh_token`, `created_at`, `updated_at`, `deleted_at`, `expired_at`) VALUES
(1, 'Stripe', 'pk_test_51OxUf9LZhZDXbdEWO5Xhjq6f3sVAMhlFno6c0MFzJACuAKcoqS4Amq19NRYcash05FJvszzO8wYRWW9Tq29LaPyO00JOw1vIts', 'sk_test_51O7RRTHL7hkNOsTYLUnjKrAMmuMMlqTxttswOQKbkHR5ZYQ9oisdnFHoT5wjbenzZoFifJEGIkLhMq1upqC1kCaj00awrwWJNw', NULL, NULL, '2024-03-16 11:21:02', '2024-03-16 11:21:02', NULL, NULL);

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

--
-- Table structure for table `transaction_order_detail`
--

CREATE TABLE `transaction_order_detail` (
  `id` int(11) NOT NULL,
  `id_header` int(11) DEFAULT NULL,
  `id_layout` int(11) DEFAULT NULL,
  `price` float(17,2) DEFAULT NULL,
  `ticket_name` varchar(250) DEFAULT NULL,
  `ticket_message` text DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `transaction_order_detail`
--

TRUNCATE TABLE `transaction_order_detail`;
-- --------------------------------------------------------

--
-- Table structure for table `transaction_order_header`
--

CREATE TABLE `transaction_order_header` (
  `id` int(11) NOT NULL,
  `id_payment_plan` int(11) DEFAULT NULL,
  `payment_method` varchar(30) NOT NULL,
  `order_number` varchar(30) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `email` varchar(320) DEFAULT NULL,
  `phone` varchar(15) DEFAULT NULL,
  `total_unit` int(11) DEFAULT NULL,
  `donation_amount` float(17,2) NOT NULL DEFAULT 0.00,
  `total_price` float(17,2) DEFAULT NULL,
  `gateway_fee` float (17,2) DEFAULT 0.00,
  `price_due` float(17,2) DEFAULT NULL COMMENT 'transaction_order_header.total_price / payment_plan.duration',
  `street_address` varchar(255) DEFAULT NULL,
  `suburb` varchar(255) DEFAULT NULL,
  `state` varchar(52) NOT NULL,
  `postcode` varchar(15) DEFAULT NULL,
  `country` varchar(52) DEFAULT NULL,
  `order_type` varchar(30) NOT NULL,
  `status` int(11) DEFAULT 1,
  `debtor_acc` varchar(100) DEFAULT NULL, 
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `transaction_order_header`
--

TRUNCATE TABLE `transaction_order_header`;
-- --------------------------------------------------------

--
-- Table structure for table `transaction_payment`
--

CREATE TABLE `transaction_payment` (
  `id` int(11) NOT NULL,
  `id_transaction` int(11) NOT NULL,
  `token` varchar(255) NOT NULL,
  `desc` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `transaction_payment`
--

TRUNCATE TABLE `transaction_payment`;
-- --------------------------------------------------------

--
-- Table structure for table `transaction_payment_plan`
--

CREATE TABLE `transaction_payment_plan` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `duration` int(11) DEFAULT NULL COMMENT 'How many payments are required. Recurring payments are handled by clients',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `transaction_payment_plan`
--

TRUNCATE TABLE `transaction_payment_plan`;
--
-- Dumping data for table `transaction_payment_plan`
--

INSERT INTO `transaction_payment_plan` (`id`, `title`, `description`, `duration`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, '1 full payment of {{amount}}', 'Pay in full at checkout', 1, '2024-01-11 14:10:45', '2024-01-11 14:10:45', NULL),
(2, '2 payments of {{amount}}', 'Split your donation into 2 equal payments over a maximum of 2 years. The first installment to be paid at checkout.', 2, '2024-01-11 14:10:45', '2024-01-11 14:10:45', NULL),
(3, '4 payments of {{amount}}', 'Split your donation into 4 equal payments over a maximum of 2 years. The first installments to be paid at checkout.', 4, '2024-01-11 14:10:45', '2024-01-11 14:10:45', NULL),
(4, '20 payments of {{amount}}', 'Split your donation into monthly payments over 20 months. The first installment to be paid at checkout.', 20, '2024-01-11 14:10:45', '2024-01-11 14:10:45', NULL);

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

--
-- Table structure for table `web`
--

CREATE TABLE `web` (
  `id` int(11) NOT NULL,
  `home_title` varchar(255) DEFAULT NULL,
  `home_description_1` text DEFAULT NULL COMMENT 'Content of homepage description',
  `home_description_2` text DEFAULT NULL COMMENT 'Content of homepage description',
  `home_banner_image` varchar(255) DEFAULT NULL,
  `about_video` varchar(255) DEFAULT NULL,
  `about_image` varchar(255) DEFAULT NULL,
  `about_text` text DEFAULT NULL,
  `privacy_policy` text DEFAULT NULL,
  `terms` text DEFAULT NULL,
  `background_color` varchar(255) DEFAULT NULL,
  `text_color` varchar(255) DEFAULT NULL,
  `button_color` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `template` int(11) DEFAULT 1 COMMENT 'Homepage template options',
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_image` varchar(255) DEFAULT NULL,
  `favicon` varchar(255) DEFAULT NULL,
  `ga_code` varchar(255) DEFAULT NULL,
  `last_updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Truncate table before insert `web`
--

TRUNCATE TABLE `web`;
--
-- Dumping data for table `web`
--

INSERT INTO `web` (`id`, `home_title`, `home_description_1`, `home_description_2`, `home_banner_image`, `about_video`, `about_image`, `about_text`, `privacy_policy`, `terms`, `background_color`, `text_color`, `button_color`, `status`, `template`, `meta_title`, `meta_description`, `meta_image`, `favicon`, `ga_code`, `last_updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Musical Chairs', '<p>The ACO at Pier 2/3 &ndash; Building our future together</p>', '<p>We invite you to join us by dedicating a seat in the ACO&rsquo;s new home. Your contribution to our future will be acknowledged with an engraved plaque on the back of your chosen Musical Chair.</p>', 'https://b313e8803f7a4150a884-6e0b076a1e92e31c40be44f466689c50.ssl.cf5.rackcdn.com/images/7943/home-bg_1701778786.jpg', 'https://www.youtube.com/embed/5ZDb-hOh4Tc?si=LWWNG56w3m1TZw3b', '', '<p><strong>Lorem Ipsum</strong>&nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>  <p>It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &#39;Content here, content here&#39;, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &#39;lorem ipsum&#39; will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>', NULL, NULL, '#000000', '#ffffff', '#F95D62', '', 1, '', '', '', '', '', NULL, '2023-12-02 01:45:56', '2023-12-02 01:45:56', NULL);

CREATE TABLE `auth_rule` (
  `name` VARCHAR(64) NOT NULL PRIMARY KEY,
  `data` BLOB,
  `created_at` INTEGER,
  `updated_at` INTEGER
);

CREATE TABLE `auth_item` (
  `name` VARCHAR(64) NOT NULL PRIMARY KEY,
  `type` SMALLINT NOT NULL,
  `description` TEXT,
  `rule_name` VARCHAR(64),
  `data` BLOB,
  `created_at` INTEGER,
  `updated_at` INTEGER
);

CREATE INDEX `idx-auth_item-type` ON `public`.`auth_item` USING BTREE( `type` ASC NULLS LAST );
CREATE INDEX `rule_name` ON `public`.`auth_item` USING BTREE( `rule_name` ASC NULLS LAST );

ALTER TABLE `auth_item`
  ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY ( `rule_name` )
  REFERENCES `auth_rule` ( `name` ) MATCH SIMPLE
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

INSERT INTO `auth_item` (`name`, `type`, created_at, updated_at)
VALUES ('ADMIN', 1, 1713967472, 1713967472),
       ('SUPER_ADMIN', 1, 1713967472, 1713967472),
       ('MAPPER', 1, 1713967472, 1713967472);


CREATE TABLE `auth_item_child` (
  `parent` VARCHAR(64) NOT NULL,
  `child` VARCHAR(64) NOT NULL,
  PRIMARY KEY ( `parent`, `child` )
);

CREATE INDEX `child` ON `auth_item_child` USING btree( `child` ASC NULLS LAST );

ALTER TABLE `auth_item_child`
  ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY ( `parent` )
  REFERENCES `auth_item` ( `name` ) MATCH SIMPLE
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

ALTER TABLE `auth_item_child`
  ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY ( `child` )
  REFERENCES `auth_item` ( `name` ) MATCH SIMPLE
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

CREATE INDEX child ON auth_item_child (child ASC);

INSERT INTO auth_item_child(parent, child)
VALUES ('SUPER_ADMIN', 'ADMIN')
,('SUPER_ADMIN', 'MAPPER');

CREATE TABLE `auth_assignment` (
  `user_id` INT(11) NOT NULL REFERENCES `master_user`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,  -- Replace with your user table's primary key column name
  `item_name` VARCHAR(64) NOT NULL REFERENCES `auth_item`(`name`) ON DELETE CASCADE ON UPDATE CASCADE,
  PRIMARY KEY (`user_id`, `item_name`)
);

CREATE INDEX auth_assignment_user_id_idx ON auth_assignment (user_id ASC);

INSERT INTO auth_assignment(item_name, user_id, created_at)
VALUES ('ADMIN', 1, 1713967472),
       ('SUPER_ADMIN', 2, 1713967472);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `activity_log`
--
ALTER TABLE `activity_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `master_floor`
--
ALTER TABLE `master_floor`
  ADD PRIMARY KEY (`id`),
  ADD KEY `last_updated_by` (`last_updated_by`);

--
-- Indexes for table `master_layout`
--
ALTER TABLE `master_layout`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_floor` (`id_floor`),
  ADD KEY `id_row` (`id_row`),
  ADD KEY `last_updated_by` (`last_updated_by`);

--
-- Indexes for table `master_row`
--
ALTER TABLE `master_row`
  ADD PRIMARY KEY (`id`),
  ADD KEY `last_updated_by` (`last_updated_by`);

--
-- Indexes for table `master_user`
--
ALTER TABLE `master_user`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_email` (`email`);

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

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

--
-- Indexes for table `transaction_order_detail`
--
ALTER TABLE `transaction_order_detail`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_header` (`id_header`),
  ADD KEY `id_layout` (`id_layout`);

--
-- Indexes for table `transaction_order_header`
--
ALTER TABLE `transaction_order_header`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_payment_plan` (`id_payment_plan`);

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

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

--
-- Indexes for table `web`
--
ALTER TABLE `web`
  ADD PRIMARY KEY (`id`),
  ADD KEY `last_updated_by` (`last_updated_by`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activity_log`
--
ALTER TABLE `activity_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `master_floor`
--
ALTER TABLE `master_floor`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `master_layout`
--
ALTER TABLE `master_layout`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73;

--
-- AUTO_INCREMENT for table `master_row`
--
ALTER TABLE `master_row`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `master_user`
--
ALTER TABLE `master_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `org_setting`
--
ALTER TABLE `org_setting`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `payment_integration`
--
ALTER TABLE `payment_integration`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transaction_order_detail`
--
ALTER TABLE `transaction_order_detail`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `transaction_order_header`
--
ALTER TABLE `transaction_order_header`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `transaction_payment`
--
ALTER TABLE `transaction_payment`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transaction_payment_plan`
--
ALTER TABLE `transaction_payment_plan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `activity_log`
--
ALTER TABLE `activity_log`
  ADD CONSTRAINT `activity_log_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `activity_log_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `activity_log_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `activity_log_ibfk_4` FOREIGN KEY (`user_id`) REFERENCES `master_user` (`id`);

--
-- Constraints for table `master_floor`
--
ALTER TABLE `master_floor`
  ADD CONSTRAINT `master_floor_ibfk_1` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_floor_ibfk_2` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_floor_ibfk_3` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_floor_ibfk_4` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`);

--
-- Constraints for table `master_layout`
--
ALTER TABLE `master_layout`
  ADD CONSTRAINT `master_layout_ibfk_1` FOREIGN KEY (`id_floor`) REFERENCES `master_floor` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_10` FOREIGN KEY (`id_floor`) REFERENCES `master_floor` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_11` FOREIGN KEY (`id_row`) REFERENCES `master_row` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_12` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_2` FOREIGN KEY (`id_row`) REFERENCES `master_row` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_3` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_4` FOREIGN KEY (`id_floor`) REFERENCES `master_floor` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_5` FOREIGN KEY (`id_row`) REFERENCES `master_row` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_6` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_7` FOREIGN KEY (`id_floor`) REFERENCES `master_floor` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_8` FOREIGN KEY (`id_row`) REFERENCES `master_row` (`id`),
  ADD CONSTRAINT `master_layout_ibfk_9` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`);

--
-- Constraints for table `master_row`
--
ALTER TABLE `master_row`
  ADD CONSTRAINT `master_row_ibfk_1` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_row_ibfk_2` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_row_ibfk_3` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`),
  ADD CONSTRAINT `master_row_ibfk_4` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`);

--
-- Constraints for table `transaction_order_detail`
--
ALTER TABLE `transaction_order_detail`
  ADD CONSTRAINT `transaction_order_detail_ibfk_1` FOREIGN KEY (`id_header`) REFERENCES `transaction_order_header` (`id`),
  ADD CONSTRAINT `transaction_order_detail_ibfk_2` FOREIGN KEY (`id_layout`) REFERENCES `master_layout` (`id`),
  ADD CONSTRAINT `transaction_order_detail_ibfk_3` FOREIGN KEY (`id_header`) REFERENCES `transaction_order_header` (`id`),
  ADD CONSTRAINT `transaction_order_detail_ibfk_4` FOREIGN KEY (`id_layout`) REFERENCES `master_layout` (`id`),
  ADD CONSTRAINT `transaction_order_detail_ibfk_5` FOREIGN KEY (`id_header`) REFERENCES `transaction_order_header` (`id`),
  ADD CONSTRAINT `transaction_order_detail_ibfk_6` FOREIGN KEY (`id_layout`) REFERENCES `master_layout` (`id`);

--
-- Constraints for table `transaction_order_header`
--
ALTER TABLE `transaction_order_header`
  ADD CONSTRAINT `transaction_order_header_ibfk_1` FOREIGN KEY (`id_payment_plan`) REFERENCES `transaction_payment_plan` (`id`),
  ADD CONSTRAINT `transaction_order_header_ibfk_2` FOREIGN KEY (`id_payment_plan`) REFERENCES `transaction_payment_plan` (`id`),
  ADD CONSTRAINT `transaction_order_header_ibfk_3` FOREIGN KEY (`id_payment_plan`) REFERENCES `transaction_payment_plan` (`id`);

--
-- Constraints for table `web`
--
ALTER TABLE `web`
  ADD CONSTRAINT `web_ibfk_1` FOREIGN KEY (`last_updated_by`) REFERENCES `master_user` (`id`);
COMMIT;

