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 java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴涛涛
 * @since 2019-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaskFile extends Model<TaskFile> {

    private static final long serialVersionUID=1L;

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

    /**
     * 任务id
     */
    @TableField("task_id")
    private String taskId;

    /**
     * 文件的名字
     */
    @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;

    /**
     * 上传人id
     */
    @TableField("uploader_id")
    private Integer uploaderId;

    /**
     * 上传人姓名
     */
    @TableField("uploader")
    private String uploader;


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

}
