package com.dbnt.faisp.main.fpiMgt.sri.model;

import com.dbnt.faisp.config.FileInfo;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "fa_sri_file")
@IdClass(SriFile.SriFileId.class)
public class SriFile extends FileInfo {
  @Id
  @Column(name = "fa_sri_key")
  private Integer faSriKey;
  @Id
  @Column(name = "file_seq")
  private Integer fileSeq;
  @Column(name = "orig_nm")
  private String origNm;
  @Column(name = "conv_nm")
  private String convNm;
  @Column(name = "file_extn")
  private String fileExtn;
  @Column(name = "file_size")
  private String fileSize;
  @Column(name = "save_path")
  private String savePath;

  

  @Override
public String toString() {
	return "SriFile [faSriKey=" + faSriKey + ", fileSeq=" + fileSeq + ", origNm=" + origNm + ", convNm=" + convNm
			+ ", fileExtn=" + fileExtn + ", fileSize=" + fileSize + ", savePath=" + savePath + "]";
}



@Embeddable
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  public static class SriFileId implements Serializable {
    private Integer faSriKey;
    private Integer fileSeq;
  }

}
