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

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

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import lombok.Data;

/**
 * 设备分组表 Entity
 * @author zhanghaijun
 * @date 2021-06-16 15:27:11
 */
@Data
@TableName("edu_attendance_device_group")
public class EduAttendanceDeviceGroup {

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

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

    /**
     * 学校id
     */
    @TableField("school_id")
    private Long schoolId;


    /**
     * 组描述
     */
    @TableField("group_description")
    private String groupDescription;


    @TableField(exist = false)
    private String schoolName;

    /**
     * 1是删除，0未删除，默认0
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

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

}