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

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;

/**
 * @author ccl
 */
@Data
public class EduCamera {
    @ApiModelProperty("")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("'学校id'")
    private Long schoolId;
    @ApiModelProperty("'设备编号'")
    private String cameraCode;
    @ApiModelProperty("'转码地址'")
    private String transUrl;
    @ApiModelProperty("'开放状态：0否，1是'")
    private Integer openStatus;
    @ApiModelProperty("'运行状态：0在线，1离线'")
    private Integer runStatus;
    @ApiModelProperty("'转码状态：0开启，1关闭'")
    private Integer transStatus;
    @ApiModelProperty("'备注'")
    private String remarks;

    @TableLogic(value = "0", delval = "1")
    @ApiModelProperty("'默认0:0未删除，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")
    @ApiModelProperty("'创建时间'")
    private LocalDateTime createDate;

    @TableField(value = "create_id", fill = FieldFill.INSERT)
    @ApiModelProperty("'创建人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;

    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    @ApiModelProperty("修改人id")
    private Long updateId;

    @ApiModelProperty("设备名称")
    private String cameraName;

    @ApiModelProperty("设备类型.0:非公共摄像头,1:公共摄像头")
    private Integer commonType;

    @ApiModelProperty("非公共摄像头对应的部门id(目前为班级id)")
    private Long deptId;

    @ApiModelProperty("当前部门的链状部门字符串, 用于数据回显")
    private String parentDept;

    @ApiModelProperty("播流第一帧")
    private transient String firstImg;
}
