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

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;
import lombok.ToString;

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

@Table(name = "tseairm24")
@Entity
@org.hibernate.annotations.Table(appliesTo = "tseairm24", comment = "모니터링 프라퍼티")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class MonitoringProperty extends AbstractEntity<MonitoringPropertyId> implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private MonitoringPropertyId id;

	@Column(nullable = false, length = 1000)
	@Comment("프라퍼티값")
	private String prpty2Val;

	@ManyToOne
	@JoinColumn(name = "prptyGroupName", insertable = false, updatable = false)
	@ToString.Exclude
	private MonitoringPropertyGroup monitoringPropertyGroup;
}
