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

START TRANSACTION;



--
-- Database: `management`
--

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

--
-- Table structure for table `bank_settings`
--

CREATE TABLE `bank_settings` (
  `id` int(11) NOT NULL,
  `unique_bank_id` varchar(30) NOT NULL,
  `unique_bank_name` varchar(50) NOT NULL,
  `bank_num` varchar(12) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` datetime DEFAULT current_timestamp(),
  `bank_trans_type` enum('bank_in','bank_out') NOT NULL DEFAULT 'bank_in'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `bank_settings`
--

INSERT INTO `bank_settings` (`id`, `unique_bank_id`, `unique_bank_name`, `bank_num`, `status`, `created_at`, `bank_trans_type`) VALUES
(1, 'WAVE', 'MyaMya', '333333333333', 'active', '2025-06-04 00:50:16', 'bank_in'),
(2, 'KPAY', 'Ko Moe Kyi', '222222222222', 'active', '2025-06-04 00:51:05', 'bank_in'),
(4, 'KPAY', 'Kyaw Gyi', '1234567890', 'active', '2025-06-04 22:29:02', 'bank_out'),
(5, 'WAVE', 'Kyaw Gyi', '1234567890', 'active', '2025-06-04 22:45:43', 'bank_in'),
(6, 'KPAY', 'Kyaw Wunna', '099999999999', 'active', '2025-06-06 01:04:49', 'bank_out'),
(7, 'WAVE', 'MGMG', '099999999999', 'active', '2025-06-06 01:16:21', 'bank_out');

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

--
-- Table structure for table `data_management`
--

CREATE TABLE `data_management` (
  `id` int(11) NOT NULL,
  `accounting_date` date NOT NULL,
  `bank_id` int(11) NOT NULL,
  `bank_num` varchar(50) NOT NULL,
  `usage_id` int(11) NOT NULL,
  `remark` text DEFAULT NULL,
  `transfer_time` datetime NOT NULL,
  `income` decimal(12,2) DEFAULT 0.00,
  `outcome` decimal(12,2) DEFAULT 0.00,
  `bank_fee` decimal(12,2) DEFAULT 0.00,
  `flag` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `data_management`
--

INSERT INTO `data_management` (`id`, `accounting_date`, `bank_id`, `bank_num`, `usage_id`, `remark`, `transfer_time`, `income`, `outcome`, `bank_fee`, `flag`, `created_at`) VALUES
(9, '2025-06-06', 5, '1234567890', 3, 'fff', '2025-06-06 02:20:00', '500000.00', '0.00', '-5000.00', '0', '2025-06-05 19:50:58');

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

--
-- Table structure for table `usage`
--

CREATE TABLE `usage` (
  `usage_id` int(11) NOT NULL,
  `usage_description` varchar(50) NOT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `create_usage_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `usage`
--

INSERT INTO `usage` (`usage_id`, `usage_description`, `status`, `create_usage_at`) VALUES
(2, 'Cancer', 'active', '2025-06-04 13:17:31'),
(3, '881', 'active', '2025-06-05 18:53:43'),
(4, 'Ganja', 'active', '2025-06-05 18:54:01'),
(5, 'GarLay', 'active', '2025-06-05 18:54:09');

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `usage`
--
ALTER TABLE `usage`
  ADD PRIMARY KEY (`usage_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- AUTO_INCREMENT for table `usage`
--
ALTER TABLE `usage`
  MODIFY `usage_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;

