Browse Source

ログインユーザー微修正

develop
sosuke.iwabuchi 1 year ago
parent
commit
58c23c2127
2 changed files with 14 additions and 0 deletions
  1. +11
    -0
      app/Models/User.php
  2. +3
    -0
      app/Models/UserHistory.php

+ 11
- 0
app/Models/User.php View File

@@ -17,6 +17,9 @@ use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Laravel\Sanctum\HasApiTokens; use Laravel\Sanctum\HasApiTokens;


/**
* @mixin \Eloquent
*/
class User extends Authenticatable implements IModelFeature class User extends Authenticatable implements IModelFeature
{ {
use HasApiTokens, HasFactory, Notifiable, HasUuids, SoftDeletes; use HasApiTokens, HasFactory, Notifiable, HasUuids, SoftDeletes;
@@ -26,6 +29,7 @@ class User extends Authenticatable implements IModelFeature
const COL_NAME_NAME = 'name'; const COL_NAME_NAME = 'name';
const COL_NAME_PASSWORD = 'password'; const COL_NAME_PASSWORD = 'password';
const COL_NAME_ROLE = 'role'; const COL_NAME_ROLE = 'role';
const COL_NAME_CUSTOMER_ID = 'customer_id';
const COL_NAME_CUSTOMER_CODE = 'customer_code'; const COL_NAME_CUSTOMER_CODE = 'customer_code';
const COL_NAME_SHOP_ID = 'shop_id'; const COL_NAME_SHOP_ID = 'shop_id';


@@ -39,6 +43,13 @@ class User extends Authenticatable implements IModelFeature
protected $table = "tbl3_mst_users"; protected $table = "tbl3_mst_users";


protected $hidden = [ 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, self::COL_NAME_PASSWORD,
]; ];




+ 3
- 0
app/Models/UserHistory.php View File

@@ -5,6 +5,9 @@ namespace App\Models;


class UserHistory extends HistoryModel class UserHistory extends HistoryModel
{ {
protected $connection = "htpms";
protected $table = "tbl3_mst_user_histories";

public function getModelName(): string public function getModelName(): string
{ {
return "ユーザー情報履歴"; return "ユーザー情報履歴";


Loading…
Cancel
Save