package com.tofly.flow.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 公共文件表： TF_YWPN_FILE_W
 *
 * @author admin
 * @date Wed Mar 10 00:00:00 CST 2021
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_YWPN_FILE_W", resultMap = "fileMap")
@KeySequence("TF_YWPN_FILE_W")
@ApiModel
public class IFile extends Model<IFile> {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一编码
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "唯一编码")
    private Long id;
    /**
     * 关联表名字
     */
    @ApiModelProperty(value = "关联表名字")
    private String tableName;
    /**
     * 关联表名对应关键字ID
     */
    @ApiModelProperty(value = "关联表名对应关键字ID")
    private Long tableId;
    /**
     * 文件路径
     */
    @ApiModelProperty(value = "文件路径")
    private String filePath;
    /**
     * 标志；0：正常；1：删除
     */
    @ApiModelProperty(value = "标志；0：正常；1：删除")
    private String statusFlag;
    /**
     * 文件原名称
     */
    @ApiModelProperty(value = "文件原名称")
    private String fileName;
    /**
     * 文件上传后名称
     */
    @ApiModelProperty(value = "文件上传后名称")
    private String otherName;
    /**
     * 文件后缀
     */
    @ApiModelProperty(value = "文件后缀")
    private String fileFormat;
    /**
     * 文件大小
     */
    @ApiModelProperty(value = "文件大小")
    private String fileSize;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Long createUser;
    @ApiModelProperty(hidden = true)
    private String createUserName;
}
