--
-- Host: localhost    Database: domsanwe_domsan
-- ------------------------------------------------------


--
-- Table structure for table `transaksi`
--

CREATE TABLE `transaksi` (
  `id_transaksi` int(11) NOT NULL AUTO_INCREMENT,
  `id_siswa` int(11) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `keterangan` varchar(225) DEFAULT NULL,
  `kode_tr` int(11) DEFAULT NULL,
  `nominal` int(11) DEFAULT NULL,
  `saldo_Awal` int(11) DEFAULT NULL,
  `saldo_akhir` int(11) DEFAULT NULL,
  PRIMARY KEY (`id_transaksi`),
  KEY `transaksi_ibfk_1` (`id_siswa`),
  CONSTRAINT `transaksi_ibfk_1` FOREIGN KEY (`id_siswa`) REFERENCES `user` (`id_siswa`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaksi`
--

INSERT INTO `transaksi` VALUES (50,97,'2025-06-19','Jajan',1,10000,0,10000),(51,97,'2025-07-29','-',1,500000000,10000,500010000);

--
-- Temporary table structure for view `view_transaksi`
--

/*!50001 DROP VIEW IF EXISTS `view_transaksi`*/;
/*!50001 CREATE VIEW `view_transaksi` AS SELECT
 1 AS `id_siswa`,
  1 AS `id_transaksi`,
  1 AS `tanggal`,
  1 AS `kode_tr`,
  1 AS `nominal`,
  1 AS `saldo_awal`,
  1 AS `saldo_akhir`,
  1 AS `keterangan`,
  1 AS `nama`,
  1 AS `no_induk`,
  1 AS `foto`,
  1 AS `saldo`,
  1 AS `username`,
  1 AS `password`,
  1 AS `role`,
  1 AS `kelas` */;

--
-- Dumping events for database 'domsanwe_domsan'
--

--
-- Dumping routines for database 'domsanwe_domsan'
--

--
-- Final view structure for view `view_transaksi`
--

/*!50001 DROP VIEW IF EXISTS `view_transaksi`*/;


