package com.dbnt.faisp.menuMgt.model;

import com.dbnt.faisp.config.BaseModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.List;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "menu_mgt")
public class MenuMgt extends BaseModel {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "menu_key")
  private Integer menuKey;
  @Column(name = "cat1_cd", nullable = false)
  private String cat1Cd;
  @Column(name = "cat2_cd", nullable = false)
  private String cat2Cd;
  @Column(name = "cat3_cd")
  private String cat3Cd;
  @Column(name = "menu_url", nullable = false)
  private String menuUrl;
  @Column(name = "approval_chk")
  private String approvalChk;

  @Transient
  private List<MenuMgt> childList;

  @Transient
  private Integer cat1RowspanCnt;
  @Transient
  private Integer cat2RowspanCnt;

}
