49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Virtual;
|
|
|
|
use App\Core\Model;
|
|
use Illuminate\Auth\Authenticatable;
|
|
use Tymon\JWTAuth\Contracts\JWTSubject;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
|
|
|
class CompanyAccount extends Model implements AuthenticatableContract, JWTSubject
|
|
{
|
|
use SoftDeletes, Authenticatable;
|
|
|
|
protected $table = 'virtual_company_accounts';
|
|
|
|
protected $fillable = ['id', 'company_id' , 'nickname', 'username', 'mobile', 'password', 'salt', 'status'];
|
|
|
|
/**
|
|
* Get the hidden attributes for the model.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getHidden()
|
|
{
|
|
return ['password', 'salt', 'deleted_at'];
|
|
}
|
|
|
|
/**
|
|
* Get the identifier that will be stored in the subject claim of the JWT.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getJWTIdentifier()
|
|
{
|
|
return $this->getKey();
|
|
}
|
|
|
|
/**
|
|
* Return a key value array, containing any custom claims to be added to the JWT.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getJWTCustomClaims()
|
|
{
|
|
return [];
|
|
}
|
|
}
|