123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- package model
- import "gorm.io/gorm"
- type IntelligentBuildingControl struct {
- gorm.Model
- }
- func (m *IntelligentBuildingControl) TableName() string {
- return "intelligent_building_control"
- }
- // 点位表
- type Point struct {
- Id int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement;comment:点位ID"`
- FullPath string `json:"full_path" gorm:"column:full_path;type:varchar(255);comment:点位全路径"`
- DeviceType string `json:"device_type" gorm:"column:device_type;type:varchar(50);comment:设备类型"`
- Building string `json:"building" gorm:"column:building;type:varchar(50);comment:所属楼宇ID"`
- Floor string `json:"floor" gorm:"column:floor;type:varchar(50);comment:楼层"`
- Section string `json:"section" gorm:"column:section;type:varchar(50);comment:区域"`
- DeviceName string `json:"device_name" gorm:"column:device_name;type:varchar(100);comment:设备名称"`
- PointName string `json:"point_name" gorm:"column:point_name;type:varchar(100);comment:点位名称"`
- }
- // DeviceType 设备类型对应表
- var DeviceType = map[string]string{
- "JSK": "集水坑",
- "AHU": "空调机组",
- "PAU": "新风机组",
- "EAF": "送排风机",
- }
- // NumericPoint TempS1
- type NumericPoint struct {
- Val float64 `xml:"val,attr"`
- Href string `xml:"href,attr,omitempty"`
- Is string `xml:"is,attr,omitempty"`
- Display string `xml:"display,attr,omitempty"`
- Icon string `xml:"icon,attr,omitempty"`
- Unit string `xml:"unit,attr,omitempty"`
- Facets *Facets `xml:"str"`
- ProxyExt *ProxyExt `xml:"ref"`
- Out *OutputValue `xml:"real[name=out]"`
- Tag *TagReference `xml:"ref[name=tag]"`
- }
- type Facets struct {
- Name string `xml:"name,attr"`
- Val string `xml:"val,attr"`
- Href string `xml:"href,attr,omitempty"`
- Display string `xml:"display,attr,omitempty"`
- DisplayName string `xml:"displayName,attr,omitempty"`
- }
- type ProxyExt struct {
- Name string `xml:"name,attr"`
- Href string `xml:"href,attr,omitempty"`
- Is string `xml:"is,attr,omitempty"`
- Display string `xml:"display,attr,omitempty"`
- DisplayName string `xml:"displayName,attr,omitempty"`
- Icon string `xml:"icon,attr,omitempty"`
- }
- type OutputValue struct {
- Name string `xml:"name,attr"`
- Val float64 `xml:"val,attr"`
- Href string `xml:"href,attr,omitempty"`
- Is string `xml:"is,attr,omitempty"`
- Display string `xml:"display,attr,omitempty"`
- DisplayName string `xml:"displayName,attr,omitempty"`
- Icon string `xml:"icon,attr,omitempty"`
- Unit string `xml:"unit,attr,omitempty"`
- }
- type TagReference struct {
- Name string `xml:"name,attr"`
- Href string `xml:"href,attr,omitempty"`
- Is string `xml:"is,attr,omitempty"`
- Display string `xml:"display,attr,omitempty"`
- Icon string `xml:"icon,attr,omitempty"`
- }
- //TempS1 end
- func (p *Point) TableName() string {
- return "point"
- }
|