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

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
* 设备对应分组关系表 Entity
*
* @author zhanghaijun
* @date 2021-06-16 15:29:10
*/
@Data
@TableName("edu_device_group")
public class EduDeviceGroup {

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

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

        /**
        * 组别id
        */
        @ApiModelProperty("组id")
        @TableField("group_id")
        private Long groupId;

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

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

        /**
        * 创建人id
        */
        @TableField("creat_id")
        private Integer creatId;

        /**
        * 修改时间
        */
        @TableField("update_time")
        @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;

}