2017-06-11 09:10:31 +08:00
|
|
|
<?php
|
2018-03-20 09:50:40 +08:00
|
|
|
|
2017-06-11 09:10:31 +08:00
|
|
|
namespace App\Models;
|
|
|
|
|
2017-12-16 02:36:13 +08:00
|
|
|
use Laratrust\Models\LaratrustRole;
|
2017-06-11 09:10:31 +08:00
|
|
|
|
2019-06-21 04:52:37 +08:00
|
|
|
/**
|
2021-03-20 01:09:29 +08:00
|
|
|
* @property int id
|
|
|
|
* @property string name
|
|
|
|
* @property string display_name
|
|
|
|
* @property bool read_only
|
|
|
|
* @property bool disable_activity_checks
|
|
|
|
*
|
2020-02-09 02:29:34 +08:00
|
|
|
* @mixin \Illuminate\Database\Eloquent\Builder
|
2019-06-21 04:52:37 +08:00
|
|
|
*/
|
2017-12-16 02:36:13 +08:00
|
|
|
class Role extends LaratrustRole
|
2017-06-11 09:10:31 +08:00
|
|
|
{
|
2019-06-21 04:52:37 +08:00
|
|
|
protected $fillable = [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
'display_name',
|
|
|
|
'read_only',
|
2021-03-20 01:09:29 +08:00
|
|
|
'disable_activity_checks',
|
2019-06-21 04:52:37 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
protected $casts = [
|
2021-03-20 01:09:29 +08:00
|
|
|
'read_only' => 'boolean',
|
|
|
|
'disable_activity_checks' => 'boolean',
|
2019-06-21 04:52:37 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Validation rules
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $rules = [
|
|
|
|
'display_name' => 'required',
|
|
|
|
];
|
2017-06-11 09:10:31 +08:00
|
|
|
}
|