package com.yunyan.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yunyan.common.annotation.Excel;

import com.yunyan.common.core.domain.BaseEntity;
import com.yunyan.common.core.domain.BaseEntityVo;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;


/**
 * 模板管理对象 tb_fill_template
 *
 * @author yunyan
 * @date 2023-07-27
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "tb_fill_template")
public class FillTemplate extends BaseEntityVo
{
    private static final long serialVersionUID = 1L;

    /** ID主键 */
    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "ID主键")
    private Long id;

    /** 类型: 1-决算, 2-预算, 默认1 */
    @ApiModelProperty(value = "类型: 1-决算, 2-预算, 默认1")
    private Integer type;

    /** 用户ID */
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    /** 部门id/单位 */
    @ApiModelProperty(value = "部门id/单位")
    private Long deptId;

    /** 年份(如2023) */
    @ApiModelProperty(value = "年份(如2023)")
    private String year;

    /** 模板保存的url */
    @ApiModelProperty(value = "模板保存的url")
    private String templateUrl;

    /** 状态: 0-默认 */
    @ApiModelProperty(value = "状态: 0-默认")
    private Integer status;

    /** 创建时间/填报时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间/填报时间")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /** 创建者 */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /** 更新者 */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /** 逻辑删除(1-删除，0-未删) */
            //逻辑删除（就是在delete字段做标记，不是真正意义上的删除）
    @JsonIgnore
    @TableLogic(value = "0",delval = "1")
    @TableField(select = false)
    @ApiModelProperty(value = "逻辑删除(1-删除，0-未删)")
    private Integer deleted;



}
