chore: update document approval workflow and bug fixes

This commit is contained in:
2026-05-25 13:05:20 +08:00
parent d573c02893
commit 39a8e1d4cd
910 changed files with 49994 additions and 1010 deletions

View File

@@ -0,0 +1,28 @@
<?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::table('materials', function (Blueprint $table) {
$table->enum('type', ['single', 'kit', 'assembly'])->default('single')->after('description');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('materials', function (Blueprint $table) {
$table->dropColumn('type');
});
}
};

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('material_components', function (Blueprint $table) {
$table->id();
$table->foreignId('parent_id')->constrained('materials')->cascadeOnDelete();
$table->foreignId('component_id')->constrained('materials')->cascadeOnDelete();
$table->decimal('quantity', 12, 4);
$table->timestamps();
$table->unique(['parent_id', 'component_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('material_components');
}
};

View File

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