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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.enums.BillStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 缴费账单表 Entity
 *
 * @author ZYJ
 * @date 2021-12-24 09:47:02
 */
@Data
@TableName("edu_bill")
public class EduBill implements Serializable {

    private static final long serialVersionUID = 1646679936020375609L;

    /**
     * 主键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(value = "缴费单标题")
    @TableField("bill_title")
    private String billTitle;

    /**
     * 缴费说明
     */
    @ApiModelProperty(value = "缴费说明")
    @TableField("bill_instruction")
    private String billInstruction;

    /**
     * 缴费单开始时间
     */
    @ApiModelProperty(value = "缴费单开始时间")
    @TableField("bill_start_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime billStartDate;

    /**
     * 缴费单结束时间
     */
    @ApiModelProperty(value = "缴费单结束时间")
    @TableField("bill_end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime billEndDate;

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

    /**
     * H5页面二维码地址
     */
    @ApiModelProperty(value = "H5页面二维码地址")
    @TableField("qr_code_address")
    private String qrCodeAddress;

    /**
     * {@link BillStatusEnum}
     */
    @ApiModelProperty("启用状态. 0:停用,1:启用")
    private Integer enableStatus;

    @ApiModelProperty("最后修改启用状态时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastEnableDate;
}