30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
|
|
package model
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type Point struct {
|
||
|
|
ID string `json:"id" gorm:"type:varchar(32);primaryKey"`
|
||
|
|
|
||
|
|
Name string `json:"name" gorm:"type:varchar(128);not null"`
|
||
|
|
X float64 `json:"x" gorm:"not null;default:0"`
|
||
|
|
Y float64 `json:"y" gorm:"not null;default:0"`
|
||
|
|
Z float64 `json:"z" gorm:"not null;default:0"`
|
||
|
|
|
||
|
|
LocationObjectID string `json:"locationObjectId" gorm:"type:varchar(32);index"`
|
||
|
|
StatusCode string `json:"statusCode" gorm:"type:varchar(64);not null;index"`
|
||
|
|
Image string `json:"image" gorm:"type:text;not null"`
|
||
|
|
|
||
|
|
ObjectID string `json:"objectId" gorm:"type:varchar(32);not null;index"`
|
||
|
|
|
||
|
|
IndicatorID string `json:"indicatorId" gorm:"type:varchar(32);not null;index"`
|
||
|
|
|
||
|
|
CreatorPersonID string `json:"creatorPersonId" gorm:"type:varchar(32);not null;index"`
|
||
|
|
SensorID string `json:"sensorId" gorm:"type:varchar(32);index"`
|
||
|
|
CreatedTaskID string `json:"createdTaskId" gorm:"type:varchar(32);index"`
|
||
|
|
|
||
|
|
Remark string `json:"remark" gorm:"type:varchar(255);default:''"`
|
||
|
|
Deleted bool `json:"deleted" gorm:"not null;default:false;index"`
|
||
|
|
CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"`
|
||
|
|
UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
|
||
|
|
}
|