| 1234567891011121314151617181920212223242526272829303132 |
- package request
- // CameraCreate 是摄像头配置创建请求。原始播放地址只在系统侧转码时使用。
- type CameraCreate struct {
- DeviceCode string `json:"device_code" binding:"required,max=50"`
- DeviceName string `json:"device_name" binding:"required,max=100"`
- ChannelID uint `json:"channel_id" binding:"required"`
- IPAddress string `json:"ip_address" binding:"required,max=50"`
- Port int `json:"port" binding:"required,min=1,max=65535"`
- Username string `json:"username"`
- Password string `json:"password"`
- Channel int `json:"channel" binding:"min=1"`
- IsActive bool `json:"is_active"`
- StreamProtocol string `json:"stream_protocol" binding:"required,oneof=system-mjpeg webrtc hls mp4"`
- SourceURL string `json:"source_url"`
- StreamURL string `json:"stream_url"`
- SnapshotURL string `json:"snapshot_url"`
- Description string `json:"description"`
- }
- // CameraUpdate 是摄像头配置更新请求。密码留空时保留已保存的密码。
- type CameraUpdate struct {
- ID uint `json:"id" binding:"required"`
- CameraCreate
- }
- // CameraQuery 按停车场筛选摄像头列表。
- type CameraQuery struct {
- ParkingLotID uint `form:"parking_lot_id"`
- Page int `form:"page,default=1" binding:"min=1"`
- PageSize int `form:"page_size,default=10" binding:"min=1,max=100"`
- }
|