DROP TABLE app;

CREATE TABLE `app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama_aplikasi` varchar(255) DEFAULT NULL,
  `nama_perusahaan` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `alamat` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `hp` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `nama_aplikasi` (`nama_aplikasi`),
  KEY `nama_perusahaan` (`nama_perusahaan`),
  KEY `logo` (`logo`),
  KEY `alamat` (`alamat`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO app VALUES("1","Aplikasi SI-SUKI","KPP Pratama Bengkalis","logo.jpg","Komplek Mall Mandau City Kav. 109 Basement Blok B03,Kec. Mandau, Kabupaten Bengkalis, Riau 28784","","(0765) 94531");



DROP TABLE foto;

CREATE TABLE `foto` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `nm_foto` varchar(100) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `foto` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `nm_foto` (`nm_foto`),
  KEY `tanggal` (`tanggal`),
  KEY `foto` (`foto`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

INSERT INTO foto VALUES("6","Kinerja Maret","2022-03-21","f0321132000.Black Friday Gift Voucher Template (12.3 x 3.9 in) (Dokumen A4) (2).png");



DROP TABLE kegiatan;

CREATE TABLE `kegiatan` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `id_surat` varchar(30) DEFAULT NULL,
  `no_surat` varchar(30) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `tujuan` varchar(100) DEFAULT NULL,
  `kendaraan` varchar(30) DEFAULT NULL,
  `status` varchar(50) DEFAULT 'Belum Transfer',
  `tanggal_pembayaran` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_surat` (`id_surat`),
  KEY `no_surat` (`no_surat`),
  KEY `tanggal` (`tanggal`),
  KEY `tujuan` (`tujuan`),
  KEY `kendaraan` (`kendaraan`),
  KEY `status` (`status`),
  KEY `tanggal_pembayaran` (`tanggal_pembayaran`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

INSERT INTO kegiatan VALUES("2","1647438842","ST-001/xxx/xxx/2012","2022-03-04","kantor test 1e","BH123EYD","Sudah Transfer","2022-03-30");
INSERT INTO kegiatan VALUES("4","1647444014","ST-001/xxx/xxx/20122123","2022-03-12","","","Belum Transfer","");



DROP TABLE level;

CREATE TABLE `level` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kd_level` varchar(20) DEFAULT NULL,
  `nm_level` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

INSERT INTO level VALUES("3","administrator","Administrator");
INSERT INTO level VALUES("4","admin","Admin");



DROP TABLE peserta;

CREATE TABLE `peserta` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `id_surat` varchar(30) DEFAULT NULL,
  `id_user` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_surat` (`id_surat`),
  KEY `id_user` (`id_user`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;

INSERT INTO peserta VALUES("6","1647438842","1");
INSERT INTO peserta VALUES("7","1647438842","2");
INSERT INTO peserta VALUES("8","1647438842","3");
INSERT INTO peserta VALUES("9","1647438842","4");
INSERT INTO peserta VALUES("10","1647438842","5");
INSERT INTO peserta VALUES("11","1647438842","6");
INSERT INTO peserta VALUES("12","1647438842","7");
INSERT INTO peserta VALUES("13","1647444014","31");
INSERT INTO peserta VALUES("14","1647444014","32");
INSERT INTO peserta VALUES("15","1647444014","33");



