From 58c23c21278b86b53e6beba55fb93befc77d6e36 Mon Sep 17 00:00:00 2001 From: "sosuke.iwabuchi" Date: Sun, 24 Mar 2024 14:14:37 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/User.php | 11 +++++++++++ app/Models/UserHistory.php | 3 +++ 2 files changed, 14 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index c4b770a..bf418a2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -17,6 +17,9 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\DB; use Laravel\Sanctum\HasApiTokens; +/** + * @mixin \Eloquent + */ class User extends Authenticatable implements IModelFeature { use HasApiTokens, HasFactory, Notifiable, HasUuids, SoftDeletes; @@ -26,6 +29,7 @@ class User extends Authenticatable implements IModelFeature const COL_NAME_NAME = 'name'; const COL_NAME_PASSWORD = 'password'; const COL_NAME_ROLE = 'role'; + const COL_NAME_CUSTOMER_ID = 'customer_id'; const COL_NAME_CUSTOMER_CODE = 'customer_code'; const COL_NAME_SHOP_ID = 'shop_id'; @@ -39,6 +43,13 @@ class User extends Authenticatable implements IModelFeature protected $table = "tbl3_mst_users"; protected $hidden = [ + ColumnName::CREATED_AT, + ColumnName::CREATED_BY, + ColumnName::UPDATED_AT, + ColumnName::UPDATED_BY, + ColumnName::DELETED_AT, + self::COL_NAME_CUSTOMER_ID, + self::COL_NAME_CUSTOMER_CODE, self::COL_NAME_PASSWORD, ]; diff --git a/app/Models/UserHistory.php b/app/Models/UserHistory.php index 79ac54c..40ed769 100644 --- a/app/Models/UserHistory.php +++ b/app/Models/UserHistory.php @@ -5,6 +5,9 @@ namespace App\Models; class UserHistory extends HistoryModel { + protected $connection = "htpms"; + protected $table = "tbl3_mst_user_histories"; + public function getModelName(): string { return "ユーザー情報履歴";