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

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 org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 人脸组、设备组关系 Entity
 *
 * @author zhanghaijun
 * @date 2021-06-16 14:15:08
 */
@Data
public class EduFaceGroupDevice {

    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *
     */
    @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;

    /**
     *
     */
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    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")
    private LocalDateTime updateDate;

    /**
     *
     */
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 人脸组id
     */
    @TableField("face_group_id")
    private Long faceGroupId;

    /**
     * 设备/设备组id
     */
    @TableField("device_id")
    private Long deviceId;

    /**
     * 设备/设备组名称
     */
    @TableField("device_name")
    private String deviceName;

    /**
     * 0-设备，1-设备组
     */
    @TableField("type")
    private Integer type;

    @ApiModelProperty("设在在线状态，0-在线，1-离线")
    private transient Integer state;
}