diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ee8ca5b..9242dee 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\Schema; class AppServiceProvider extends ServiceProvider { @@ -23,6 +24,6 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + Schema::defaultStringLength(191); } } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 4a3ba47..80b225c 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -19,6 +19,7 @@ class CreateUsersTable extends Migration $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); + $table->string('role'); $table->rememberToken(); $table->timestamps(); }); diff --git a/database/migrations/2019_06_02_221144_create_kelas.php b/database/migrations/2019_06_02_221144_create_kelas.php new file mode 100644 index 0000000..c2adaea --- /dev/null +++ b/database/migrations/2019_06_02_221144_create_kelas.php @@ -0,0 +1,34 @@ +bigIncrements('id'); + $table->integer('periode_id'); + $table->string('nama'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('kelas'); + } +} diff --git a/database/migrations/2019_06_02_221149_create_role.php b/database/migrations/2019_06_02_221149_create_role.php new file mode 100644 index 0000000..f79f089 --- /dev/null +++ b/database/migrations/2019_06_02_221149_create_role.php @@ -0,0 +1,34 @@ +bigIncrements('id'); + $table->integer('tagihan_id'); + $table->integer('siswa_id'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('role'); + } +} diff --git a/database/migrations/2019_06_02_221154_create_periode.php b/database/migrations/2019_06_02_221154_create_periode.php new file mode 100644 index 0000000..5b230f4 --- /dev/null +++ b/database/migrations/2019_06_02_221154_create_periode.php @@ -0,0 +1,35 @@ +bigIncrements('id'); + $table->date('tgl_mulai'); + $table->date('tgl_selesai'); + $table->boolean('is_active'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('periode'); + } +} diff --git a/database/migrations/2019_06_02_221204_create_siswa.php b/database/migrations/2019_06_02_221204_create_siswa.php new file mode 100644 index 0000000..54bd0fd --- /dev/null +++ b/database/migrations/2019_06_02_221204_create_siswa.php @@ -0,0 +1,42 @@ +bigIncrements('id'); + $table->integer('kelas_id'); + $table->string('nama'); + $table->string('tempat_lahir'); + $table->date('tanggal_lahir'); + $table->enum('jenis_kelamin', ['L', 'P']); + $table->text('alamat'); + $table->string('nama_wali'); + $table->string('telp_wali'); + $table->string('pekerjaan_wali'); + $table->boolean('is_yatim'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('siswa'); + } +} diff --git a/database/migrations/2019_06_02_221209_create_tagihan.php b/database/migrations/2019_06_02_221209_create_tagihan.php new file mode 100644 index 0000000..29b2523 --- /dev/null +++ b/database/migrations/2019_06_02_221209_create_tagihan.php @@ -0,0 +1,36 @@ +bigIncrements('id'); + $table->string('nama'); + $table->double('jumlah'); + $table->boolean('wajib_semua'); + $table->integer('kelas_id'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tagihan'); + } +} diff --git a/database/migrations/2019_06_02_221214_create_transaksi.php b/database/migrations/2019_06_02_221214_create_transaksi.php new file mode 100644 index 0000000..9fa0529 --- /dev/null +++ b/database/migrations/2019_06_02_221214_create_transaksi.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->integer('siswa_id'); + $table->integer('tagihan_id'); + $table->integer('diskon'); + $table->boolean('is_lunas'); + $table->text('keterangan'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('transaksi'); + } +} diff --git a/database/migrations/2019_06_02_221221_create_keuangan.php b/database/migrations/2019_06_02_221221_create_keuangan.php new file mode 100644 index 0000000..f7a3a85 --- /dev/null +++ b/database/migrations/2019_06_02_221221_create_keuangan.php @@ -0,0 +1,38 @@ +bigIncrements('id'); + $table->integer('tabungan_id'); + $table->integer('transaksi_id'); + $table->enum('tipe', ['in','out']); + $table->double('jumlah'); + $table->double('total_kas'); + $table->text('keterangan'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('keuangan'); + } +} diff --git a/database/migrations/2019_06_02_221229_create_tabungan.php b/database/migrations/2019_06_02_221229_create_tabungan.php new file mode 100644 index 0000000..929a52a --- /dev/null +++ b/database/migrations/2019_06_02_221229_create_tabungan.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->integer('siswa_id'); + $table->enum('tipe', ['in','out']); + $table->double('jumlah'); + $table->double('saldo'); + $table->text('keperluan'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tabungan'); + } +}