package com.hnshituo.core.auth.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnshituo.basic.vo.BaseVO;
import com.hnshituo.core.auth.mapper.FunctionMapper;
import com.hnshituo.orm.annotation.Column;
import com.hnshituo.orm.annotation.Id;
import com.hnshituo.orm.annotation.Id.GenerationStrategy;
import com.hnshituo.orm.annotation.Table;

@Table(name="CORE_AUTH_FUNCTION", namespace=FunctionMapper.class, cache=true)
public class Function extends BaseVO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 515614599603927054L;

	/** 功能编号 */
	@Id(generationStrategy=GenerationStrategy.AUTO)
	private Integer id;

	/** 功能名称 */
	@Column
	private String text;
	
	/** 功能别名 */
	@Column
	private String alias;

	/** 父功能编号 */
	@Column
	private Integer pid;

	/** 功能URL */
	@Column
	private String url;

	/** 功能类型(0：菜单；1：功能；) */
	@Column
	private Integer type;
	
	/** 是否启用数据权限(0-否;1-是) */
	@Column("DATA_PRG")
	private Integer dataPrg;
	
	/** 数据权限字段名 */
	@Column("DATA_PRG_FIELD")
	private String dataPrgField;

	/** 功能按钮渲染DOM的ID */
	@Column("PANEL_ID")
	private String panelId;

	/** 图标样式 */
	@Column("ICON_CLS")
	private String iconCls;

	/** Javascript处理函数 */
	@Column
	private String handler;

	/** 顺序号 */
	@Column
	private Integer seq;

	/** 权限编号 */
	@Column("PRG_ID")
	private Integer prgId;

	/** 是否显示(0-显示;1-不显示) */
	@Column
	private Integer visible;
	
	/** 是否拥有权限 */
	private boolean checked;

	@Column("CREATE_MAN")
	private String createMan;

	@Column("CREATE_TIME")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	@Column("UPDATE_MAN")
	private String updateMan;

	@Column("UPDATE_TIME")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	@Column
	private String memo;
	
	private List<Function> children;

	public Integer getId() {
		return this.id;
	}

	public String getText() {
		return this.text;
	}

	public Integer getPid() {
		return this.pid;
	}

	public String getUrl() {
		return this.url;
	}

	public Integer getType() {
		return this.type;
	}

	public String getIconCls() {
		return this.iconCls;
	}

	public String getHandler() {
		return this.handler;
	}

	public Integer getSeq() {
		return this.seq;
	}

	public Integer getPrgId() {
		return this.prgId;
	}

	public Integer getVisible() {
		return this.visible;
	}

	public String getCreateMan() {
		return this.createMan;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public String getUpdateMan() {
		return this.updateMan;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public String getMemo() {
		return this.memo;
	}

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

	public void setText(String text) {
		this.text = text;
	}

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

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

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

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public void setHandler(String handler) {
		this.handler = handler;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public void setPrgId(Integer prgId) {
		this.prgId = prgId;
	}

	public void setVisible(Integer visible) {
		this.visible = visible;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public void setUpdateMan(String updateMan) {
		this.updateMan = updateMan;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

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

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

	public String getPanelId() {
		return panelId;
	}

	public void setPanelId(String panelId) {
		this.panelId = panelId;
	}

	public boolean isChecked() {
		return checked;
	}

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

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public Integer getDataPrg() {
		return dataPrg;
	}

	public void setDataPrg(Integer dataPrg) {
		this.dataPrg = dataPrg;
	}

	public String getDataPrgField() {
		return dataPrgField;
	}

	public void setDataPrgField(String dataPrgField) {
		this.dataPrgField = dataPrgField;
	}

}
