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

import com.icomsys.main_vm.db.jpa.entity.monitoring.id.TbCallBotLogId;
import com.icomsys.main_vm.db.jpa.entity.monitoring.id.TbCallRecId;
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_CALL_BOT_LOG")
@Entity
@Getter
@Setter
@NoArgsConstructor
@DynamicUpdate
@IdClass(TbCallBotLogId.class)
public class TbCallBotLog {

    @Id
    @Column(name = "TOKEN", nullable = false)
    private String token;
    @Id
    @Column(name = "TALK_SEQ", nullable = false)
    private int talkSeq;
    @Id
    @Column(name = "MENT_SPEECH_NO", nullable = false)
    private int mentSpeechNo;
    @Column(name = "BOT_TEXT", nullable = false)
    private String botText;
    @Column(name = "ITEM_NAME", nullable = false)
    private String itemName;
    @Column(name = "RCP_INFO", nullable = false)
    private String rcpInfo;
    @Column(name = "REGIST_DATE", nullable = false)
    private LocalDateTime registDate;

    @Builder
    public TbCallBotLog(String token, int talkSeq, int mentSpeechNo, String botText, String itemName, String rcpInfo, LocalDateTime registDate) {
        this.token = token;
        this.talkSeq = talkSeq;
        this.mentSpeechNo = mentSpeechNo;
        this.botText = botText;
        this.itemName = itemName;
        this.rcpInfo = rcpInfo;
        this.registDate = registDate;
    }
}
