1234567891011121314151617181920212223 |
- // product is a abstract define of same devices made by some vendor
- package models
- import (
- "github.com/jinzhu/gorm"
- )
- // Product product
- type Product struct {
- gorm.Model
- // which vendor
- VendorID int32
- // name
- ProductName string `sql:"type:varchar(200);not null;"`
- // desc
- ProductDescription string `sql:"type:text;not null;"`
- // product key to auth a product
- ProductKey string `sql:"type:varchar(200);not null;unique;key;"`
- // product config string (JSON)
- ProductConfig string `sql:"type:text; not null;"`
- Devices []Device
- }
|