168 lines
6.6 KiB
Go
168 lines
6.6 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2023-11-14 10:53:21
|
||
// 生成路径: api/v1/system/manage_device.go
|
||
// 生成人:gfast
|
||
// desc:设备信息相关参数
|
||
// company:云南奇讯科技有限公司
|
||
// ==========================================================================
|
||
|
||
package system
|
||
|
||
import (
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||
)
|
||
|
||
// ManageDeviceSearchReq 分页请求参数
|
||
type ManageDeviceSearchReq struct {
|
||
g.Meta `path:"/list" tags:"设备信息" method:"get" summary:"设备信息列表"`
|
||
Domain string `p:"domain" dc:"产品类型"`
|
||
DeviceSn string `p:"deviceSn" dc:"产品序列号"`
|
||
ProjectId string `p:"projectId" dc:"项目id" v:"required#项目id不能为空"`
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// ManageDeviceSearchRes 列表返回结果
|
||
type ManageDeviceSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.ManageDeviceListRes `json:"list"`
|
||
}
|
||
|
||
// NoPageListSearchReq 不分页请求参数
|
||
type NoPageListSearchReq struct {
|
||
g.Meta `path:"/noPageList" tags:"设备信息" method:"get" summary:"设备信息列表(不分页 )"`
|
||
Domain string `p:"domain" dc:"产品类型"`
|
||
DeviceSn string `p:"deviceSn" dc:"产品序列号"`
|
||
ProjectId string `p:"projectId" dc:"项目id" v:"required#项目id不能为空"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// NoPageListSearchRes 不分页请求参数
|
||
type NoPageListSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.ManageDeviceListRes `json:"list"`
|
||
}
|
||
|
||
// ManageDeviceAddReq 添加操作请求参数
|
||
type ManageDeviceAddReq struct {
|
||
g.Meta `path:"/add" tags:"设备信息" method:"post" summary:"设备信息添加"`
|
||
ProjectId string `p:"projectId" dc:"项目id" v:"required#项目id不能为空"`
|
||
DictionaryId string `p:"dictionaryId" dc:"产品ID" v:"required#产品ID不能为空"`
|
||
DeviceSn string `p:"deviceSn" dc:"设备序列号" v:"required#设备序列号不能为空"`
|
||
Nickname string `p:"nickname" dc:"设备自定义名称" v:"required#设备自定义名称不能为空"`
|
||
MqClientId string `p:"mqClientId" dc:"客户端id" v:"required#客户端id不能为空"`
|
||
WorkspaceId string `p:"workspaceId" dc:"工作区" `
|
||
//FirmwareVersion string `p:"firmwareVersion" dc:"固件版本" v:"required#固件版本不能为空"`
|
||
//CompatibleStatus string `p:"compatibleStatus" dc:"固件版本是否一致(1一致 0不一致)" v:"between:0,1#参数范围为0~1"`
|
||
//ChildSn string `p:"childSn" dc:"由网关控制的设备"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// ManageDeviceAddRes 添加操作返回结果
|
||
type ManageDeviceAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// ManageDeviceEditReq 修改操作请求参数
|
||
type ManageDeviceEditReq struct {
|
||
g.Meta `path:"/edit" tags:"设备信息" method:"put" summary:"设备信息修改"`
|
||
commonApi.Author
|
||
Id uint64 `p:"id" v:"required#主键ID不能为空"`
|
||
DictionaryId string `p:"dictionaryId" dc:"产品ID" v:"required#产品ID不能为空"`
|
||
DeviceSn string `p:"deviceSn" dc:"设备序列号" v:"required#设备序列号不能为空"`
|
||
Nickname string `p:"nickname" dc:"设备自定义名称" v:"required#设备自定义名称不能为空"`
|
||
MqClientId string `p:"mqClientId" dc:"客户端id" v:"required#设备自定义名称不能为空"`
|
||
WorkspaceId string `p:"workspaceId" dc:"工作区"`
|
||
//FirmwareVersion string `p:"firmwareVersion" dc:"固件版本" v:"required#固件版本不能为空"`
|
||
//CompatibleStatus string `p:"compatibleStatus" dc:"固件版本是否一致(1一致 0不一致)" v:"between:0,1#参数范围为0~1"`
|
||
//ChildSn string `p:"childSn" dc:"由网关控制的设备"`
|
||
}
|
||
|
||
// ManageDeviceEditRes 修改操作返回结果
|
||
type ManageDeviceEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// ManageDeviceGetReq 获取一条数据请求
|
||
type ManageDeviceGetReq struct {
|
||
g.Meta `path:"/get" tags:"设备信息" method:"get" summary:"获取设备信息信息"`
|
||
commonApi.Author
|
||
Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// ManageDeviceGetRes 获取一条数据结果
|
||
type ManageDeviceGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.ManageDeviceInfoRes
|
||
}
|
||
|
||
// ManageDeviceDeleteReq 删除数据请求
|
||
type ManageDeviceDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"设备信息" method:"delete" summary:"删除设备信息"`
|
||
commonApi.Author
|
||
Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// ManageDeviceDeleteRes 删除数据返回
|
||
type ManageDeviceDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// ProductEnumerationFuncReq 设备产品枚举
|
||
type ProductEnumerationFuncReq struct {
|
||
g.Meta `path:"/productEnumerationList" tags:"设备信息" method:"get" summary:"设备产品枚举"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// ProductEnumerationFuncRes 设备产品枚举
|
||
type ProductEnumerationFuncRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
List []*model.ManageDeviceDictionaryInfo `json:"list"`
|
||
}
|
||
|
||
// CameraPhotoTakeFuncReq 无人机抓拍
|
||
type CameraPhotoTakeFuncReq struct {
|
||
g.Meta `path:"/cameraPhotoTake" tags:"设备信息" method:"get" summary:"无人机抓拍"`
|
||
TrackId string `p:"trackId" dc:"航迹ID" v:"required#航迹ID必须"`
|
||
GatewaySn string `p:"gatewaySn" dc:"网关SN" v:"required#网关SN必须"`
|
||
PayloadIndex string `p:"payloadIndex" dc:"摄像机编号" v:"required#摄像机编号必须"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// CameraPhotoTakeFuncRes 无人机抓拍
|
||
type CameraPhotoTakeFuncRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
}
|
||
|
||
// LiveSetQualityReq 设置直播清晰度
|
||
type LiveSetQualityReq struct {
|
||
g.Meta `path:"/liveSetQuality" tags:"设备信息" method:"put" summary:"设置直播清晰度"`
|
||
GatewaySn string `p:"gatewaySn" dc:"网关SN" v:"required#网关SN必须"`
|
||
Two string `p:"two" dc:"飞机sn" v:"required#飞机sn必须"`
|
||
PayloadIndex string `p:"payloadIndex" dc:"摄像机编号" v:"required#摄像机编号必须"`
|
||
Enum int `p:"enum" dc:"0自适应,1流畅,2标清,3高清,4超清" v:"required#摄像机编号必须"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// LiveSetQualityRes 设置直播清晰度
|
||
type LiveSetQualityRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
}
|
||
|
||
// ButtonStateReq 调试模式按钮状态
|
||
type ButtonStateReq struct {
|
||
g.Meta `path:"/buttonState" tags:"设备信息" method:"get" summary:"调试模式按钮状态"`
|
||
MqClientId string `p:"mqClientId" dc:"mq_client_id" v:"required#mq_client_id必须"`
|
||
commonApi.Author
|
||
}
|
||
|
||
// ButtonStateRes 调试模式按钮状态
|
||
type ButtonStateRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.ButtonEntity
|
||
}
|