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

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_SCENARIO_RELEASE")
@Entity
@Getter
@Setter
@NoArgsConstructor
@DynamicUpdate
public class TbScenarioRelease {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "SEQ", nullable = false)
    private Long seq;
    @Column(name = "MASTER_SEQ", nullable = false)
    private Long masterSeq;
    @Column(name = "RELEASE_YN", nullable = false)
    private String releaseYn;
    @Column(name = "VERSION", nullable = false)
    private int version;
    @Column(name = "REGIST_ID", nullable = false, length = 20)
    private String registId;
    @Column(name = "REGIST_DATE", nullable = false)
    private LocalDateTime registDate;
    @Column(name = "INTENT_SEQ", nullable = false)
    private Long intentSeq;

    @Builder
    public TbScenarioRelease(Long seq, Long masterSeq, String releaseYn, int version, String registId, LocalDateTime registDate, Long intentSeq) {
        this.seq = seq;
        this.masterSeq = masterSeq;
        this.releaseYn = releaseYn;
        this.version = version;
        this.registId = registId;
        this.registDate = registDate;
        this.intentSeq = intentSeq;
    }
}