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

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "SEQ", nullable = false)
    private Long seq;
    @Column(name = "NODE_NAME", nullable = true, length = 50)
    private String nodeName;
    @Column(name = "USE_YN", nullable = false, length = 1)
    private String useYn;
    @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;
    @Column(name = "OPR_MNG_CODE", nullable = false, length = 50)
    private String oprMngCode;

    @Builder
    public TbApiNode(Long seq, String nodeName, String useYn, String registId, LocalDateTime registDate, String updateId, LocalDateTime updateDate, String oprMngCode) {
        this.seq = seq;
        this.nodeName = nodeName;
        this.useYn = useYn;
        this.registId = registId;
        this.registDate = registDate;
        this.updateId = updateId;
        this.updateDate = updateDate;
        this.oprMngCode = oprMngCode;
    }
}
