rocket-a


git -C '/home/opc/rocketa.git' show 09cc738 -- app/Models/Translation.php

commit 09cc738e17d1ad148bf2243e1f04aefe8cde1fc5
Author: Satoshi Ujihara <satoshi_ujihara@fivegate.jp>
Date:   Thu Oct 9 10:19:51 2025 +0900

    翻訳機能追加+成果受け取りの余計な機能を削除

diff --git a/app/Models/Translation.php b/app/Models/Translation.php
new file mode 100644
index 0000000..7807f81
--- /dev/null
+++ b/app/Models/Translation.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Translation extends Model
+{
+    protected $fillable = ['locale', 'key', 'value'];
+    public $timestamps = false;
+
+    protected $connection = 'mysql'; // ←複数DBならここを指定可能
+
+    // テーブル名は動的にセットする
+    protected $table = null;
+
+    public function setTableName($table)
+    {
+        $this->table = $table;
+        return $this;
+    }
+}
\ No newline at end of file

diff.txt · 最終更新: by root