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

import cokr.xit.ens.modules.common.code.PostSeCd;
import cokr.xit.ens.modules.common.domain.SendMastBaseEntity;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.TryStatCd;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;

@Entity
//@Data
@Getter @ToString
@SuperBuilder
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_intgrn_snd_mast", schema = "", catalog = "")
public class IntgrnSendMast extends SendMastBaseEntity {
//public class IntgrnSendMast {

	@Id
//	@GeneratedValue(strategy=GenerationType.AUTO)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "IntgrnSendMast_Generator")
	@TableGenerator(table = "ens_seq_generator", name = "IntgrnSendMast_Generator"
					,pkColumnName = "seq_name", pkColumnValue = "IntgrnSendMast_id"
					,initialValue = 0, allocationSize = 50)
	
	private Long intSendMastId;

	@Column(name = "try1", nullable = false)
	
	@Enumerated(EnumType.STRING)
	private PostSeCd try1;
	@Column(name = "try2", nullable = true)
	
	@Enumerated(EnumType.STRING)
	private PostSeCd try2;
	@Column(name = "try3", nullable = true)
	
	@Enumerated(EnumType.STRING)
	private PostSeCd try3;
	@Column(name = "try_cnt", nullable = false)
	
	private Integer tryCnt;
	@Setter
	@Column(name = "try_seq", nullable = false)
	
	private Integer trySeq;
	@Setter
	@Enumerated(EnumType.STRING)
	@Column(name = "try_stat_cd", nullable = false)
	
	private TryStatCd tryStatCd;

}
