package com.sunxung.factoring.entity.sys;

import java.util.List;

import org.hibernate.validator.constraints.NotEmpty;

import com.sunxung.factoring.entity.BaseEntity;

/**
 * @Description:系统权限实体类
 * @Date:2017年6月6日 上午11:55:17
 */
public class Permission extends BaseEntity {

    private static final long serialVersionUID = 1L;
    /** 父级ID */
    private Long parentId;
    /** 中文名称 */
    @NotEmpty(message = "中文名称不能为空")
    private String cname;
    /** 英文名称 */
    @NotEmpty(message = "英文名称不能为空")
    private String ename;
    /** 顺序 */
    private int gradation;
    /** 所属模块名称 */
    private String moduleName;
    /** 链接地址 */
    private String url;
    /** 图标 */
    private String icon;
    /** 判断节点是否可以打开 */
    private Integer count;
    /** 判断节点是否选中 */
    private boolean check;
    /** 类型 **/
    private String type;

    private List<Permission> childPermission;

    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public int getGradation() {
        return gradation;
    }

    public void setGradation(int gradation) {
        this.gradation = gradation;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<Permission> getChildPermission() {
        return childPermission;
    }

    public void setChildPermission(List<Permission> childPermission) {
        this.childPermission = childPermission;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
