35 lines
689 B
PHP
35 lines
689 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
*
|
|
*
|
|
*
|
|
* Date: 2021/9/22
|
|
* Time: 13:37
|
|
*/
|
|
|
|
|
|
namespace business\common\models;
|
|
|
|
use app\common\models\BaseModel;
|
|
use business\common\services\SettingService;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Premission extends BaseModel
|
|
{
|
|
|
|
public $table = 'yz_business_permission';
|
|
public $timestamps = true;
|
|
protected $guarded = [];
|
|
protected $appends = [];
|
|
protected $casts = [];
|
|
|
|
|
|
public function business($business_id = 0)
|
|
{
|
|
$business_id = $business_id ?: SettingService::getBusinessId();
|
|
return self::uniacid()->where('business_id', $business_id);
|
|
}
|
|
|
|
} |