package com.eactive.eai.rms.data.entity.onl.bzwkdstcd;

import java.io.Serializable;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Comment;

import com.eactive.eai.data.converter.StringTrimConverter;
import com.eactive.eai.data.entity.AbstractEntity;
import com.eactive.eai.data.entity.onl.unifbwk.UnifBwkTp;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)

@Entity
@Table(name = "tseairm06")
@org.hibernate.annotations.Table(appliesTo = "tseairm06", comment = "사용자별 업무 권한")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class UserBusiness extends AbstractEntity<UserBusinessId> implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private UserBusinessId id;

	@Column(length = 1 , name = "savetype")
	@Comment("저장 권한")
	@Convert(converter = StringTrimConverter.class)
	private String saveType;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "eaibzwkdstcd", insertable = false, updatable = false)
	private UnifBwkTp unifBwkTp;

}