12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\bug\model;
- class RoleAction extends Base
- {
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'role_id' =>'bigint',//角色id
- 'action_data' =>'text',//数据权限
- 'action_conllect' =>'text',//菜单权限
- 'private_data' =>'text',//私有数据权限
- 'status' =>'int',//状态
- 'addtime' =>'datetime',//
- 'updatetime' =>'datetime',//
- ];
- protected $createTime='addtime';
- protected $updateTime='updatetime';
- public function GetActionConllectAttr($v){
- return json_decode($v,true);
- }
-
- public function SetActionConllectAttr($v){
- return json_encode($v,JSON_UNESCAPED_UNICODE);
- }
-
- public function GetActionDataAttr($v){
- return json_decode($v,true);
- }
-
- public function SetActionDataAttr($v){
- return json_encode($v,JSON_UNESCAPED_UNICODE);
- }
-
- public function GetPrivateDataAttr($v){
- return json_decode($v,true);
- }
-
- public function SetPrivateDataAttr($v){
- return json_encode($v,JSON_UNESCAPED_UNICODE);
- }
- }
|