package com.example.demo.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Entity
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
@Table(name = "directory")
public class Idn
{
  @Id
  @Column(name = "dir_id", unique = true, updatable = false)
  private Integer id;

  @Column(name = "dir_parent_id")
  private Integer parentId;

  @Column(name = "dir_idn")
  public String name;

  @Column(name = "dir_type")
  private Integer type;

  @Column(name = "dir_user")
  private String creator;

  @Column(name = "dir_user_modified")
  private String lastModified;

  @Column(name = "dir_permissions")
  private String permissions;

  @Column(name = "dir_created")
  @Temporal(TemporalType.TIMESTAMP)
  private Date creationDate;

  @Column(name = "dir_modified")
  @Temporal(TemporalType.TIMESTAMP)
  private Date lastModificationDate;

  @Column(name = "dir_image")
  private byte[] image;

  @Column(name = "dir_note")
  private String note;

  @Column(name = "dir_created_version")
  private String createdInVersion;

  @Column(name = "dir_modified_version")
  private String modifiedInVersion;

  @Column(name = "dir_pdf_attachments")
  private byte[] pdfAttachments;

  @Column(name = "dir_idn_version")
  private String idnVersion;

  @Column(name = "dir_icon")
  private byte[] icon;

}
