package com.huatek.frame.base.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

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_group")
public class Group extends Pojo implements Serializable {

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

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

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

	/**
	 * 编号
	 */
	@ApiModelProperty(value="编号",name="groupCode",required=true)
	@KerCheck(rule = KerMode.NOT_BLANK, ruleMessage = "GROUP.CODE.NOTBLANK",max=16,maxMessage="GROUP.CODE.LENGTH")
	@FieldName("group_code")
	private String groupCode;

	/**
	 * 名称
	 */
	@ApiModelProperty(value="名称",name="groupName",required=true)
	@KerCheck(rule = KerMode.NOT_BLANK, ruleMessage = "GROUP.NAME.NOTBLANK",max=64,maxMessage="GROUP.NAME.LENGTH")
	@FieldName("group_name")
	private String groupName;

	/**
	 * 
	 */
	@ApiModelProperty(value="id",name="id",required=true)
	@Id("id")
	private String id;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value="创建时间",name="createDate",required=true)
	@FieldName("create_date")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createDate;
}