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

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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel("规则实体")
public class EduAttendanceRule {

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

    @TableField(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(fill = FieldFill.INSERT)
    private Long createId;

    private String createName;

    @ApiModelProperty("规则名称")
    private String name;

    @ApiModelProperty("规则类型，0-上学，1-归寝")
    private Integer type;


    @ApiModelProperty("状态，0-运行中，1-停止，2-失效，3-待运行")
    private Integer status;

    private Long schoolId;

    @ApiModelProperty("表示住宿生是否参与上学打卡，1=是，0=否")
    private Integer dormitoryFlag;


    @ApiModelProperty("运行时间")
    private transient List<EduAttendanceRuleDate> dateList;

    @ApiModelProperty("考勤时间")
    private transient List<EduAttendanceRuleTime> timeList;

    @ApiModelProperty("关联部门 适用对象")
    private transient List<EduAttendanceRuleDept> deptList;

    @ApiModelProperty("关联设备 考勤设备")
    private transient List<EduAttendanceRuleDevice> deviceList;


}
