diff --git a/app/Dosen.php b/app/Dosen.php new file mode 100644 index 0000000000000000000000000000000000000000..fad6364412d7506ebdaec0abc7593f16de479dfc --- /dev/null +++ b/app/Dosen.php @@ -0,0 +1,12 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Dosen extends Model +{ + const STATUS_PENGUJI_2 = 1; + const STATUS_PENGUJI_1 = 2; + const STATUS_PEMBIMBING = 3; +} diff --git a/app/Mahasiswa.php b/app/Mahasiswa.php index 6356000dc6aea458113580c52585ac6ffb34ff60..9ee5319023f84429631d15c43496e20f4e70a4b2 100644 --- a/app/Mahasiswa.php +++ b/app/Mahasiswa.php @@ -6,5 +6,21 @@ use Illuminate\Database\Eloquent\Model; class Mahasiswa extends Model { + const STATUS_MENUNGGU_TOPIK = 0; + const STATUS_SIAP_SEMINAR_TOPIK = 1; + const STATUS_MENUNGGU_PROPOSAL = 2; + const STATUS_SIAP_SEMINAR_PROPOSAL = 3; + const STATUS_MASA_BIMBINGAN = 4; + const STATUS_SIAP_SEMINAR_TESIS = 5; + const STATUS_SIAP_SIDANG_TESIS = 6; + const STATUS_LULUS = 7; + const STATUS_STRINGS = [ + "Menunggu Topik","Siap Seminar Topik", "Menunggu Proposal", "Siap Seminar Proposal", "Masa Bimbingan", + "Siap Seminar Tesis", "Siap Sidang Tesis", "Lulus" + ]; + public function getStatus($status) { + return Mahasiswa::STATUS_STRINGS[$status]; + } + // } diff --git a/app/Manajer.php b/app/Manajer.php new file mode 100644 index 0000000000000000000000000000000000000000..6aa9c88057241aead3ba2f268609185c200f488e --- /dev/null +++ b/app/Manajer.php @@ -0,0 +1,10 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Manajer extends Model +{ + // +} diff --git a/database/migrations/2018_02_26_094141_create_mahasiswas_table.php b/database/migrations/2018_02_26_094141_create_mahasiswas_table.php index 984c3dc9b18d9c3c1cff32a3b7183f63564e3fc2..bd55b43a6e9f73c38d2ec3300c026eb44c98b856 100644 --- a/database/migrations/2018_02_26_094141_create_mahasiswas_table.php +++ b/database/migrations/2018_02_26_094141_create_mahasiswas_table.php @@ -14,7 +14,9 @@ class CreateMahasiswasTable extends Migration public function up() { Schema::create('mahasiswas', function (Blueprint $table) { - $table->increments('id'); + $table->unsignedInteger('user_id'); +// $table->integer('status'); + $table->integer('tesis_id'); $table->timestamps(); }); } diff --git a/database/migrations/2018_03_02_052137_create_dosens_table.php b/database/migrations/2018_03_02_052137_create_dosens_table.php new file mode 100644 index 0000000000000000000000000000000000000000..ff0c6fe56650a7d1ddec004a4b43e731023c1b76 --- /dev/null +++ b/database/migrations/2018_03_02_052137_create_dosens_table.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateDosensTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('dosens', function (Blueprint $table) { + $table->unsignedInteger('user_id'); + $table->integer('status'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('dosens'); + } +} diff --git a/database/migrations/2018_03_02_052148_create_manajers_table.php b/database/migrations/2018_03_02_052148_create_manajers_table.php new file mode 100644 index 0000000000000000000000000000000000000000..e2da69ee68231f5ce7fab8748b8c774e249ed40c --- /dev/null +++ b/database/migrations/2018_03_02_052148_create_manajers_table.php @@ -0,0 +1,31 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateManajersTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('manajers', function (Blueprint $table) { + $table->increments('user_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('manajers'); + } +}