visuddhinanda 1 년 전
부모
커밋
6a9a7912c3

+ 65 - 0
api-v8/app/Http/Controllers/AttachmentMapController.php

@@ -0,0 +1,65 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Http\Requests\StoreAttachmentMapRequest;
+use App\Http\Requests\UpdateAttachmentMapRequest;
+use App\Models\AttachmentMap;
+
+class AttachmentMapController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \App\Http\Requests\StoreAttachmentMapRequest  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(StoreAttachmentMapRequest $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Models\AttachmentMap  $attachmentMap
+     * @return \Illuminate\Http\Response
+     */
+    public function show(AttachmentMap $attachmentMap)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \App\Http\Requests\UpdateAttachmentMapRequest  $request
+     * @param  \App\Models\AttachmentMap  $attachmentMap
+     * @return \Illuminate\Http\Response
+     */
+    public function update(UpdateAttachmentMapRequest $request, AttachmentMap $attachmentMap)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Models\AttachmentMap  $attachmentMap
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(AttachmentMap $attachmentMap)
+    {
+        //
+    }
+}

+ 30 - 0
api-v8/app/Http/Requests/StoreAttachmentMapRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class StoreAttachmentMapRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 30 - 0
api-v8/app/Http/Requests/UpdateAttachmentMapRequest.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Http\Requests;
+
+use Illuminate\Foundation\Http\FormRequest;
+
+class UpdateAttachmentMapRequest extends FormRequest
+{
+    /**
+     * Determine if the user is authorized to make this request.
+     *
+     * @return bool
+     */
+    public function authorize()
+    {
+        return false;
+    }
+
+    /**
+     * Get the validation rules that apply to the request.
+     *
+     * @return array
+     */
+    public function rules()
+    {
+        return [
+            //
+        ];
+    }
+}

+ 11 - 0
api-v8/app/Models/AttachmentMap.php

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

+ 36 - 0
api-v8/database/migrations/2025_03_15_112630_create_attachment_maps_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateAttachmentMapsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('attachment_maps', function (Blueprint $table) {
+            $table->id();
+            $table->uuid('uid')->unique();
+            $table->string('res_type', 64)->index();
+            $table->uuid('res_id')->index();
+            $table->uuid('attachment_id')->index();
+            $table->uuid('editor_id')->index();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('attachment_maps');
+    }
+}