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

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

import com.ffii.core.entity.IdEntity;

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

  @NotNull
  @Column
  private Integer fileId;

  @NotNull
  @Column
  private byte[] bytes;

  public FileBlob() {
  }

  public FileBlob(Integer fileId, byte[] bytes) {
    this.fileId = fileId;
    this.bytes = bytes;
  }

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

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

  public byte[] getBytes() {
    return this.bytes;
  }

  public void setBytes(byte[] bytes) {
    this.bytes = bytes;
  }

}
