/*******************************************************************************
 * Copyright 2019 2Fi Business Solutions Ltd.
 *
 *
 *
 * This code is copyrighted. Under no circumstances should any party, people,
 * or organization should redistribute any portions of this code in any form,
 * either verbatim or through electronic media, to any third parties, unless
 * under explicit written permission by 2Fi Business Solutions Ltd.
 ******************************************************************************/
package com.ffii.tbms.file;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.ffii.core.BaseEntity;

@Entity
@Table(name = "files")
public class File extends BaseEntity<Integer> {

	private static final long serialVersionUID = -8832818363002693551L;

	public static final int ONE_KILOBYTE = 1024;
	public static final int ONE_MEGABYTE = 1048576;

	@Column(columnDefinition = "varchar(20)")
	private String systemType;

	@Column(columnDefinition = "varchar(16)", nullable = false)
	private String skey;

	@Column(columnDefinition = "varchar(255)")
	private String description;

	@Column(columnDefinition = "varchar(255)")
	private String filename;

	@Column(columnDefinition = "varchar(255)")
	private String mimetype;

	@Column(columnDefinition = "int")
	private long filesize;

	@Column(columnDefinition = "int")
	private int imageHeight;
	@Column(columnDefinition = "int")
	private int imageWidth;

	/** Default constructor */
	public File() {

	}

	/*
	 * getters and setters
	 */

	public String getSystemType() {
		return systemType;
	}

	public void setSystemType(String systemType) {
		this.systemType = systemType;
	}

	public String getSkey() {
		return skey;
	}

	public void setSkey(String skey) {
		this.skey = skey;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String getMimetype() {
		return mimetype;
	}

	public void setMimetype(String mimetype) {
		this.mimetype = mimetype;
	}

	public long getFilesize() {
		return filesize;
	}

	public void setFilesize(long filesize) {
		this.filesize = filesize;
	}

	public int getImageHeight() {
		return imageHeight;
	}

	public void setImageHeight(int imageHeight) {
		this.imageHeight = imageHeight;
	}

	public int getImageWidth() {
		return imageWidth;
	}

	public void setImageWidth(int imageWidth) {
		this.imageWidth = imageWidth;
	}

}
