package cokr.xit.ens.modules.common.ctgy.nicedici.domain;

import cokr.xit.ens.modules.common.domain.support.FieldError;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Getter @ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_nice_jid_mng", schema = "", catalog = "")
public class NiceJidMng {

	@Id
//	@GeneratedValue(strategy=GenerationType.AUTO)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "NiceJidMng_Generator")
	@TableGenerator(table = "ens_seq_generator", name = "NiceJidMng_Generator"
					,pkColumnName = "seq_name", pkColumnValue = "NiceJidMng_id"
					,initialValue = 0, allocationSize = 200)
	private Long jidMngId;


	@Column(name = "jid", nullable = true)
	private String jid;


	@Column(name = "regist_dt", nullable = true)
	@CreationTimestamp
	private LocalDateTime registDt;

	@Embedded
	private FieldError error;

}
