<?php

namespace app\admin\model;

class RoleModel extends BaseModel
{
    protected $table = 'role';

    public function delRowById($id){
        if(!$this->where(['id'=>$id])->delete()){
            return false;
        }
        (new RolePermissionModel)->where(['r_id'=>$id])->delete();
        return true;
    }
}