package com.icomsys.main_vm.db.jpa.entity.oprManage;

import com.icomsys.main_vm.db.jpa.entity.system.id.TbBotTtsTagId;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicUpdate;

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

@Table(name = "TB_BOT_TTS_TAG")
@Entity
@Getter
@Setter
@NoArgsConstructor
@DynamicUpdate
@IdClass(TbBotTtsTagId.class)
public class TbBotTtsTag {

    @Id
    @Column(name = "TTS_PROD_CODE", nullable = false, length = 20)
    private String ttsProdCode;
    @Id
    @Column(name = "TAG_CODE", nullable = false, length = 20)
    private String tagCode;
    @Column(name = "TTS_START_TAG", nullable = true, length = 200)
    private String ttsStartTag;
    @Column(name = "TTS_END_TAG", nullable = true, length = 200)
    private String ttsEndTag;
    @Column(name = "REGIST_ID", nullable = false, length = 20)
    private String registId;
    @Column(name = "REGIST_DATE", nullable = false)
    private LocalDateTime registDate;
    @Column(name = "UPDATE_ID", nullable = false, length = 20)
    private String updateId;
    @Column(name = "UPDATE_DATE", nullable = false)
    private LocalDateTime updateDate;

    @Builder
    public TbBotTtsTag(String ttsProdCode, String tagCode, String ttsStartTag, String ttsEndTag, String registId, LocalDateTime registDate, String updateId, LocalDateTime updateDate) {
        this.ttsProdCode = ttsProdCode;
        this.tagCode = tagCode;
        this.ttsStartTag = ttsStartTag;
        this.ttsEndTag = ttsEndTag;
        this.registId = registId;
        this.registDate = registDate;
        this.updateId = updateId;
        this.updateDate = updateDate;
    }

}