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

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 商品催缴通知策略表 Entity
 *
 * @author wjm
 * @date 2021-09-02 15:16:37
 */
@Data
@TableName("edu_product_notice")
public class EduProductNotice {

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

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @TableField("product_id")
    private Long productId;

    /**
     * 推送内容
     */
    @ApiModelProperty(value = "推送内容")
    @TableField("content")
    private String content;

    /**
     * send_type=0时推送起始日期
     */
    @ApiModelProperty(value = "send_type=0时推送起始日期")
    @TableField("first_put_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate firstPutDate;

    /**
     * send_type=1：距离到期天数
     */
    @ApiModelProperty(value = "send_type=1：距离到期天数")
    @TableField("put_num")
    private Integer putNum;

    /**
     * 0为首购通知，1为续费通知
     */
    @ApiModelProperty(value = "0为首购通知，1为续费通知")
    @TableField("notice_type")
    private Integer noticeType;

    /**
     * 上架开始推送：0为是，1为否
     */
    @ApiModelProperty(value = "上架开始推送：0为是，1为否")
    @TableField("send_type")
    private Integer sendType;

    /**
     * 当天的具体时刻
     */
    @ApiModelProperty(value = "当天的具体时刻")
    @TableField("send_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime sendTime;

    /**
     * 推送间隔天数
     */
    @ApiModelProperty(value = "推送间隔天数")
    @TableField("send_interval_date")
    private Integer sendIntervalDate;

    /**
     * 0未删除，1删除
     */
    @ApiModelProperty(value = "0未删除，1删除")
    @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;

}
