package com.tofly.filling.entity;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;

import java.util.*;

import org.springframework.web.multipart.MultipartFile;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

import lombok.EqualsAndHashCode;
import com.haiqiu.tools.excel.annotation.Excel;

/**
 * 填报记录(Filling)表实体类
 *
 * @author HaiQiu
 * @since 2023-01-10 11:39:02
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "TF_FILLING", resultMap = "FillingMap")
@ApiModel(value = "Filling对象", description = "填报记录")
public class Filling extends Model<Filling> {

    private static final long serialVersionUID = 796553134664338242L;

    /**
     * ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "ID")
    @ApiModelProperty(value = "ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 类型：0值班，1用车，也可以字典获取
     */
    @Excel(name = "类型：0值班，1用车，也可以字典获取")
    @ApiModelProperty(value = "类型：0值班，1用车，也可以字典获取")
    private String category;
    /**
     * 填报名称标题
     */
    @Excel(name = "填报名称标题")
    @ApiModelProperty(value = "填报名称标题")
    private String name;
    /**
     * 填报内容
     */
    @Excel(name = "填报内容")
    @ApiModelProperty(value = "填报内容")
    private String content;
    /**
     * 排序
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "排序")
    @ApiModelProperty(value = "排序")
    private Long sort;
    /**
     * 逻辑删除，1删除，0不删除
     */
    @Excel(name = "逻辑删除，1删除，0不删除")
    @TableLogic
    @ApiModelProperty(value = "逻辑删除，1删除，0不删除")
    private Boolean deleted;
    /**
     * 创建时间
     */
    @Excel(name = "值班时间")
    @ApiModelProperty(value = "值班时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 创建人
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "创建人")
    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    @TableField(exist = false)
    @ApiModelProperty(value = "创建人", hidden = true)
    @Excel(name = "创建人")
    private String createUserName;
    /**
     * 更新时间
     */
    @Excel(name = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 修改人
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "修改人")
    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @TableField(exist = false)
    @ApiModelProperty(value = "修改人", hidden = true)
    @Excel(name = "修改人")
    private String updateUserName;

    /**
     * 公司或单位
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "公司或单位")
    @ApiModelProperty(value = "公司或单位")
    private Long companyUnit;
    @TableField(exist = false)
    @ApiModelProperty(value = "公司或单位", hidden = true)
    @Excel(name = "公司或单位")
    private String companyUnitName;

    /**
     * 值班日期
     */
    @Excel(name = "值班日期")
    @ApiModelProperty(value = "值班时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dutyDate;
}

