From bb11539589073a2dfe0629c952a44bd0a7c6db5b Mon Sep 17 00:00:00 2001 From: raccoon254 Date: Tue, 11 Jun 2024 09:26:27 +0300 Subject: [PATCH] Create order attachment model and migration --- app/Models/OrderAttachment.php | 11 ++++++++ database/factories/AttachmentFactory.php | 27 +++++++++++++++++++ ..._062604_create_order_attachments_table.php | 27 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 app/Models/OrderAttachment.php create mode 100644 database/factories/AttachmentFactory.php create mode 100644 database/migrations/2024_06_11_062604_create_order_attachments_table.php diff --git a/app/Models/OrderAttachment.php b/app/Models/OrderAttachment.php new file mode 100644 index 0000000..70eebfe --- /dev/null +++ b/app/Models/OrderAttachment.php @@ -0,0 +1,11 @@ + $this->faker->name(), + 'path' => $this->faker->word(), + 'type' => $this->faker->word(), + 'size' => $this->faker->randomNumber(), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + + 'message_id' => Message::factory(), + ]; + } +} diff --git a/database/migrations/2024_06_11_062604_create_order_attachments_table.php b/database/migrations/2024_06_11_062604_create_order_attachments_table.php new file mode 100644 index 0000000..a9c9c76 --- /dev/null +++ b/database/migrations/2024_06_11_062604_create_order_attachments_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('order_attachments'); + } +};