From cb6b55df1d84c63bc2b02134c407d65a14cfdb7c Mon Sep 17 00:00:00 2001 From: E98Developer Date: Tue, 5 May 2026 07:16:30 +0200 Subject: [PATCH] =?UTF-8?q?EV3-412=20Verzi=C3=B3v=C3=A1ltott=20teszt=20-?= =?UTF-8?q?=20sz=C3=A1ll=C3=ADt=C3=A1si=20napok=20FIX=20stock=20status=20t?= =?UTF-8?q?o=20order=20archives=20items.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/OrderArchivesItem.php | 8 ++++++ ...k_status_to_order_archives_items_table.php | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 database/migrations/2026_05_05_070449_add_stock_status_to_order_archives_items_table.php diff --git a/app/Models/OrderArchivesItem.php b/app/Models/OrderArchivesItem.php index 77371df..a8fbd5f 100644 --- a/app/Models/OrderArchivesItem.php +++ b/app/Models/OrderArchivesItem.php @@ -2,10 +2,18 @@ namespace App\Models; +use App\Enums\StockStatusEnum; use Illuminate\Database\Eloquent\Relations\BelongsTo; class OrderArchivesItem extends BaseAuditable { + protected function casts(): array + { + return [ + 'stock_status' => StockStatusEnum::class, + ]; + } + /** * The items that belong to the OrderArchive. */ diff --git a/database/migrations/2026_05_05_070449_add_stock_status_to_order_archives_items_table.php b/database/migrations/2026_05_05_070449_add_stock_status_to_order_archives_items_table.php new file mode 100644 index 0000000..eda2a64 --- /dev/null +++ b/database/migrations/2026_05_05_070449_add_stock_status_to_order_archives_items_table.php @@ -0,0 +1,25 @@ +string('stock_status')->default('in_stock')->after('status'); + }); + } + + public function down(): void + { + Schema::table('order_archives_items', function (Blueprint $table) { + $table->dropColumn('stock_status'); + }); + } +};