package cn.novalon.manage.db.entity.query;

import cn.novalon.manage.sys.core.query.SysRoleQuery;
import cn.novalon.manage.db.dao.QueryField;

/**
 * 角色查询条件对象
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public class SysRoleQueryCriteria {

    @QueryField(propName = "roleName", type = QueryField.Type.INNER_LIKE)
    private String roleName;

    @QueryField(propName = "roleKey", type = QueryField.Type.INNER_LIKE)
    private String roleKey;

    @QueryField(propName = "status", type = QueryField.Type.EQUAL)
    private Integer status;

    @QueryField(blurry = "roleName,roleKey", type = QueryField.Type.INNER_LIKE)
    private String keyword;

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    /**
     * 从领域查询对象转换
     * 
     * @param query 领域查询对象
     */
    public void convert(SysRoleQuery query) {
        if (query == null) {
            return;
        }
        this.roleName = query.getRoleName();
        this.roleKey = query.getRoleKey();
        this.status = query.getStatus();
        this.keyword = query.getKeyword();
    }
}
