package com.hw.nativeapp.httpnet.entity;


import com.hw.nativeapp.annotation.TreeNodeChecked;
import com.hw.nativeapp.annotation.TreeNodeDefault;
import com.hw.nativeapp.annotation.TreeNodeDesc;
import com.hw.nativeapp.annotation.TreeNodeId;
import com.hw.nativeapp.annotation.TreeNodeName;
import com.hw.nativeapp.annotation.TreeNodePid;

/**
 * 利用注解来标记bean字段
 * 使之在解析bean对象时，可以通过注解来获取对应的字段值，而不用知道具体的字段名
 */
public class FileBean {
    @TreeNodeId
    private long id;

    @TreeNodePid
    private long pid;

    @TreeNodeName
    private String name;

    @TreeNodeDesc
    private String desc;

    @TreeNodeChecked
    private int checked;

    @TreeNodeDefault
    private int isdefault;

    public FileBean(long id, long pid, String name, String desc, int checked, int isdefault) {
        this.id = id;
        this.pid = pid;
        this.name = name;
        this.desc = desc;
        this.checked = checked;
        this.isdefault = isdefault;
    }

    public long getId() {
        return id;
    }

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

    public long getPid() {
        return pid;
    }

    public void setPid(long pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

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

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getChecked() {
        return checked;
    }

    public void setChecked(int checked) {
        this.checked = checked;
    }

    public int getIsdefault() {
        return isdefault;
    }

    public void setIsdefault(int isdefault) {
        this.isdefault = isdefault;
    }
}
