Explorar o código

:construction: create

visuddhinanda hai 1 ano
pai
achega
0a94b4c020

+ 85 - 0
api-v8/app/Http/Controllers/TaskRelationController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Models\TaskRelation;
+use Illuminate\Http\Request;
+
+class TaskRelationController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Models\TaskRelation  $taskRelation
+     * @return \Illuminate\Http\Response
+     */
+    public function show(TaskRelation $taskRelation)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Models\TaskRelation  $taskRelation
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(TaskRelation $taskRelation)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Models\TaskRelation  $taskRelation
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, TaskRelation $taskRelation)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Models\TaskRelation  $taskRelation
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(TaskRelation $taskRelation)
+    {
+        //
+    }
+}

+ 13 - 0
api-v8/app/Models/TaskRelation.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class TaskRelation extends Model
+{
+    use HasFactory;
+    protected $fillable = ['id','task_id','next_task_id','editor_id'];
+
+}

+ 34 - 0
api-v8/database/migrations/2024_11_29_124111_create_task_relations_table.php

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