69 lines
2.1 KiB
Go
69 lines
2.1 KiB
Go
package provisioning
|
|
|
|
import (
|
|
"time"
|
|
|
|
commonDTO "git.ilapage.cn/ila/yovision/Sense/server/common/dto"
|
|
)
|
|
|
|
type BatchPageRequest struct {
|
|
commonDTO.Pagination `search:"-"`
|
|
Status string `form:"status"`
|
|
}
|
|
|
|
type ImportRow struct {
|
|
LineNumber int `json:"lineNumber"`
|
|
Name string `json:"name"`
|
|
Location string `json:"location"`
|
|
Address string `json:"address"`
|
|
}
|
|
|
|
type CreateBatchRequest struct {
|
|
IdempotencyKey string `json:"idempotencyKey"`
|
|
Rows []ImportRow `json:"rows"`
|
|
CreateBy int `json:"-"`
|
|
}
|
|
|
|
type CredentialInput struct {
|
|
ItemID string `json:"itemId"`
|
|
ONVIFUsername string `json:"onvifUsername"`
|
|
ONVIFPassword string `json:"onvifPassword"`
|
|
RTSPSameAsONVIF bool `json:"rtspSameAsOnvif"`
|
|
RTSPUsername string `json:"rtspUsername"`
|
|
RTSPPassword string `json:"rtspPassword"`
|
|
}
|
|
|
|
type ExecuteRequest struct {
|
|
Credentials []CredentialInput `json:"credentials"`
|
|
UpdateBy int `json:"-"`
|
|
}
|
|
|
|
type ItemResponse struct {
|
|
ID string `json:"id"`
|
|
LineNumber int `json:"lineNumber"`
|
|
Name string `json:"name"`
|
|
Location string `json:"location"`
|
|
Address string `json:"address"`
|
|
Status string `json:"status"`
|
|
FailureCode string `json:"failureCode,omitempty"`
|
|
Detail string `json:"detail,omitempty"`
|
|
DeviceID string `json:"deviceId,omitempty"`
|
|
Attempts int `json:"attempts"`
|
|
LastTriedAt *time.Time `json:"lastTriedAt,omitempty"`
|
|
}
|
|
|
|
type BatchResponse struct {
|
|
ID string `json:"id"`
|
|
IdempotencyKey string `json:"idempotencyKey"`
|
|
Status string `json:"status"`
|
|
QuotaLimit int `json:"quotaLimit"`
|
|
ExistingCount int `json:"existingCount"`
|
|
TotalCount int `json:"totalCount"`
|
|
ReadyCount int `json:"readyCount"`
|
|
SuccessCount int `json:"successCount"`
|
|
FailureCount int `json:"failureCount"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
Items []ItemResponse `json:"items,omitempty"`
|
|
}
|