package com.zhangmeng.online.exam.ui.module;

import java.util.ArrayList;
import java.util.List;

public class Permission {
    private int id;
    private String code;        // 权限代码
    private String name;        // 权限名称
    private String type;        // 权限类型（菜单、按钮等）
    private int parentId;       // 父权限ID
    private String url;         // 资源路径
    private int sort;          // 排序号
    private List<Permission> children = new ArrayList<>();

    public Permission(int id, String code, String name, String type, int parentId, String url, int sort) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.type = type;
        this.parentId = parentId;
        this.url = url;
        this.sort = sort;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

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

    public int getParentId() {
        return parentId;
    }

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

    public String getUrl() {
        return url;
    }

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

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public List<Permission> getChildren() {
        return children;
    }

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