package com.eactive.eai.rms.data.entity.man.role;

import java.io.Serializable;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
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.entity.AbstractEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

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

@Entity
@Table(name = "tseairm03")
@org.hibernate.annotations.Table(appliesTo = "tseairm03", comment = "역할별 메뉴 권한")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class RoleMenuAuth extends AbstractEntity<RoleMenuAuthId> implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private RoleMenuAuthId id;

	@Column(nullable = false, length = 1)
	@Comment("권한")
	private String auth;

	@ManyToOne
	@JoinColumn(name = "roleId", updatable = false, insertable = false)
	private Role role;
}
