package com.njzscloud.supervisory.device.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
import com.njzscloud.supervisory.device.contant.DeviceCategory;
import com.njzscloud.supervisory.device.contant.DeviceCode;
import com.njzscloud.supervisory.device.contant.DeviceProduct;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 * 设备信息表
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "device_info", autoResultMap = true)
public class DeviceInfoEntity {

    /**
     * Id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 设备序列号
     */
    private String sn;
    /**
     * 设备编号; 字典代码：device_code
     */
    private DeviceCode deviceCode;

    /**
     * 设备分类; 字典代码：device_category
     */
    private DeviceCategory deviceCategory;

    /**
     * 设备名称
     */
    private String deviceName;

    /**
     * 产品; 字典代码：device_product
     */
    private DeviceProduct deviceProduct;

    /**
     * 站点; 字典代码：station
     */
    private Long stationId;

    private String cid;

    /**
     * 车道; 字典代码：lane
     */
    private String lane;

    /**
     * 设备配置
     */
    @TableField(typeHandler = JsonTypeHandler.class)
    private Map<String, Object> config;

    /**
     * 备注
     */
    private String memo;

}
