40 lines
909 B
PHP
Executable File
40 lines
909 B
PHP
Executable File
<?php
|
|
|
|
namespace app\model;
|
|
|
|
|
|
/**
|
|
* @property integer $id 主键(主键)
|
|
* @property integer $pid 上级id
|
|
* @property string $name 角色名
|
|
* @property string $rules 权限
|
|
* @property integer $max_send_msg_count 最大消息数量
|
|
* @property integer $max_friend_count 最大好友数量
|
|
* @property integer $max_group_join_count 最大加入的群组数量
|
|
* @property integer $max_gourp_create_count 最大创建的群组数量
|
|
* @property integer $created_at 创建时间
|
|
* @property integer $updated_at 更新时间
|
|
* @property integer $status 状态
|
|
|
|
*/
|
|
class UserRole extends Base
|
|
{
|
|
|
|
|
|
public function setRulesAttr($v='',$row=[])
|
|
{
|
|
if(is_array($v)){
|
|
return implode(',',$v);
|
|
}
|
|
return $v;
|
|
}
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getRuleIds()
|
|
{
|
|
return $this->rules ? explode(',', $this->rules) : [];
|
|
}
|
|
|
|
}
|