Prechádzať zdrojové kódy

Создал модель организаций и подправил миграцию курсов

aloparev 3 rokov pred
rodič
commit
9b479aa288

+ 11 - 0
src/server/app/Models/Organisations.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class Organisations extends Model
+{
+    use HasFactory;
+}

+ 31 - 0
src/server/database/migrations/2021_05_28_075639_create_organisations_table.php

@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOrganisationsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('organisations', function (Blueprint $table) {
+            $table->id();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('organisations');
+    }
+}