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

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

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 人脸组-策略-特殊日期Entity
 *
 * @author ZYJ
 * @date 2022-12-26 13:57:32
 */
@Data
@TableName("edu_face_group_strategy_special_date")
public class EduFaceGroupStrategySpecialDate implements Serializable {

    private static final long serialVersionUID = 8045410029465939747L;

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

    @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;

    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    @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;

    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 删除标识，0-未删除，1-已删除
     */
    @ApiModelProperty(value = "删除标识，0-未删除，1-已删除")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 人脸组id
     */
    @ApiModelProperty(value = "人脸组id")
    @TableField("face_group_id")
    private Long faceGroupId;

    /**
     * 人脸组-策略id
     */
    @ApiModelProperty(value = "人脸组-策略id")
    @TableField("face_group_strategy_id")
    private Long faceGroupStrategyId;

    /**
     * 特殊日期开始日期
     */
    @ApiModelProperty(value = "特殊日期开始日期")
    @TableField("special_start_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate specialStartDate;

    /**
     * 特殊日期结束日期
     */
    @ApiModelProperty(value = "特殊日期结束日期")
    @TableField("special_end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate specialEndDate;

    /**
     * 特殊时间集合
     */
    private transient List<EduFaceGroupStrategySpecialTime> specialTimeList;
}