package com.yida.data.common.core.entity.applyForm;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 申请表单填报用户信息表
 *
 * @author ZYJ
 * @date 2023/11/22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("core_apply_form_fill_user")
public class CoreApplyFormFillUser implements Serializable {

    private static final long serialVersionUID = -607929134997876061L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 是否删除，1删除0未删除，默认0
     */
    @ApiModelProperty(value = "是否删除，1删除0未删除，默认0")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 最后修改时间
     */
    @ApiModelProperty(value = "最后修改时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 最后修改人id
     */
    @ApiModelProperty(value = "最后修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    @ApiModelProperty("学校id")
    private Long schoolId;

    /**
     * 表单id
     */
    @ApiModelProperty(value = "表单id")
    @TableField("apply_form_id")
    private Long applyFormId;

    @ApiModelProperty(value = "表单对应填报数据id")
    @TableField("apply_form_data_id")
    private Long applyFormDataId;

    @ApiModelProperty(value = "填报用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "填报用户名称")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty("审核状态:默认0未审核，1已通过，2已拒绝，3审核中")
    private Integer examineStatus;

    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime auditTime;

    @ApiModelProperty(value = "审核不通过原因")
    @TableField("refuse_reason")
    private String refuseReason;

    @ApiModelProperty("当前状态. 0-待审核审核，1-已通过，2-已拒绝")
    private transient Integer currentUserStatus;
}
