1
0
mirror of https://github.com/robonen/metr.git synced 2026-03-20 02:44:42 +00:00

Merge pull request #14 from robonen/backend

Backend
This commit is contained in:
2022-06-01 23:33:56 +07:00
committed by GitHub
36 changed files with 784 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
<?php
use App\Enums\OrderTypesEnum;
use App\Enums\RoomTypesEnum;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
@@ -18,8 +19,8 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->enum('type', OrderTypesEnum::values());
$table->decimal('price');
$table->unsignedSmallInteger('rooms');
$table->decimal('price', 15);
$table->enum('rooms', RoomTypesEnum::values());
$table->decimal('space');
$table->string('yandex_mark')->nullable();
$table->string('location');

View File

@@ -20,6 +20,7 @@ return new class extends Migration
$table
->foreignId('offer_id')
->nullable()
->constrained()
->onUpdate('cascade');
});