/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.attence.ruletime.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springblade.core.mp.base.BaseEntity;

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

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-04-12
 */
@Data
@TableName("attence_rule_time")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RuleTime对象", description = "RuleTime对象")
public class RuleTime extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 关联的打卡规则id
	 */
	@ApiModelProperty(value = "关联的打卡规则id")
	private Long ruleId;
	/**
	 * 工作日。若为固定时间上下班或自由上下班，则1到6分别表示星期一到星期六，0表示星期日
	 */
	@ApiModelProperty(value = "工作日。若为固定时间上下班或自由上下班，则1到6分别表示星期一到星期六，0表示星期日")
	private String workDays;
	/**
	 * 上班时间
	 */
	@JsonFormat(pattern = "HH:mm")
	@ApiModelProperty(value = "上班时间")
	private LocalTime workTime;
	/**
	 * 下班时间
	 */
	@JsonFormat(pattern = "HH:mm")
	@ApiModelProperty(value = "下班时间")
	private LocalTime offWorkTime;
	/**
	 * 上班提醒时间
	 */
	@ApiModelProperty(value = "上班提醒时间")
	private Integer remindWorkTime;
	/**
	 * 下班提醒时间
	 */
	@ApiModelProperty(value = "下班提醒时间")
	private Integer remindOffWorkTime;
	/**
	 * 是否开启休息时间 ：0-不开启 1-开启   （休息时间内不计算工作时长）
	 */
	@ApiModelProperty(value = "是否开启休息时间 ：0-不开启 1-开启   （休息时间内不计算工作时长）")
	private Integer allowRest;
	/**
	 * 休息开始时间
	 */
	@JsonFormat(pattern = "HH:mm")
	@ApiModelProperty(value = "休息开始时间")
	private LocalTime restBeginTime;
	/**
	 * 休息结束时间
	 */
	@JsonFormat(pattern = "HH:mm")
	@ApiModelProperty(value = "休息结束时间")
	private LocalTime restEndTime;
	/**
	 * 是否允许弹性时间  0-否 1-是
	 */
	@ApiModelProperty(value = "是否允许弹性时间  0-否 1-是")
	private Integer allowFlex;
	/**
	 * 允许迟到时间
	 */
	@ApiModelProperty(value = "允许迟到时间")
	private Integer flexOnDutyTime;
	/**
	 * 允许早退时间
	 */
	@ApiModelProperty(value = "允许早退时间")
	private Integer flexOffDutyTime;


}
