chore: 同步本地 v9 整改与运营能力
This commit is contained in:
@@ -32,6 +32,7 @@ type Room struct {
|
||||
Capacity *int `gorm:"type:int" json:"capacity,omitempty"`
|
||||
Stage *string `gorm:"size:32" json:"stage,omitempty"`
|
||||
Region *string `gorm:"size:64" json:"region,omitempty"`
|
||||
OrgID *string `gorm:"column:org_id;type:uuid;index" json:"orgId,omitempty"`
|
||||
Status string `gorm:"default:active" json:"status"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"`
|
||||
@@ -109,38 +110,38 @@ func (Alarm) TableName() string { return "alarms" }
|
||||
|
||||
// Camera 摄像头表
|
||||
type Camera struct {
|
||||
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
RoomID *string `gorm:"column:room_id;index" json:"roomId,omitempty"`
|
||||
Code string `gorm:"size:64" json:"code"`
|
||||
Name string `gorm:"size:128" json:"name"`
|
||||
RtspURL *string `gorm:"column:rtsp_url;size:512" json:"rtspUrl,omitempty"`
|
||||
HTTPURL *string `gorm:"column:http_url;size:512" json:"httpUrl,omitempty"`
|
||||
Username *string `gorm:"size:64" json:"username,omitempty"`
|
||||
PasswordEnc *string `gorm:"column:password_enc;size:255" json:"-"`
|
||||
Position *string `gorm:"size:255" json:"position,omitempty"`
|
||||
Resolution *string `gorm:"size:32" json:"resolution,omitempty"`
|
||||
FPS *int `gorm:"type:int" json:"fps,omitempty"`
|
||||
IsOnline bool `gorm:"column:is_online;default:true" json:"isOnline"`
|
||||
GbDeviceID *string `gorm:"column:gb_device_id;size:20" json:"gbDeviceId,omitempty"`
|
||||
GbChannelID *string `gorm:"column:gb_channel_id;size:20" json:"gbChannelId,omitempty"`
|
||||
GbAuthID *string `gorm:"column:gb_auth_id;size:20" json:"gbAuthId,omitempty"`
|
||||
GbAuthPassword *string `gorm:"column:gb_auth_password;size:255" json:"-"`
|
||||
GbStreamType *string `gorm:"column:gb_stream_type;size:10" json:"gbStreamType,omitempty"`
|
||||
GbTransport *string `gorm:"column:gb_transport;size:10" json:"gbTransport,omitempty"`
|
||||
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
||||
RoomID *string `gorm:"column:room_id;index" json:"roomId,omitempty"`
|
||||
Code string `gorm:"size:64" json:"code"`
|
||||
Name string `gorm:"size:128" json:"name"`
|
||||
RtspURL *string `gorm:"column:rtsp_url;size:512" json:"rtspUrl,omitempty"`
|
||||
HTTPURL *string `gorm:"column:http_url;size:512" json:"httpUrl,omitempty"`
|
||||
Username *string `gorm:"size:64" json:"username,omitempty"`
|
||||
PasswordEnc *string `gorm:"column:password_enc;size:255" json:"-"`
|
||||
Position *string `gorm:"size:255" json:"position,omitempty"`
|
||||
Resolution *string `gorm:"size:32" json:"resolution,omitempty"`
|
||||
FPS *int `gorm:"type:int" json:"fps,omitempty"`
|
||||
IsOnline bool `gorm:"column:is_online;default:true" json:"isOnline"`
|
||||
GbDeviceID *string `gorm:"column:gb_device_id;size:20" json:"gbDeviceId,omitempty"`
|
||||
GbChannelID *string `gorm:"column:gb_channel_id;size:20" json:"gbChannelId,omitempty"`
|
||||
GbAuthID *string `gorm:"column:gb_auth_id;size:20" json:"gbAuthId,omitempty"`
|
||||
GbAuthPassword *string `gorm:"column:gb_auth_password;size:255" json:"-"`
|
||||
GbStreamType *string `gorm:"column:gb_stream_type;size:10" json:"gbStreamType,omitempty"`
|
||||
GbTransport *string `gorm:"column:gb_transport;size:10" json:"gbTransport,omitempty"`
|
||||
GbAlarmChannelID *string `gorm:"column:gb_alarm_channel_id;size:20" json:"gbAlarmChannelId,omitempty"`
|
||||
GbVoiceChannelID *string `gorm:"column:gb_voice_channel_id;size:20" json:"gbVoiceChannelId,omitempty"`
|
||||
GbManufacturer *string `gorm:"column:gb_manufacturer;size:64" json:"gbManufacturer,omitempty"`
|
||||
ManufacturerID *string `gorm:"column:manufacturer_id;size:64" json:"manufacturerId,omitempty"`
|
||||
GbManufacturer *string `gorm:"column:gb_manufacturer;size:64" json:"gbManufacturer,omitempty"`
|
||||
ManufacturerID *string `gorm:"column:manufacturer_id;size:64" json:"manufacturerId,omitempty"`
|
||||
// 以下字段不在数据库中,运行时通过 WVP API 填充
|
||||
StreamURL *string `gorm:"-" json:"streamUrl,omitempty"`
|
||||
HlsURL *string `gorm:"-" json:"hlsUrl,omitempty"`
|
||||
FlvURL *string `gorm:"-" json:"flvUrl,omitempty"`
|
||||
WebrtcURL *string `gorm:"-" json:"webrtcUrl,omitempty"`
|
||||
SnapshotURL *string `gorm:"-" json:"snapshotUrl,omitempty"`
|
||||
Online bool `gorm:"-" json:"online"`
|
||||
Enabled bool `gorm:"default:true" json:"enabled"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"`
|
||||
StreamURL *string `gorm:"-" json:"streamUrl,omitempty"`
|
||||
HlsURL *string `gorm:"-" json:"hlsUrl,omitempty"`
|
||||
FlvURL *string `gorm:"-" json:"flvUrl,omitempty"`
|
||||
WebrtcURL *string `gorm:"-" json:"webrtcUrl,omitempty"`
|
||||
SnapshotURL *string `gorm:"-" json:"snapshotUrl,omitempty"`
|
||||
Online bool `gorm:"-" json:"online"`
|
||||
Enabled bool `gorm:"default:true" json:"enabled"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Camera) TableName() string { return "cameras" }
|
||||
@@ -167,8 +168,8 @@ type VideoClip struct {
|
||||
AlarmID *string `gorm:"column:alarm_id;index" json:"alarmId,omitempty"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"`
|
||||
S3Bucket *string `gorm:"column:s3_bucket" json:"s3Bucket,omitempty"`
|
||||
S3Key *string `gorm:"column:s3_key" json:"s3Key,omitempty"`
|
||||
S3Bucket *string `gorm:"column:s3_bucket" json:"s3Bucket,omitempty"`
|
||||
S3Key *string `gorm:"column:s3_key" json:"s3Key,omitempty"`
|
||||
// 以下字段不在数据库中,运行时填充
|
||||
PlaybackURL *string `gorm:"-" json:"playbackUrl,omitempty"`
|
||||
Format string `gorm:"-" json:"format"`
|
||||
|
||||
Reference in New Issue
Block a user