12345678910111213141516171819202122232425262728293031 |
- package drviers
- type DevModel struct {
- Id string `json:"id" gorm:"-"`
- DevName string `json:"devName" gorm:"primary_key"`
- Type string `json:"-" gorm:"type"`
- GwDevId string `json:"gwDevId" gorm:"-"`
- }
- func (m *DevModel) GetType() string {
- return m.Type
- }
- func (m *DevModel) GetGatewayID() string {
- return m.GwDevId
- }
- func (m *DevModel) GetName() string {
- return m.DevName
- }
- func (m *DevModel) GetObject() interface{} {
- return m
- }
- type IModel interface {
- GetName() string
- GetType() string
- GetGatewayID() string
- GetObject() interface{}
- }
|