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 "ユーザー情報履歴";