diff --git a/app/Models/Filament.php b/app/Models/Filament.php index a15f183..caf5dca 100644 --- a/app/Models/Filament.php +++ b/app/Models/Filament.php @@ -19,7 +19,13 @@ class Filament extends Model 'weight', 'diameter', 'price', - 'stock' + 'finish', + 'image', + 'stock', + 'temp_min', + 'temp_max', + 'buildplate_id', + 'extruder_id' ]; // Filament belongs to a type diff --git a/database/migrations/2025_03_10_183058_create_filaments.php b/database/migrations/2025_03_10_183058_create_filaments.php index 2c6ca4c..fc36475 100644 --- a/database/migrations/2025_03_10_183058_create_filaments.php +++ b/database/migrations/2025_03_10_183058_create_filaments.php @@ -22,6 +22,13 @@ return new class extends Migration $table->string('weight')->required(); $table->string('diameter')->required(); $table->string('price')->nullable(); + $table->string('finish')->nullable(); + $table->string('image')->nullable(); + $table->integer('stock')->default(0); + $table->integer('temp_min')->nullable(); + $table->integer('temp_max')->nullable(); + $table->integer('buildplate_id')->nullable(); + $table->integer('extruder_id')->nullable(); }); } diff --git a/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php b/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php deleted file mode 100644 index 28ac742..0000000 --- a/database/migrations/2025_03_11_112017_add_filamentstock_to_filaments_table.php +++ /dev/null @@ -1,30 +0,0 @@ -integer('stock')->default(0); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('filaments', function (Blueprint $table) { - // removing stock from filaments table - $table->dropColumn('stock'); - }); - } -};