Add Printers and Printertypes modules with CRUD functionality, migrations, and UI components.

This commit is contained in:
2026-01-24 11:23:37 +01:00
parent 563b0e750e
commit fd61f14ffe
25 changed files with 1017 additions and 4 deletions
@@ -0,0 +1,34 @@
<?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('printertypes', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('manufacturer_id')->constrained('manufacturers')->onUpdate('cascade')->onDelete('cascade');
$table->string('temp_max')->nullable();
$table->decimal('bed_size_x', 5, 2)->default(0);
$table->decimal('bed_size_y', 5, 2)->default(0);
$table->decimal('price', 10, 2)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('printertypes');
}
};
@@ -0,0 +1,30 @@
<?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('printers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('printertype_id')->constrained('printertypes')->onUpdate('cascade')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('printers');
}
};