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.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

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

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

/**
 * 人脸组信息 Entity
 *
 * @author zhanghaijun
 * @date 2021-06-16 14:09:44
 */
@Data
public class EduFaceGroup {

    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer 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;

    /**
     * 删除标识，0-未删除，1-已删除
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Byte delFlag;

    /**
     * 人脸组名
     */
    @TableField("group_name")
    private String groupName;

    /**
     * 人脸组描述
     */
    @TableField("description")
    private String description;

    /**
     * 0-白名单，1-黑名单
     */
    @TableField("type")
    private Integer type;

    private Long schoolId;

    private String schoolName;

    @ApiModelProperty("设备/设备组列表")
    private transient List<EduFaceGroupDevice> deviceList;

    @ApiModelProperty("总人数")
    private transient Integer totalNum;

    /**
     * 下发人数
     */
    @ApiModelProperty("下发人数")
    private transient Integer issueNum;
}