feat: 重建设备台账与凭据边界 (#65)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
common "git.ilapage.cn/ila/yovision/Sense/server/common/models"
|
||||
)
|
||||
|
||||
const (
|
||||
ModalityVideo = "video"
|
||||
StatusPending = "pending"
|
||||
StatusDisabled = "disabled"
|
||||
AdapterReady = "ready"
|
||||
AdapterNotReady = "adapter_not_ready"
|
||||
)
|
||||
|
||||
type Device struct {
|
||||
ID string `gorm:"size:36;primaryKey" json:"id"`
|
||||
Name string `gorm:"size:128;not null" json:"name"`
|
||||
Location string `gorm:"size:255;not null;default:''" json:"location"`
|
||||
Modality string `gorm:"size:32;not null;index" json:"modality"`
|
||||
CapabilitiesJSON string `gorm:"column:capabilities;type:jsonb;not null;default:'[]'" json:"-"`
|
||||
Status string `gorm:"size:32;not null;index" json:"status"`
|
||||
AdapterStatus string `gorm:"size:32;not null" json:"adapterStatus"`
|
||||
RTSPSameAsONVIF bool `gorm:"not null;default:true" json:"rtspCredentialSameAsOnvif"`
|
||||
CredentialUpdatedAt *time.Time `json:"credentialUpdatedAt,omitempty"`
|
||||
RetryRequestedAt *time.Time `json:"retryRequestedAt,omitempty"`
|
||||
Version int64 `gorm:"not null;default:1" json:"version"`
|
||||
common.ControlBy
|
||||
common.ModelTime
|
||||
}
|
||||
|
||||
func (Device) TableName() string { return "sense_devices" }
|
||||
Reference in New Issue
Block a user