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

import java.util.Date;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * 考勤-打卡时段 Entity
 *
 * @date 2023-08-09 11:37:25
 */
@Data
@TableName("attendance_rule_time")
public class AttendanceRuleTime {

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

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

    /**
     *
     */
    @ApiModelProperty(value = "")
    @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;

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

    /**
     * 考勤规则id
     */
    @ApiModelProperty(value = "考勤规则id")
    @TableField("rule_id")
    private Long ruleId;

    /**
     * 上班时间
     */
    @ApiModelProperty(value = "上班时间")
    @TableField("start_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime startTime;

    /**
     * 下班时间
     */
    @ApiModelProperty(value = "下班时间")
    @TableField("end_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime endTime;

    /**
     * 最晚时间-针对宿舍考勤晚归情况
     */
    @ApiModelProperty(value = "最晚时间-针对宿舍考勤晚归情况")
    @TableField("last_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime lastTime;


    /**
     * 结束时间是否为次日，1=是，0=否
     */
    @ApiModelProperty(value = "结束时间是否为次日，1=是，0=否")
    @TableField("end_next_day")
    private Integer endNextDay;


    /**
     * 上班打卡时段启用状态. 0-不启用, 1-启用
     */
    @ApiModelProperty(value = "上班打卡时段启用状态. 0-不启用, 1-启用")
    @TableField("start_effective_status")
    private Integer startEffectiveStatus;

    /**
     * 上班打卡时段开始时间
     */
    @ApiModelProperty(value = "上班打卡时段开始时间")
    @TableField("start_effective_start_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime startEffectiveStartTime;

    /**
     * 上班打卡时段结束时间
     */
    @ApiModelProperty(value = "上班打卡时段结束时间")
    @TableField("start_effective_end_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime startEffectiveEndTime;

    /**
     * 下班打卡时段启用状态. 0-不启用, 1-启用
     */
    @ApiModelProperty(value = "下班打卡时段启用状态. 0-不启用, 1-启用")
    @TableField("end_effective_status")
    private Integer endEffectiveStatus;

    /**
     * 下班打卡时段开始时间
     */
    @ApiModelProperty(value = "下班打卡时段开始时间")
    @TableField("end_effective_start_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime endEffectiveStartTime;

    /**
     * 下班打卡时段结束时间
     */
    @ApiModelProperty(value = "下班打卡时段结束时间")
    @TableField("end_effective_end_time")
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private LocalTime endEffectiveEndTime;

}