first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_products', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->longText('desc')->nullable();
$table->decimal('price', 10, 2);
$table->integer('qty');
$table->unsignedBigInteger('category_id')->nullable();
$table->unsignedBigInteger('sub_category_id')->nullable();
$table->unsignedBigInteger('supplier_id')->nullable();
$table->unsignedBigInteger('warehouse_id')->nullable();
$table->integer('status')->default(11);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_products');
}
};

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_product_stocks', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('product_id')->nullable();
$table->unsignedBigInteger('warehouse_id')->nullable();
$table->decimal('qty_available', 10, 2);
$table->integer('min_stock_level');
$table->integer('max_stock_level');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_product_stocks');
}
};

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_categories', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('code')->nullable();
$table->string('slug')->nullable();
$table->integer('status')->default(11);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_categories');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_sub_categories', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('code')->nullable();
$table->string('slug')->nullable();
$table->longText('description')->nullable();
$table->unsignedBigInteger('category_id')->nullable();
$table->integer('status')->default(11);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_sub_categories');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('tbl_warehouses', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->integer('capacity')->default(11);
$table->string('phone')->nullable();
$table->string('email')->nullable();
$table->longText('address')->nullable();
$table->integer('status')->default(11);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tbl_warehouses');
}
};

View File

@ -0,0 +1,16 @@
<?php
namespace Modules\Product\database\seeders;
use Illuminate\Database\Seeder;
class ProductDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// $this->call([]);
}
}