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.time.LocalDateTime;
import java.util.List;

/**
 * 人脸组-策略Entity
 *
 * @author ZYJ
 * @date 2022-12-12 11:04:39
 */
@Data
@TableName("edu_face_group_strategy")
public class EduFaceGroupStrategy {

    @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 = "创建人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;

    @ApiModelProperty(value = "最后修改人id")
    @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;

    /**
     * 策略生效时间
     */
    @ApiModelProperty(value = "策略生效时间")
    @TableField("strategy_start_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime strategyStartDate;

    /**
     * 策略失效时间
     */
    @ApiModelProperty(value = "策略失效时间")
    @TableField("strategy_end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime strategyEndDate;

    /**
     * 星期一通行计划id
     */
    @ApiModelProperty(value = "星期一通行计划id")
    @TableField("monday_plan_id")
    private Long mondayPlanId;

    /**
     * 星期二通行计划id
     */
    @ApiModelProperty(value = "星期二通行计划id")
    @TableField("tuesday_plan_id")
    private Long tuesdayPlanId;

    /**
     * 星期三通行计划id
     */
    @ApiModelProperty(value = "星期三通行计划id")
    @TableField("wednesday_plan_id")
    private Long wednesdayPlanId;

    /**
     * 星期四通行计划id
     */
    @ApiModelProperty(value = "星期四通行计划id")
    @TableField("thursday_plan_id")
    private Long thursdayPlanId;

    /**
     * 星期五通行计划id
     */
    @ApiModelProperty(value = "星期五通行计划id")
    @TableField("friday_plan_id")
    private Long fridayPlanId;

    /**
     * 星期六通行计划id
     */
    @ApiModelProperty(value = "星期六通行计划id")
    @TableField("saturday_plan_id")
    private Long saturdayPlanId;

    /**
     * 星期天通行计划id
     */
    @ApiModelProperty(value = "星期天通行计划id")
    @TableField("sunday_plan_id")
    private Long sundayPlanId;

    private transient List<EduFaceGroupStrategyPlanTime> mondayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> tuesdayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> wednesdayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> thursdayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> fridayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> saturdayTimeList;
    private transient List<EduFaceGroupStrategyPlanTime> sundayTimeList;

    /**
     * 特殊日期集合
     */
    private transient List<EduFaceGroupStrategySpecialDate> specialDateList;

    /**
     * 关联的设备组信息
     */
    private transient List<EduFaceGroupDevice> groupDeviceList;

    /**
     * 关联的人员信息
     */
    private transient List<EduFaceGroupUser> groupUserList;
}