package com.hssx.pcbms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴涛涛
 * @since 2019-11-05
 */
public class InstitutionFile extends Model<InstitutionFile> {

    private static final long serialVersionUID=1L;

    /**
     * 制度文件表的主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 制度表外键 标识是哪项制度的文件
     */
    @TableField("institution_id")
    private Integer institutionId;

    /**
     * 制度文件的名字
     */
    @TableField("name")
    private String name;

    /**
     * 制度文件保存的地址
     */
    @TableField("url")
    private String url;

    /**
     * 制度文件保存的日期
     */
    @TableField("indate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime indate;


    public Integer getId() {
        return id;
    }

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

    public Integer getInstitutionId() {
        return institutionId;
    }

    public void setInstitutionId(Integer institutionId) {
        this.institutionId = institutionId;
    }

    public String getName() {
        return name;
    }

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

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public LocalDateTime getIndate() {
        return indate;
    }

    public void setIndate(LocalDateTime indate) {
        this.indate = indate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "InstitutionFile{" +
        "id=" + id +
        ", institutionId=" + institutionId +
        ", name=" + name +
        ", url=" + url +
        ", indate=" + indate +
        "}";
    }
}
