-- Database: manajemen_keuangan
CREATE DATABASE IF NOT EXISTS manajemen_keuangan;
USE manajemen_keuangan;

-- Table structure for table `keuangan`
CREATE TABLE IF NOT EXISTS `keuangan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(255) NOT NULL,
  `nominal` decimal(15,2) NOT NULL,
  `sisa_hutang` decimal(15,2) NOT NULL,
  `status` enum('Belum','Hapus') NOT NULL DEFAULT 'Belum',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Sample data
INSERT INTO `keuangan` (`nama`, `nominal`, `sisa_hutang`, `status`) VALUES
('Pinjaman Bank', 10000000.00, 5000000.00, 'Belum'),
('Hutang Supplier', 5000000.00, 2000000.00, 'Belum');
