package com.sunxung.factoring.entity.sys;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

/**
 * @Description:系统权限配置文件映射关系
 * @Author:JingJiang
 * @E-mail:254702920@qq.com
 * @Date:2017年6月6日 上午11:59:29
 */
@XStreamAlias("permissionConfig")
public class PermissionConfig {

    @XStreamImplicit
    private List<PermissionXml> permissionXmls;

    public List<PermissionXml> getPermissionXmls() {
        return permissionXmls;
    }

    public void setPermissionXmls(List<PermissionXml> permissionXmls) {
        this.permissionXmls = permissionXmls;
    }

    @XStreamAlias("permission")
    public static class PermissionXml {

        @XStreamAsAttribute
        private String cname;
        @XStreamAsAttribute
        private String ename;
        @XStreamAsAttribute
        private int gradation;
        @XStreamAsAttribute
        private String moduleName;
        @XStreamAsAttribute
        private String url;
        @XStreamAsAttribute
        private String icon;
        @XStreamImplicit
        private List<PermissionXml> children;

        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<PermissionXml> getChildren() {
            return children;
        }

        public void setChildren(List<PermissionXml> children) {
            this.children = children;
        }
    }
}
