package com.tofly.feesapi.file.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.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "SYS_UPFILES", resultMap = "fileMap")
@KeySequence("SYS_UPFILES")
@ApiModel
public class File extends Model<File> {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一编码
     */
    @TableId(value = "file_bh", type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "唯一编码")
    private String fileBh;
    /**
     * 关联表名字
     */
    @ApiModelProperty(value = "关联表名字")
    private String tableName;
    /**
     * 关联表名对应关键字ID
     */
    @ApiModelProperty(value = "关联表名对应关键字ID")
    private String tableBh;
    /**
     * 文件序号
     */
    @ApiModelProperty(value = "文件序号")
    private String fileXh;
    /**
     * 文件注释
     */
    @ApiModelProperty(value = "文件注释")
    private String fileNote;
    /**
     * 文件原名称
     */
    @ApiModelProperty(value = "文件原名")
    private String fileOldFn;
    /**
     * 文件上传后名称
     */
    @ApiModelProperty(value = "文件新名")
    private String fileNewFn;
    /**
     * 文件大小
     */
    @ApiModelProperty(value = "文件大小")
    private long fileSize;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    // @TableField(value = "CREATED_TIME", fill = FieldFill.INSERT)
    private Date czsj;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    // @TableField(value = "CREATED_BY", fill = FieldFill.INSERT)
    private String czry;
    @ApiModelProperty(hidden = true)
    private String czryName;

    @ApiModelProperty(value = "用户编号")
    private String yhbh;

    @ApiModelProperty(value = "文件来源（0营销，1报装）")
    private String filely;
}
