
package com.ffii.core.common.file.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.ffii.core.entity.IdEntity;

/** @author Fung */
@Entity
@Table(name = "file_ref")
public class FileRef extends IdEntity<Integer> {

  @NotBlank
  @Column
  private String refType;

  @NotNull
  @Column
  private Integer refId;

  @Column
  private String refCode;

  @NotNull
  @Column
  private Integer fileId;

  public FileRef() {
  }

  public FileRef(String refType, Integer refId, String refCode, Integer fileId) {
    this.refType = refType;
    this.refId = refId;
    this.refCode = refCode;
    this.fileId = fileId;
  }

  public String getRefType() {
    return this.refType;
  }

  public void setRefType(String refType) {
    this.refType = refType;
  }

  public Integer getRefId() {
    return this.refId;
  }

  public void setRefId(Integer refId) {
    this.refId = refId;
  }

  public String getRefCode() {
    return this.refCode;
  }

  public void setRefCode(String refCode) {
    this.refCode = refCode;
  }

  public Integer getFileId() {
    return this.fileId;
  }

  public void setFileId(Integer fileId) {
    this.fileId = fileId;
  }

}
