Prechádzať zdrojové kódy

Merge branch 'loparev' of aloparev/digital_college into Develop

aloparev 4 rokov pred
rodič
commit
8b6e7e36ea

+ 34 - 0
json/courses.json

@@ -0,0 +1,34 @@
+
+  {
+    "_id": "1234",
+    "isActive": true,
+    "picture": "http://placehold.it/32x32",
+    "name": "Курс вождения самоката",
+    "email": "undefined.undefined@undefined.tv",
+    "phone": "+7 (942) 458-2394",
+    "period": 2,
+    "price": 20000,
+    "address": "304 Clermont Avenue, Rote, Maryland, 4801",
+    "about": "Курс вождения самоката в пьяном виде, без использования ног и рук, с реактивным двигателем в пятой точке",
+    "starting": "С утра в понедельник 32 мая",
+    "tags": [
+      "самокат",
+      "вождение"
+      
+    ],
+    "teachers": [
+      {
+        "id": 0,
+        "name": "Василий Иванович Хмурый",
+        "picture": "http://placehold.it/32x32"
+      }
+      {
+        "id": 1,
+        "name": "Иван Петрович Безопасный",
+        "picture": "http://placehold.it/32x32"
+      },
+     
+    ]
+  }
+  
+  

+ 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;
+}

+ 4 - 0
src/server/database/migrations/2021_05_25_042104_create_courses_table.php

@@ -15,7 +15,11 @@ class CreateCoursesTable extends Migration
     {
         Schema::create('courses', function (Blueprint $table) {
             $table->bigIncrements('id');
+            $table->boolean('isActive');
             $table->string('name');
+            $table->integer('price');
+            $table->integer('period');
+            $table->string('email');
             $table->string('program');
             $table->string('places');
             $table->integer('hours');

+ 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');
+    }
+}