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


import com.icomsys.main_vm.db.jpa.entity.system.id.TbBotCommonCodeId;
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_TALK_BOOKMARK")
//@Entity
@Getter
@Setter
@NoArgsConstructor
//@DynamicUpdate
public class TbTalkBookmark {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "SEQ", nullable = false)
    private Long seq;

//    고객통화로그:C
//    봇통화로그:B
    @Column(name = "LOG_TYPE", nullable = false, length = 1)
    private String logType;

    @Column(name = "TOKEN", nullable = false, length = 44)
    private String token;

    @Column(name = "TALK_SEQ", nullable = false)
    private int talkSeq;


    @Column(name = "TALK_TEXT", nullable = true, length = 1000)
    private String talkText;

//    STT_ERR : STT 오류
//    TTS_ERR : TTS 오류
//    INTENT_ERR : 인텐트 오류
//    ETC : 기타
    @Column(name = "BOOKMARK_ERR_CODE", nullable = true, length = 20)
    private String bookmarkErrCode;

//    COMPLETE : 조치 완료
//    DEL : 삭제
    @Column(name = "MEASURE_TYPE", nullable = true, length = 20)
    private String measureType;

    @Column(name = "REGIST_ID", nullable = true, length = 20)
    private String registId;
    @Column(name = "REGIST_DATE", nullable = true)
    private LocalDateTime registDate;
    @Column(name = "UPDATE_ID", nullable = true, length = 20)
    private String updateId;
    @Column(name = "UPDATE_DATE", nullable = true)
    private LocalDateTime updateDate;

    @Builder
    public TbTalkBookmark(Long seq, String logType, String token, int talkSeq, String talkText, String bookmarkErrCode, String measureType, String registId, LocalDateTime registDate, String updateId, LocalDateTime updateDate) {
        this.seq = seq;
        this.logType = logType;
        this.token = token;
        this.talkSeq = talkSeq;
        this.talkText = talkText;
        this.bookmarkErrCode = bookmarkErrCode;
        this.measureType = measureType;
        this.registId = registId;
        this.registDate = registDate;
        this.updateId = updateId;
        this.updateDate = updateDate;
    }
}
