This commit is contained in:
sajjad
2023-09-11 03:06:11 -07:00
parent d118b182a4
commit 2b39228ea1
20 changed files with 672 additions and 16283 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePackagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('packages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id');
$table->text('note')->nullable();
$table->enum('verified', ['Verified', 'NotVerified']);
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('packages');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('items', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('size');
$table->string('unique_id');
$table->string('specific');
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('items');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemPackageTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('item_package', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('item_id');
$table->foreign('item_id')->references('id')->on('items');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('item_package');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCyclesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cycles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->date('date');
$table->string('sterilizer_id');
$table->text('note')->nullable();
$table->enum('verified',['Verified', 'NotVerified']);
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cycles');
}
}
@@ -0,0 +1,42 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('packes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id');
$table->date('sterile_date')->nullable();
$table->date('expire_date')->nullable();
$table->string('sterilizer_id');
$table->string('cycle_number');
$table->string('lot_number');
$table->string('department');
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('packes');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackPackage extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pack_package', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pack_package');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableCyclePack extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cycle_pack', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('cycle_id');
$table->foreign('cycle_id')->references('id')->on('cycles');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cycle_pack');
}
}