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

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.io.Serializable;
import java.time.LocalDateTime;

/**
 * 消费机设备Entity
 *
 * @author ZYJ
 * @date 2023-03-14 17:55:59
 */
@Data
@TableName("edu_consume_device")
public class EduConsumeDevice implements Serializable {

    private static final long serialVersionUID = 3799180102688755329L;

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

    @ApiModelProperty(value = "创建时间")
    @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;

    @ApiModelProperty(value = "修改时间")
    @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;

    @ApiModelProperty(value = "是否删除，1删除0未删除，默认0")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @ApiModelProperty(value = "设备名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "设备编号")
    @TableField("sn")
    private String sn;

    @ApiModelProperty(value = "mac地址")
    @TableField("mac_address")
    private String macAddress;

    @ApiModelProperty(value = "设备厂商类型")
    @TableField("device_type")
    private String deviceType;

    @ApiModelProperty(value = "ip地址")
    @TableField("ip")
    private String ip;

    @ApiModelProperty(value = "学校id")
    @TableField("school_id")
    private Long schoolId;

    @ApiModelProperty(value = "设备在线状态，0-在线，1-未在线")
    @TableField("state")
    private Integer state;

}