﻿-- MariaDB dump 10.19  Distrib 10.4.32-MariaDB, for Win64 (AMD64)
--
-- Host: localhost    Database: terasland_tax
-- ------------------------------------------------------
-- Server version	10.4.32-MariaDB

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `audit_logs`
--

DROP TABLE IF EXISTS `audit_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `audit_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `time` datetime NOT NULL DEFAULT current_timestamp(),
  `user` varchar(100) NOT NULL DEFAULT 'admin',
  `action` varchar(100) NOT NULL,
  `module` varchar(100) NOT NULL,
  `details` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `audit_logs`
--

LOCK TABLES `audit_logs` WRITE;
/*!40000 ALTER TABLE `audit_logs` DISABLE KEYS */;
INSERT INTO `audit_logs` VALUES (1,'2026-02-18 09:30:12','admin','LOGIN','Auth','Login berhasil dari IP 182.1.22.10'),(2,'2026-02-18 10:15:00','admin','VERIFY_TAX','Tax Engine','Pengujian PPN DTP Unit A-02 PMK 90/2025'),(3,'2026-10-24 01:12:25','adminterasland2026','LOGIN','Auth','Login berhasil dari IP ::1'),(4,'2026-10-24 01:14:41','adminterasland2026','DELETE_VENDOR','Master Data','Hapus vendor PT Semen Jaya Mandiri'),(5,'2026-10-24 01:14:52','adminterasland2026','DELETE_PROJECT','Master Data','Hapus proyek PRJ-02'),(6,'2026-10-24 01:14:55','adminterasland2026','DELETE_PROJECT','Master Data','Hapus proyek PRJ-01'),(7,'2026-10-24 01:15:47','adminterasland2026','SAVE_PROJECT','Master Data','Simpan proyek Bukit Teras Cihanjuang (PRJ-01)'),(8,'2026-10-24 01:16:00','adminterasland2026','DELETE_PURCHASE','Pembelian','Hapus data pembelian PUR-002'),(9,'2026-10-24 01:16:17','adminterasland2026','DELETE_SALE','Penjualan','Hapus transaksi penjualan TRX-2026-002'),(10,'2026-10-24 01:17:11','adminterasland2026','ADD_SALE','Penjualan','Transaksi penjualan TRX-2026-002 berhasil dibuat! (Konsumen: Iman)'),(11,'2026-10-24 01:23:57','admin','UPDATE_SETTINGS','Pengaturan','Update profil perusahaan: PT Tanam Rumah Sinergidaya');
/*!40000 ALTER TABLE `audit_logs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `company_profile`
--

DROP TABLE IF EXISTS `company_profile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `company_profile` (
  `id` int(11) NOT NULL DEFAULT 1,
  `company_name` varchar(150) NOT NULL,
  `brand_name` varchar(100) NOT NULL,
  `npwp` varchar(30) NOT NULL,
  `pkp_status` varchar(100) NOT NULL,
  `nib` varchar(50) NOT NULL,
  `fiscal_year` varchar(50) NOT NULL DEFAULT 'Januari - Desember',
  `tax_office` varchar(150) DEFAULT 'KPP Pratama Depok Cimanggis',
  `address` text DEFAULT NULL,
  `phone` varchar(50) DEFAULT '021-82489999',
  `email` varchar(100) DEFAULT 'tax@terasland.com',
  `logo_url` longtext DEFAULT NULL,
  `favicon_url` longtext DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `company_profile`
--

LOCK TABLES `company_profile` WRITE;
/*!40000 ALTER TABLE `company_profile` DISABLE KEYS */;
INSERT INTO `company_profile` VALUES (1,'PT Tanam Rumah Sinergidaya','Teras Land','','','','Januari - Desember','KPP Pratama Depok Cimanggis','Jl. Raya Cibubur No. 88','021-82489999','tax@terasland.com','','','2026-10-23 18:23:57');
/*!40000 ALTER TABLE `company_profile` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `documents`
--

DROP TABLE IF EXISTS `documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `documents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `module` varchar(100) NOT NULL,
  `type` varchar(50) NOT NULL DEFAULT 'PDF',
  `uploader` varchar(100) NOT NULL DEFAULT 'Admin',
  `date` date NOT NULL,
  `link` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `documents`
--

LOCK TABLES `documents` WRITE;
/*!40000 ALTER TABLE `documents` DISABLE KEYS */;
INSERT INTO `documents` VALUES (1,'Sertifikat_Induk_Residenza.pdf','Proyek','PDF','Admin Legal','2026-01-10','#','2026-10-23 18:03:22'),(2,'Kuitansi_DP_A01_Budi.pdf','Penjualan','PDF','Finance','2026-01-15','#','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `projects`
--

DROP TABLE IF EXISTS `projects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
  `id` varchar(50) NOT NULL,
  `name` varchar(150) NOT NULL,
  `location` varchar(200) NOT NULL,
  `total_units` int(11) NOT NULL DEFAULT 0,
  `budget` varchar(100) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'AKTIF',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `projects`
--

LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
INSERT INTO `projects` VALUES ('PRJ-01','Bukit Teras Cihanjuang','Cihanjung',50,'Rp. 10.000.000.000','AKTIF','2026-10-23 18:15:47');
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `purchases`
--

DROP TABLE IF EXISTS `purchases`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `purchases` (
  `id` varchar(50) NOT NULL,
  `vendor` varchar(150) NOT NULL,
  `category` varchar(150) NOT NULL,
  `amount_net` decimal(15,2) NOT NULL DEFAULT 0.00,
  `tax_cut` decimal(15,2) NOT NULL DEFAULT 0.00,
  `payable` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` varchar(50) NOT NULL DEFAULT 'LUNAS',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `purchases`
--

LOCK TABLES `purchases` WRITE;
/*!40000 ALTER TABLE `purchases` DISABLE KEYS */;
INSERT INTO `purchases` VALUES ('PUR-001','PT Semen Jaya Mandiri','Material Beton',120000000.00,0.00,120000000.00,'LUNAS','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `purchases` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales`
--

DROP TABLE IF EXISTS `sales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sales` (
  `id` varchar(50) NOT NULL,
  `customer` varchar(150) NOT NULL,
  `unit` varchar(150) NOT NULL,
  `net_price` decimal(15,2) NOT NULL DEFAULT 0.00,
  `scheme` varchar(50) NOT NULL DEFAULT 'KPR Bank',
  `status_sale` varchar(50) NOT NULL DEFAULT 'TERJUAL',
  `status_tax` varchar(100) NOT NULL DEFAULT 'Draft',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales`
--

LOCK TABLES `sales` WRITE;
/*!40000 ALTER TABLE `sales` DISABLE KEYS */;
INSERT INTO `sales` VALUES ('TRX-2026-001','Budi Santoso','A-01 (Teras Land Residenza)',750000000.00,'KPR Bank','TERJUAL','PPh Final Paid (2.5%)','2026-10-23 18:03:22'),('TRX-2026-002','Iman','Bukit Teras Cihanjuang',400000000.00,'Tunai Bertahap','TERJUAL','Draft (Perlu Verifikasi)','2026-10-23 18:17:11');
/*!40000 ALTER TABLE `sales` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tax_obligations`
--

DROP TABLE IF EXISTS `tax_obligations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tax_obligations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(100) NOT NULL,
  `period` varchar(50) NOT NULL,
  `due_pay` varchar(50) NOT NULL,
  `due_file` varchar(50) NOT NULL,
  `amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` varchar(50) NOT NULL DEFAULT 'PENDING SETOR',
  `ntpn` varchar(100) DEFAULT '-',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tax_obligations`
--

LOCK TABLES `tax_obligations` WRITE;
/*!40000 ALTER TABLE `tax_obligations` DISABLE KEYS */;
INSERT INTO `tax_obligations` VALUES (1,'PPh Final Pengalihan Hak','Januari 2026','15 Feb 2026','20 Feb 2026',18750000.00,'SUDAH DIBAYAR','A829103912093120','2026-10-23 18:03:22'),(2,'SPT Masa PPN Keluaran','Januari 2026','28 Feb 2026','28 Feb 2026',82500000.00,'PENDING SETOR','-','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `tax_obligations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tax_rules`
--

DROP TABLE IF EXISTS `tax_rules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tax_rules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `name` varchar(150) NOT NULL,
  `law` varchar(150) NOT NULL,
  `rate` varchar(50) NOT NULL,
  `dpp` varchar(150) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'VERIFIED',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tax_rules`
--

LOCK TABLES `tax_rules` WRITE;
/*!40000 ALTER TABLE `tax_rules` DISABLE KEYS */;
INSERT INTO `tax_rules` VALUES (1,'TAX-PPH-FINAL-THB','PPh Final Pengalihan Hak Tanah/Bangunan','PP 34 Tahun 2016','2.5%','Harga Bruto Transaksi','VERIFIED','2026-10-23 18:03:22'),(2,'TAX-PPN-DTP-2026','Insentif PPN DTP Perumahan','PMK No. 90 Tahun 2025','100% / 50%','s.d Rp 2 Miliar (Max Unit 5M)','VERIFIED','2026-10-23 18:03:22'),(3,'TAX-PPH-21-PEGAWAI','PPh Pasal 21 Gaji/Komisi','TER PMK 168/2023','Tarif Efektif (TER)','Penghasilan Bruto','VERIFIED','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `tax_rules` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `units`
--

DROP TABLE IF EXISTS `units`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `units` (
  `unit_no` varchar(50) NOT NULL,
  `project` varchar(150) NOT NULL,
  `type` varchar(50) NOT NULL,
  `price` varchar(100) NOT NULL,
  `price_numeric` decimal(15,2) DEFAULT 0.00,
  `status` enum('TERSEDIA','BOOKING','TERJUAL') NOT NULL DEFAULT 'TERSEDIA',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`unit_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `units`
--

LOCK TABLES `units` WRITE;
/*!40000 ALTER TABLE `units` DISABLE KEYS */;
INSERT INTO `units` VALUES ('A-01','Teras Land Residenza','Type 45/90','Rp 750.000.000',750000000.00,'TERJUAL','2026-10-23 18:03:22'),('A-02','Teras Land Residenza','Type 45/90','Rp 750.000.000',750000000.00,'BOOKING','2026-10-23 18:03:22'),('B-05','Teras Land Grand Hill','Type 60/120','Rp 1.200.000.000',1200000000.00,'TERSEDIA','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `units` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `full_name` varchar(100) NOT NULL,
  `role` varchar(50) NOT NULL DEFAULT 'Admin Senior',
  `avatar` varchar(10) DEFAULT 'A',
  `status` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'adminterasland2026','$2y$10$e0MYzXyjpJS7Pd0RVvHwHeX1892qF7z5dM/aL6jA487r4/mK7vQ0u','Ahmad Senior Tax','Admin / Senior Tax Officer','A','ACTIVE','2026-10-23 18:03:22','2026-10-23 18:03:22'),(2,'taxofficer','$2y$10$e0MYzXyjpJS7Pd0RVvHwHeX1892qF7z5dM/aL6jA487r4/mK7vQ0u','Staff Pajak & Akuntansi','Tax Compliance Officer','T','ACTIVE','2026-10-23 18:03:22','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `vendors`
--

DROP TABLE IF EXISTS `vendors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `npwp` varchar(50) NOT NULL,
  `category` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `vendors`
--

LOCK TABLES `vendors` WRITE;
/*!40000 ALTER TABLE `vendors` DISABLE KEYS */;
INSERT INTO `vendors` VALUES (2,'CV Karya Utama Kontraktor','31.740.123.4-000.000','Kontraktor Sipil','Non-PKP (PPh Konstruksi 1.75%)','2026-10-23 18:03:22');
/*!40000 ALTER TABLE `vendors` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-10-24  1:34:13
