package com.huatek.frame.base.entity;

import java.io.Serializable;

import com.huatek.torch.frame.validate.KerCheck;
import com.huatek.torch.frame.validate.KerMode;
import com.huatek.torch.sql.annotation.FieldName;
import com.huatek.torch.sql.annotation.Id;
import com.huatek.torch.sql.annotation.TableName;
import com.huatek.torch.sql.beans.Pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 系统_资源 entity
 *
 * @author key_dong
 * @date 2018-7-11 12:37:46
 */
@Setter
@Getter
@TableName("sys_permission")
public class Permission extends Pojo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4730699900000499933L;

	/**
	 * 
	 */
	@ApiModelProperty(value="图标",name="ico",required=true)
	@FieldName("ico")
	private String ico;

	/**
	 * 
	 */
	@ApiModelProperty(value="等级",name="level",required=true)
	@FieldName("level")
	private Integer level;

	/**
	 * 
	 */
	@ApiModelProperty(value="名称",name="pname",required=true)
	@KerCheck(rule = KerMode.NOT_BLANK, ruleMessage = "PERMISSION.PNAME.NOTBLANK",max=8,maxMessage="PERMISSION.PNAME.LENGTH")
	@FieldName("pname")
	private String pname;

	/**
	 * 
	 */
	@ApiModelProperty(value="父id",name="parentId",required=true)
	@FieldName("parent_id")
	private String parentId;

	/**
	 * 
	 */ 
	@ApiModelProperty(value="资源类型",name="resourceType",required=true)
	@FieldName("resource_type")
	private String resourceType;

	/**
	 * 是否删除(0 否 1是)
	 */
	@ApiModelProperty(value="是否删除(0 否 1是)",name="deleted",required=true)
	@FieldName("deleted")
	private String deleted;

	/**
	 * 
	 */
	@ApiModelProperty(value="权限编码",name="permission",required=true)
	@KerCheck(rule = KerMode.NOT_BLANK, ruleMessage = "PERMISSION.PERMISSION.NOTBLANK",max=8,maxMessage="PERMISSION.PERMISSION.LENGTH")
	@FieldName("permission")
	private String permission;

	/**
	 * 
	 */
	@ApiModelProperty(value="id",name="id",required=true)
	@Id("id")
	private String id;
	/**
	 * 
	 */
	@ApiModelProperty(value="页面地址",name="url",required=true)
	@FieldName("url")
	private String url;
	
	@ApiModelProperty(value="内部菜单",name="iFrame",required=true)
	@FieldName("i_frame")
	private String iFrame;
}