package models

import "github.com/jinzhu/gorm"

// SubDevice sub_device model
type SubDevice struct {
	gorm.Model
	RecordId string `gorm:"column:record_id;size:32;index"`
	// which device the sub_device belongs to
	DeviceCode string `sql:"type:varchar(200);not null;index"`
	// sub_device_id
	SubDeviceID string `sql:"type:varchar(200);not null;key"`
	//sub_device name
	Name   string `sql:"type:varchar(200);not null;"`
	Status int    `gorm:"column:status"` // 状态(1:在线 2:离线)
}

// SubDeviceQuery sub_device query
type SubDeviceQuery struct {
	SubDevice
}
