package com.ssj.bean.common.files.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.ssj.bean.common.framework.core.domain.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Entity
@Table(name = "sys_file_info")
public class FileInfo extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2992468966743113586L;
    /**
     * 图片加密code
     */
	private String fileCode;
    /**
     * 图片相对路径
     */
	private String filePath;
    /**
     * 域名下路径
     */
	private String fileThumPath;
    /**
     * 文件路径
     */
	private String fileName;
    /**
     * 文件后缀
     */
	private String fileExt;
    /**
     * 文件大小
     */
	private String fileSize;

	private Date createdDate;// 创建时间

	private String name;
	
	private String userId;
	
	private int fileWidth;//图片宽
	
	private int fileHeight;//图片高


	@Column(name = "file_code")
	public String getFileCode() {
		return fileCode;
	}

	public void setFileCode(String fileCode) {
		this.fileCode = fileCode;
	}

	@Column(name = "file_path")
	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	@Column(name = "file_thum_path")
	public String getFileThumPath() {
		return fileThumPath;
	}

	public void setFileThumPath(String fileThumPath) {
		this.fileThumPath = fileThumPath;
	}

	@Column(name = "file_name")
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "file_ext")
	public String getFileExt() {
		return fileExt;
	}

	public void setFileExt(String fileExt) {
		this.fileExt = fileExt;
	}

	@Column(name = "file_size")
	public String getFileSize() {
		return fileSize;
	}

	public void setFileSize(String fileSize) {
		this.fileSize = fileSize;
	}

	@Column(name = "created_date", updatable = false)
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@Transient
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	 @JSONField(serialize=false)
	 @Column(name = "user_id")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	 @Column(name = "file_width")
	public int getFileWidth() {
		return fileWidth;
	}

	public void setFileWidth(int fileWidth) {
		this.fileWidth = fileWidth;
	}

	@Column(name = "file_height")
	public int getFileHeight() {
		return fileHeight;
	}

	public void setFileHeight(int fileHeight) {
		this.fileHeight = fileHeight;
	}

}