mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
43 lines
792 B
PHP
43 lines
792 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Shop extends Model
|
||
|
|
{
|
||
|
|
protected $hidden = [
|
||
|
|
'access_token',
|
||
|
|
'expires_at',
|
||
|
|
'expires_in',
|
||
|
|
'refresh_token',
|
||
|
|
'refresh_token_expires_at',
|
||
|
|
'refresh_token_expires_in',
|
||
|
|
'pop_auth_token_create_response',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function getStatusAttribute($value)
|
||
|
|
{
|
||
|
|
$map = [
|
||
|
|
0 => '未授权',
|
||
|
|
1 => '已授权',
|
||
|
|
2 => '无需授权',
|
||
|
|
3 => '停用',
|
||
|
|
];
|
||
|
|
|
||
|
|
return $map[$value];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getPlatList()
|
||
|
|
{
|
||
|
|
return ['妙选', '快团团'];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getPlatIdAttribute($value)
|
||
|
|
{
|
||
|
|
$map = $this->getPlatList();
|
||
|
|
|
||
|
|
return $map[$value];
|
||
|
|
}
|
||
|
|
}
|