Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Adminer 4.2.5 MySQL dump
- SET NAMES utf8;
- SET time_zone = '+00:00';
- SET foreign_key_checks = 0;
- SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
- DROP TABLE IF EXISTS `accesses`;
- CREATE TABLE `accesses` (
- `id` varchar(32) NOT NULL,
- `description` varchar(64) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `id_UNIQUE` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- INSERT INTO `accesses` (`id`, `description`) VALUES
- ('ARSIP', 'Menampilkan data arsip transaksi bulanan dan tahunan'),
- ('KOREKSI_BULANAN', 'Menampilkan Data Koreksi Bulanan'),
- ('LAPORAN_TRANSAKSI', 'Menampilkan data laporan'),
- ('MANAJEMEN_AKUN', 'CRUD user dan memberikan hak akses ke setiap user'),
- ('MANAJEMEN_BIAYA', 'CRUD Term spp, kode biaya, parameter biaya '),
- ('MANAJEMEN_SISWA', 'CRUD siswa'),
- ('PEMBAYARAN', 'Memproses Pembayaran'),
- ('PENGATURAN_SEKOLAH', 'Melakukan setting untuk sekolah'),
- ('TAHUNAN', 'Memproses tranksaksi tahunan');
- DROP TABLE IF EXISTS `access_user_group`;
- CREATE TABLE `access_user_group` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `access_id` varchar(32) CHARACTER SET latin1 NOT NULL,
- `user_group_id` int(10) unsigned NOT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `access_id` (`access_id`),
- KEY `user_group_id` (`user_group_id`),
- CONSTRAINT `access_user_group_ibfk_2` FOREIGN KEY (`access_id`) REFERENCES `accesses` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `access_user_group_ibfk_3` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `access_user_group` (`id`, `access_id`, `user_group_id`, `created_at`, `updated_at`) VALUES
- (10, 'PENGATURAN_SEKOLAH', 2, NULL, NULL),
- (11, 'MANAJEMEN_AKUN', 2, NULL, NULL),
- (12, 'MANAJEMEN_BIAYA', 2, NULL, NULL),
- (13, 'LAPORAN_TRANSAKSI', 2, NULL, NULL),
- (14, 'ARSIP', 2, NULL, NULL),
- (15, 'TAHUNAN', 2, NULL, NULL),
- (16, 'PEMBAYARAN', 2, NULL, NULL),
- (31, 'PENGATURAN_SEKOLAH', 1, NULL, NULL),
- (32, 'MANAJEMEN_AKUN', 1, NULL, NULL),
- (33, 'MANAJEMEN_BIAYA', 1, NULL, NULL),
- (34, 'MANAJEMEN_SISWA', 1, NULL, NULL),
- (35, 'LAPORAN_TRANSAKSI', 1, NULL, NULL),
- (36, 'ARSIP', 1, NULL, NULL),
- (37, 'TAHUNAN', 1, NULL, NULL),
- (38, 'KOREKSI_BULANAN', 1, NULL, NULL),
- (39, 'PEMBAYARAN', 1, NULL, NULL);
- DROP TABLE IF EXISTS `education_stages`;
- CREATE TABLE `education_stages` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
- `next` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `education_stages_next_foreign` (`next`),
- CONSTRAINT `education_stages_next_foreign` FOREIGN KEY (`next`) REFERENCES `education_stages` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `education_stages` (`id`, `description`, `next`) VALUES
- ('1', 'SMA', NULL),
- ('2', 'SMP', '1'),
- ('3', 'SD', '2'),
- ('4', 'TK', '3');
- DROP TABLE IF EXISTS `fees`;
- CREATE TABLE `fees` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `education_stage_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `fee_code_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `amount` decimal(19,4) NOT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fees_education_stage_id_foreign` (`education_stage_id`),
- KEY `fees_fee_code_id_foreign` (`fee_code_id`),
- CONSTRAINT `fees_education_stage_id_foreign` FOREIGN KEY (`education_stage_id`) REFERENCES `education_stages` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `fees_fee_code_id_foreign` FOREIGN KEY (`fee_code_id`) REFERENCES `fee_codes` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `fees` (`id`, `education_stage_id`, `fee_code_id`, `amount`, `created_at`, `updated_at`) VALUES
- (1, '2', 'BIAYA_MASUK', 6700000.0000, '2017-02-08 02:00:28', '2017-02-08 02:00:28'),
- (2, '2', 'BIAYA_PEMBANGUNAN', 700000.0000, '2017-02-08 02:02:35', '2017-02-08 02:02:35'),
- (3, '2', 'PENDAFTARAN', 300000.0000, '2017-02-08 02:02:47', '2017-02-08 02:02:47'),
- (4, '2', 'SERAGAM', 120000.0000, '2017-02-08 02:02:47', '2017-02-08 02:02:47'),
- (5, '1', 'BIAYA_MASUK', 20000000.0000, '2017-02-12 23:50:31', '2017-02-12 23:50:31'),
- (6, '1', 'BIAYA_PEMBANGUNAN', 6000000.0000, '2017-02-15 06:37:40', '2017-02-15 06:37:40'),
- (7, '1', 'PENDAFTARAN', 600000.0000, '2017-02-15 06:38:00', '2017-02-15 06:38:00'),
- (8, '1', 'SERAGAM', 250000.0000, '2017-02-15 06:38:19', '2017-02-15 06:38:19'),
- (9, '4', 'BIAYA_MASUK', 6000000.0000, '2017-03-07 02:41:38', '2017-03-07 02:41:38'),
- (10, '4', 'BIAYA_PEMBANGUNAN', 2000000.0000, '2017-03-07 02:48:08', '2017-03-07 02:48:08');
- DROP TABLE IF EXISTS `fee_codes`;
- CREATE TABLE `fee_codes` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
- `deleted_at` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `fee_codes` (`id`, `description`, `deleted_at`, `created_at`, `updated_at`) VALUES
- ('BIAYA_MASUK', 'Biaya masuk', NULL, '2017-02-08 08:56:27', '2017-02-08 08:56:27'),
- ('BIAYA_PEMBANGUNAN', 'Biaya pembangunan', NULL, '2017-02-08 08:56:27', '2017-02-08 08:56:27'),
- ('PENDAFTARAN', 'Biaya registrasi dan pendaftaran', NULL, '2017-02-08 08:55:53', '2017-02-08 08:55:53'),
- ('SERAGAM', 'Seragam sekolah', NULL, '2017-02-08 08:54:24', '2017-02-08 08:54:24');
- DROP TABLE IF EXISTS `fee_code_spp_yearly_transaction`;
- CREATE TABLE `fee_code_spp_yearly_transaction` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `spp_yearly_transaction_id` int(10) unsigned NOT NULL,
- `fee_code_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `spp_yearly_transaction_id` (`spp_yearly_transaction_id`),
- KEY `fee_code_id` (`fee_code_id`),
- CONSTRAINT `fee_code_spp_yearly_transaction_ibfk_1` FOREIGN KEY (`spp_yearly_transaction_id`) REFERENCES `spp_yearly_transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fee_code_spp_yearly_transaction_ibfk_2` FOREIGN KEY (`fee_code_id`) REFERENCES `fee_codes` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `fee_code_spp_yearly_transaction` (`id`, `spp_yearly_transaction_id`, `fee_code_id`, `created_at`, `updated_at`) VALUES
- (7, 5, 'BIAYA_MASUK', NULL, NULL),
- (8, 5, 'BIAYA_PEMBANGUNAN', NULL, NULL);
- DROP TABLE IF EXISTS `fee_transactions`;
- CREATE TABLE `fee_transactions` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `fee_yearly_transaction_id` int(11) unsigned NOT NULL,
- `amount` decimal(19,4) NOT NULL,
- `paid_at` timestamp NULL DEFAULT NULL,
- `pending_at` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fee_yearly_transaction_id` (`fee_yearly_transaction_id`),
- CONSTRAINT `fee_transactions_ibfk_2` FOREIGN KEY (`fee_yearly_transaction_id`) REFERENCES `fee_yearly_transactions` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
- INSERT INTO `fee_transactions` (`id`, `fee_yearly_transaction_id`, `amount`, `paid_at`, `pending_at`, `created_at`, `updated_at`) VALUES
- (1, 39, 111.0000, '2017-03-13 01:11:10', '2017-03-13 07:20:21', '2017-03-13 08:11:10', '2017-03-13 01:11:10'),
- (2, 40, 222.0000, '2017-03-13 01:11:10', '2017-03-13 07:20:21', '2017-03-13 08:11:10', '2017-03-13 01:11:10'),
- (3, 39, 500000.0000, '2017-03-13 01:14:31', '2017-03-13 08:12:20', '2017-03-13 08:14:31', '2017-03-13 01:14:31'),
- (4, 40, 1000000.0000, '2017-03-13 01:14:31', '2017-03-13 08:12:20', '2017-03-13 08:14:31', '2017-03-13 01:14:31'),
- (5, 39, 500000.0000, '2017-03-13 01:15:03', '2017-03-13 01:14:51', '2017-03-13 08:15:03', '2017-03-13 01:15:03'),
- (6, 39, 2000000.0000, NULL, '2017-03-13 01:23:25', '2017-03-13 01:23:25', '2017-03-13 01:23:25');
- DROP TABLE IF EXISTS `fee_yearly_transactions`;
- CREATE TABLE `fee_yearly_transactions` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `spp_yearly_transaction_id` int(11) unsigned NOT NULL,
- `fee_code_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
- `amount` decimal(19,4) NOT NULL,
- `paid_at` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `fee_codes_id` (`fee_code_id`),
- KEY `spp_yearly_transaction_id` (`spp_yearly_transaction_id`),
- CONSTRAINT `fee_yearly_transactions_ibfk_2` FOREIGN KEY (`fee_code_id`) REFERENCES `fee_codes` (`id`),
- CONSTRAINT `fee_yearly_transactions_ibfk_3` FOREIGN KEY (`spp_yearly_transaction_id`) REFERENCES `spp_yearly_transactions` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=latin1;
- INSERT INTO `fee_yearly_transactions` (`id`, `spp_yearly_transaction_id`, `fee_code_id`, `amount`, `paid_at`, `created_at`, `updated_at`) VALUES
- (39, 5, 'BIAYA_MASUK', 5250000.0000, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (40, 5, 'BIAYA_PEMBANGUNAN', 1750000.0000, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13');
- DROP TABLE IF EXISTS `generic_codes`;
- CREATE TABLE `generic_codes` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `group` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `description` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `generic_codes` (`id`, `group`, `description`) VALUES
- ('BUDDHA', 'RELIGION', 'Buddha'),
- ('HINDU', 'RELIGION', 'Hindu'),
- ('ISLAM', 'RELIGION', 'Islam'),
- ('KATOLIK', 'RELIGION', 'Katolik'),
- ('KRISTEN', 'RELIGION', 'Kristen Protestan'),
- ('PRIA', 'SEX', 'Pria'),
- ('WANITA', 'SEX', 'Wanita');
- DROP TABLE IF EXISTS `grades`;
- CREATE TABLE `grades` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `education_stage_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `next_id` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `classes_next_id_foreign` (`next_id`),
- KEY `grades_education_stage_id_foreign` (`education_stage_id`),
- CONSTRAINT `grades_education_stage_id_foreign` FOREIGN KEY (`education_stage_id`) REFERENCES `education_stages` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `grades` (`id`, `education_stage_id`, `next_id`, `created_at`, `updated_at`) VALUES
- ('SD 1', '3', 'SD 2', NULL, NULL),
- ('SD 2', '3', 'SD 3', NULL, NULL),
- ('SD 3', '3', 'SD 4', NULL, NULL),
- ('SD 4', '3', 'SD 5', NULL, NULL),
- ('SD 5', '3', 'SD 6', NULL, NULL),
- ('SD 6', '3', 'SMP 1', NULL, NULL),
- ('SMA 1', '1', 'SMA 2', NULL, NULL),
- ('SMA 2', '1', 'SMA 3', NULL, NULL),
- ('SMA 3', '1', NULL, NULL, NULL),
- ('SMP 1', '2', 'SMP 2', NULL, NULL),
- ('SMP 2', '2', 'SMP 3', NULL, NULL),
- ('SMP 3', '2', 'SMA 1', NULL, NULL),
- ('TK A', '4', 'TK B', NULL, NULL),
- ('TK B', '4', 'SD 1', NULL, NULL);
- DROP TABLE IF EXISTS `migrations`;
- CREATE TABLE `migrations` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `batch` int(11) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
- (1, '2017_01_24_020638_create_generic_codes_table', 1),
- (2, '2017_01_24_155356_create_users_table', 1),
- (3, '2017_01_24_162950_create_user_groups_table', 1),
- (4, '2017_01_24_163556_create_user_groups_user_table', 1),
- (5, '2017_01_24_164718_create_pages_table', 1),
- (6, '2017_01_24_165101_create_page_user_group_table', 1),
- (7, '2017_01_24_165522_create_year_periods_table', 1),
- (8, '2017_01_24_165804_create_school_table', 1),
- (9, '2017_01_25_000000_create_education_stages_table', 1),
- (10, '2017_01_25_000001_create_class_table', 1),
- (11, '2017_01_25_000111_create_students_table', 1),
- (12, '2017_01_25_010212_create_fee_codes_table', 1),
- (13, '2017_01_25_014050_create_fees_table', 1),
- (14, '2017_01_25_050720_create_spp_terms_table', 1),
- (15, '2017_01_25_051413_create_student_transactions_table', 1),
- (16, '2017_01_25_075950_create_fee_code_student_transaction_table', 1),
- (17, '2017_01_25_142335_create_notifications_table', 2);
- DROP TABLE IF EXISTS `school`;
- CREATE TABLE `school` (
- `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
- `address` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
- `phone` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `fax` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `email` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `website` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `spp_date` date NOT NULL,
- PRIMARY KEY (`code`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `school` (`code`, `name`, `address`, `phone`, `fax`, `email`, `website`, `spp_date`) VALUES
- ('MJ', 'Sekolah Maju Jaya', 'Jl. Anggur Segar XI Blok NC2 No. 12 Sunter', '082342424242', '0877346433255', 'majujaya@gmail.com', 'majujaya.com', '2017-03-01');
- DROP TABLE IF EXISTS `spp_monthly_transactions`;
- CREATE TABLE `spp_monthly_transactions` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `spp_yearly_transaction_id` int(10) unsigned NOT NULL,
- `month` int(10) unsigned NOT NULL,
- `spp_amount` decimal(19,4) NOT NULL,
- `is_generated` tinyint(4) DEFAULT NULL,
- `paid_at` timestamp NULL DEFAULT NULL,
- `pending_at` timestamp NULL DEFAULT NULL,
- `deleted_at` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `spp_yearly_transaction_id` (`spp_yearly_transaction_id`),
- CONSTRAINT `spp_monthly_transactions_ibfk_1` FOREIGN KEY (`spp_yearly_transaction_id`) REFERENCES `spp_yearly_transactions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=latin1;
- INSERT INTO `spp_monthly_transactions` (`id`, `spp_yearly_transaction_id`, `month`, `spp_amount`, `is_generated`, `paid_at`, `pending_at`, `deleted_at`, `created_at`, `updated_at`) VALUES
- (38, 5, 1, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (39, 5, 2, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (40, 5, 3, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (41, 5, 4, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (42, 5, 5, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (43, 5, 6, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (44, 5, 7, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (45, 5, 8, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (46, 5, 9, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (47, 5, 10, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (48, 5, 11, -82333.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13'),
- (49, 5, 12, -82337.0000, 1, NULL, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13');
- DROP TABLE IF EXISTS `spp_terms`;
- CREATE TABLE `spp_terms` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `description` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
- `education_stage_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `months_term` int(11) NOT NULL DEFAULT '1',
- `spp_amount` decimal(19,4) NOT NULL,
- `spp_discount` decimal(19,4) NOT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `spp_terms_education_stage_id_foreign` (`education_stage_id`),
- CONSTRAINT `spp_terms_education_stage_id_foreign` FOREIGN KEY (`education_stage_id`) REFERENCES `education_stages` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `spp_terms` (`id`, `description`, `education_stage_id`, `months_term`, `spp_amount`, `spp_discount`, `created_at`, `updated_at`) VALUES
- ('SMA-STANDAR', 'Biaya standar SMA', '1', 1, 2000000.0000, 0.0000, '2017-02-12 23:15:36', '2017-02-12 23:15:36'),
- ('SMP-STANDAR', 'SPP SMP Standar', '2', 1, 1600000.0000, 0.0000, '2017-02-08 01:39:28', '2017-02-08 01:39:28'),
- ('SMP-TRIWULAN', 'SPP SMP Paket Triwulan', '2', 3, 1600000.0000, 100000.0000, '2017-02-08 01:43:14', '2017-02-08 01:43:14'),
- ('SPPBULANANSD', 'SPP BULAN SD', '3', 1, 250000.0000, 0.0000, '2017-03-03 02:40:01', '2017-03-03 02:40:01'),
- ('TK_BULANAN', 'TK Bulanan', '4', 1, 1000.0000, 0.0000, '2017-03-03 02:06:48', '2017-03-03 02:06:48');
- DROP TABLE IF EXISTS `spp_yearly_transactions`;
- CREATE TABLE `spp_yearly_transactions` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `student_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `year_period_id` int(10) unsigned NOT NULL,
- `spp_term_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `grade_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `effective_date` date NOT NULL,
- `is_installment` tinyint(4) NOT NULL DEFAULT '0',
- `spp_scholarship` decimal(19,4) DEFAULT NULL,
- `fee_scholarship` decimal(19,4) DEFAULT NULL,
- `paid_at` timestamp NULL DEFAULT NULL,
- `deleted_at` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `grade_id` (`grade_id`),
- KEY `student_id` (`student_id`),
- KEY `year_period_id` (`year_period_id`),
- KEY `spp_term_id` (`spp_term_id`),
- CONSTRAINT `spp_yearly_transactions_ibfk_1` FOREIGN KEY (`grade_id`) REFERENCES `grades` (`id`),
- CONSTRAINT `spp_yearly_transactions_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `spp_yearly_transactions_ibfk_3` FOREIGN KEY (`year_period_id`) REFERENCES `year_periods` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `spp_yearly_transactions_ibfk_4` FOREIGN KEY (`spp_term_id`) REFERENCES `spp_terms` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `spp_yearly_transactions` (`id`, `student_id`, `year_period_id`, `spp_term_id`, `grade_id`, `effective_date`, `is_installment`, `spp_scholarship`, `fee_scholarship`, `paid_at`, `deleted_at`, `created_at`, `updated_at`) VALUES
- (5, '00003', 1, 'TK_BULANAN', 'TK A', '2016-07-01', 0, 1000000.0000, 1000000.0000, NULL, NULL, '2017-03-10 01:18:13', '2017-03-10 01:18:13');
- DROP TABLE IF EXISTS `students`;
- CREATE TABLE `students` (
- `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
- `grade_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `grade_detail` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
- `birth_place` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `birth_date` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `sex_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `religion_id` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
- `address` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
- `father_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
- `mother_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
- `email` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
- `join_date` date NOT NULL,
- `account_no` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
- `account_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
- `balance` decimal(19,4) DEFAULT NULL,
- `balance_last_checked` timestamp NULL DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- `deleted_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `students_religion_foreign` (`religion_id`),
- KEY `students_sex_foreign` (`sex_id`),
- KEY `grade_id` (`grade_id`),
- CONSTRAINT `students_ibfk_2` FOREIGN KEY (`grade_id`) REFERENCES `grades` (`id`),
- CONSTRAINT `students_religion_foreign` FOREIGN KEY (`religion_id`) REFERENCES `generic_codes` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `students_sex_foreign` FOREIGN KEY (`sex_id`) REFERENCES `generic_codes` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `students` (`id`, `name`, `grade_id`, `grade_detail`, `birth_place`, `birth_date`, `sex_id`, `religion_id`, `address`, `father_name`, `mother_name`, `email`, `join_date`, `account_no`, `account_name`, `balance`, `balance_last_checked`, `created_at`, `updated_at`, `deleted_at`) VALUES
- ('00003', 'Devata Udzubika', 'TK A', '1', 'Tangerang', '1905-06-12 00:00:00', 'PRIA', 'BUDDHA', 'jl.asal 12', 'Gautama Udzubika', 'Lusiana Kirti', 'email@gmail.com', '1905-07-09', '12345', 'JOKOWI', 4950000.0000, '2017-03-13 01:23:27', '2017-03-06 02:41:10', '2017-03-13 01:23:27', NULL),
- ('00004', 'Dewi Citra Shanti', 'TK A', '1', 'Tangerang', '1905-06-12 00:00:00', 'PRIA', 'BUDDHA', 'jl.asal 13', 'Dion Horj', 'Meyliana Novita Sari', 'email@gmail.com', '1905-07-09', '12345', NULL, 4950000.0000, '2017-03-06 02:41:11', '2017-03-06 02:41:10', '2017-03-06 02:41:11', NULL);
- DROP TABLE IF EXISTS `users`;
- CREATE TABLE `users` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `username` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
- `email` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
- `password` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
- `user_group_id` int(10) unsigned DEFAULT NULL,
- `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- `deleted_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `users_user_group_id_foreign` (`user_group_id`),
- CONSTRAINT `users_user_group_id_foreign` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `users` (`id`, `username`, `email`, `password`, `user_group_id`, `remember_token`, `created_at`, `updated_at`, `deleted_at`) VALUES
- (11, 'master', 'furibito@gmail.com', '$2y$10$s.2lAxFZsp1ocv86vHv9cuXRY7.9Ozps5hXXYmPUFEcSdgtS1EzES', 1, 'ptb2nxCNxScBpIJL5opZlUsTjaFHYFJl46AuAkp5uqvun3jIgMHbXliHFDhr', '2017-01-27 22:24:34', '2017-02-02 07:13:50', NULL),
- (13, 'admin', 'sdf@a.com', '$2y$10$f6pAuXnra1FEw7EgUMgcN.3iFyC6NmJzd0shUYLz.wl6yKTzpsnYK', 1, 'gx4AGlFEUES2uK5Q73VJSP7CLhYTTFhednN9NIjcAaA8cKBQwKWUo6GNxXpQ', '2017-02-04 21:34:37', '2017-03-05 20:41:15', NULL),
- (14, 'gregory', 'sfasd@a.com', '$2y$10$jvrpjD68.Se5CZfORyhM5ueyBuhRjAfP4or4eOJUx3DcSPPSOJAJ.', 2, NULL, '2017-02-05 01:05:12', '2017-02-05 01:05:12', NULL);
- DROP TABLE IF EXISTS `user_groups`;
- CREATE TABLE `user_groups` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `user_groups` (`id`, `name`, `created_at`, `updated_at`) VALUES
- (1, 'Master Group', '0000-00-00 00:00:00', '2017-02-04 21:22:52'),
- (2, 'Akuntan', '2017-02-04 20:54:53', '2017-02-04 20:54:53');
- DROP TABLE IF EXISTS `user_logs`;
- CREATE TABLE `user_logs` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `user_id` int(10) unsigned NOT NULL,
- `action` varchar(256) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `user_id` (`user_id`),
- CONSTRAINT `user_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- DROP TABLE IF EXISTS `user_notifications`;
- CREATE TABLE `user_notifications` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id` int(10) unsigned NOT NULL,
- `importance` int(10) unsigned NOT NULL,
- `summary` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
- `detail` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
- `seen` tinyint(4) NOT NULL DEFAULT '0',
- `created_at` timestamp NULL DEFAULT NULL,
- `updated_at` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `notifications_user_id_foreign` (`user_id`),
- CONSTRAINT `notifications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- DROP TABLE IF EXISTS `year_periods`;
- CREATE TABLE `year_periods` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `start` date NOT NULL,
- `end` date NOT NULL,
- `active` tinyint(4) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
- INSERT INTO `year_periods` (`id`, `start`, `end`, `active`) VALUES
- (1, '2016-07-01', '2017-06-01', 1),
- (2, '2017-07-01', '2018-06-01', 0);
- -- 2017-03-13 08:25:00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement