package com.dbnt.faisp.main.fipTarget.model;

import com.dbnt.faisp.config.BaseModel;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

import java.io.Serializable;


@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@IdClass(PartInfoFile.PartInfoFileId.class)
@Table(name = "part_info_file")
public class PartInfoFile extends BaseModel implements Serializable{
  @Id
  @Column(name = "file_seq")
  private Integer fileSeq;
  @Id
  @Column(name = "pi_seq")
  private Integer piSeq;
  @Id
  @Column(name = "version_no")
  private Integer versionNo;
  @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 = "file_path")
  private String filePath;
  

  
@Override
public String toString() {
	return "PartInfoFile [fileSeq=" + fileSeq + ", piSeq=" + piSeq + ", versionNo=" + versionNo + ", origNm=" + origNm
			+ ", convNm=" + convNm + ", fileExtn=" + fileExtn + ", fileSize=" + fileSize + ", filePath=" + filePath
			+ "]";
}



@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class PartInfoFileId implements Serializable {
  private Integer fileSeq; 
  private Integer piSeq; 
  private Integer versionNo;
}
















}
