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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.entity.camera.enums.ThemeTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 摄像头开放策略主表(EduCameraStrategyTheme)实体类
 *
 * @author makejava
 * @since 2022-03-14 09:19:30
 */
@Data
public class EduCameraStrategyTheme {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 学校id
     */
    private Long schoolId;
    /**
     * 主题名称
     */
    private String theme;
    /**
     * 主题简介
     */
    private String themeDescribe;
    /**
     * 开放状态：0未开放，1开放
     */
    private Integer openStatus;
    /**
     * 0未删除，1已删除
     */
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;
    /**
     * 创建时间
     */
    @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;
    /**
     * 创建人id
     */
    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")
    @ApiModelProperty("'更新时间'")
    private LocalDateTime updateDate;
    /**
     * 更新人id
     */
    private Long updateId;

    /**
     * {@link ThemeTypeEnum}
     */
    @ApiModelProperty("主题类型.0:固定,不可删除(此类型只有一条数据, 并且不能选择设备);1:不固定,可删除")
    private Integer themeType;

    @TableField(exist = false)
    private List<EduCameraStrategyOpenClass> openClassList;
    @TableField(exist = false)
    private List<EduCamera> openAreaGroupList;
    @TableField(exist = false)
    private List<EduCameraStrategyOpenTime> openTimeList;

}

