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(VulnFile.VulnFileId.class)
@Table(name = "vuln_file")
public class VulnFile extends BaseModel implements Serializable{
  @Id
  @Column(name = "file_seq")
  private Integer fileSeq;
  @Id
  @Column(name = "vuln_key")
  private Integer vulnKey;
  @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 "VulnFile [fileSeq=" + fileSeq + ", vulnKey=" + vulnKey + ", origNm=" + origNm + ", convNm=" + convNm
			+ ", fileExtn=" + fileExtn + ", fileSize=" + fileSize + ", filePath=" + filePath + "]";
}


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
















}
