package com.yy.cloud.core.usermgmt.data.domain;

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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import lombok.Data;


/**
 * 部门
 * @author luckey
 *
 */
@Entity
@Table(name = "YY_ORGANIZATION")
@NamedQuery(name = "YYOrganization.findAll", query = "SELECT f FROM YYOrganization f")
@DynamicInsert
@DynamicUpdate
@Data
public class YYOrganization implements Serializable {

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

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid2")
	@Column(name = "ID", unique = true, nullable = false)
	private String id;

	@Column(name = "NAME")
	private String name;

	@Column(name = "STATUS")
	private Byte status;

	@Column(name = "AREA_ID")
	private String areaId;

	@Column(name = "LEADER_ID")
	private String leaderId;

	@Column(name = "DESCRIPTION")
	private String description;

	@Column(name = "TENANT_ID")
	private String tenantId;

	@Column(name = "PARENT_ID")
	private String parentId;

	@Column(name = "GRADE")
	private Byte grade;

	@Column(name = "CREATE_BY")
	private String createBy;

	@Column(name = "CREATE_DATE", updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createDate;

	@Column(name = "UPDATE_DATE", updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date updateDate;

	@Column(name = "CODE")
	private String code;

	@Column(name = "TYPE")
	private Byte type;


	

}
@@ -1218,245 +1218,9 @@
 s;%0D%0A
-%0D%0A%09@Column(name = %22AREA_ID%22)%0D%0A%09private String areaId;%0D%0A%0D%0A%09@Column(name = %22LEADER_ID%22)%0D%0A%09private String leaderId;%0D%0A%0D%0A%09@Column(name = %22DESCRIPTION%22)%0D%0A%09private String description;%0D%0A%0D%0A%09@Column(name = %22TENANT_ID%22)%0D%0A%09private String tenantId;%0D%0A
+%09
 %0D%0A%09@
@@ -1278,58 +1278,9 @@
 d;%0D%0A
-%0D%0A%09@Column(name = %22GRADE%22)%0D%0A%09private Byte grade;%0D%0A
+%09
 %0D%0A%09@
@@ -1333,16 +1333,83 @@
 eateBy;%0D
+%0A%09%0D%0A%0D%0A%09@Column(name = %22DESCRIPTION%22)%0D%0A%09private String description;%0D
 %0A%0D%0A%09@Col
@@ -1639,102 +1639,9 @@
 %0D%0A%0D%0A
+
 %09
-@Column(name = %22CODE%22)%0D%0A%09private String code;%0D%0A%0D%0A%09@Column(name = %22TYPE%22)%0D%0A%09private Byte type;
 %0D%0A%0D%0A

remove unuser field