package com.casic.missiles.modular.system.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

/**
 * <p>
 * 设备型号表
 * </p>
 *
 * @author lwh123
 * @since 2019-05-23
 */
@TableName("base_device_models")
@Data
public class DeviceModels extends Model<DeviceModels> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.ID_WORKER)
    private Long id;
    /**
     * 型号名称
     */
    @TableField("MODEL_NAME")
    private String modelName;
    /**
     * 设备类型主键
     */
    @TableField("DEVICE_TYPE")
    private Long deviceType;
    /**
     * 通信方式（0:LORA,1:3G,2:4G,3:联通移动NB,4:电信NB）
     */
    @TableField("COMMUNICATION")
    private String communication;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DeviceModels{" +
                "id=" + id +
                ", modelName=" + modelName +
                ", deviceType=" + deviceType +
                ", communication=" + communication +
                "}";
    }
}
