package com.xkrs.model.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * file_document 表实体类
 * @author tajochen
 */
@Entity
@Table(name="file_document")
public class FileDocumentEntity implements Serializable {

    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "file_document_seq_gen", sequenceName = "file_document_seq",allocationSize = 1)
    private Integer id;

    @Column(length = 64, nullable = false, columnDefinition = "varchar(64)")
    private String name;

    @Column( columnDefinition = "int4")
    private Integer category;

    @Column(length = 192 , columnDefinition = "varchar(192)")
    private String filePath;

    @Column( length = 128, columnDefinition = "varchar(128)")
    private String size;

    @Column( length = 192, columnDefinition = "varchar(192)")
    private String md5;

    @Column( length = 128, columnDefinition = "varchar(128)")
    private String memo;

    @Column( length = 16, columnDefinition = "varchar(16)")
    private String addUserName;

    private LocalDateTime addTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getFilePath() {
        return filePath;
    }

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

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getAddUserName() {
        return addUserName;
    }

    public void setAddUserName(String addUserName) {
        this.addUserName = addUserName;
    }

    public LocalDateTime getAddTime() {
        return addTime;
    }

    public void setAddTime(LocalDateTime addTime) {
        this.addTime = addTime;
    }

    @Override
    public String toString() {
        return "FileDocumentEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", category=" + category +
                ", filePath='" + filePath + '\'' +
                ", size='" + size + '\'' +
                ", md5='" + md5 + '\'' +
                ", memo='" + memo + '\'' +
                ", addUserName='" + addUserName + '\'' +
                ", addTime=" + addTime +
                '}';
    }
}
