// ========================================================================== // GFast自动生成api操作代码。 // 生成日期:2024-03-01 12:49:32 // 生成路径: api/v1/system/ys7devices.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" ) // Ys7DevicesSearchReq 分页请求参数 type Ys7DevicesSearchReq struct { g.Meta `path:"/list" tags:"荧石摄像头" method:"get" summary:"荧石摄像头列表"` Id string `p:"id"` // id CreatedAt string `p:"createdAt" v:"createdAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` // DeviceSerial string `p:"deviceSerial"` // 设备串号 DeviceName string `p:"deviceName"` // 设备名称 DeviceType string `p:"deviceType"` // 设备类型 Status string `p:"status" v:"status@integer#状态需为整数"` // 状态 Defence string `p:"defence" v:"defence@integer#需为整数"` // DeviceVersion string `p:"deviceVersion"` // 设备版本 ProjectId string `p:"projectId"` // 项目ID // 判断是否前端还是后端页面的请求 IsFront bool `p:"isFront"` // 判断是否是小程序的请求 IsWechat bool `p:"isWechat"` commonApi.PageReq commonApi.Author } // Ys7DevicesSearchRes 列表返回结果 type Ys7DevicesSearchRes struct { g.Meta `mime:"application/json"` commonApi.ListRes List []*model.Ys7DevicesListRes `json:"list"` } // Ys7DevicesAddReq 添加操作请求参数 type Ys7DevicesAddReq struct { g.Meta `path:"/add" tags:"荧石摄像头" method:"post" summary:"荧石摄像头添加"` commonApi.Author DeviceSerial string `p:"deviceSerial" ` DeviceName string `p:"deviceName" ` DeviceType string `p:"deviceType" ` Status int `p:"status" ` Defence int64 `p:"defence" ` DeviceVersion string `p:"deviceVersion" ` ProjectId string `p:"projectId" ` Remark string `p:"remark" ` Sort int `p:"sort" ` } // Ys7DevicesAddRes 添加操作返回结果 type Ys7DevicesAddRes struct { commonApi.EmptyRes } // Ys7DevicesEditReq 修改操作请求参数 type Ys7DevicesEditReq struct { g.Meta `path:"/edit" tags:"荧石摄像头" method:"put" summary:"荧石摄像头修改"` commonApi.Author Id uint `p:"id" v:"required#主键ID不能为空"` DeviceSerial string `p:"deviceSerial" ` DeviceName string `p:"deviceName" ` DeviceType string `p:"deviceType" ` Status int `p:"status" ` Defence int64 `p:"defence" ` DeviceVersion string `p:"deviceVersion" ` ProjectId string `p:"projectId" ` Detail string `p:"detail" dc:"摄像头位置信息"` Position string `p:"position" dc:"摄像头位置"` ReMark string `p:"remark" dc:"备注"` Sort int `p:"sort" ` } // Ys7DevicesEditRes 修改操作返回结果 type Ys7DevicesEditRes struct { commonApi.EmptyRes } // Ys7DevicesGetReq 获取一条数据请求 type Ys7DevicesGetReq struct { g.Meta `path:"/get" tags:"荧石摄像头" method:"get" summary:"获取荧石摄像头信息"` commonApi.Author Id uint `p:"id" v:"required#主键必须"` // 通过主键获取 } // Ys7DevicesGetRes 获取一条数据结果 type Ys7DevicesGetRes struct { g.Meta `mime:"application/json"` *model.Ys7DevicesInfoRes } // Ys7DevicesDeleteReq 删除数据请求 type Ys7DevicesDeleteReq struct { g.Meta `path:"/delete" tags:"荧石摄像头" method:"delete" summary:"删除荧石摄像头"` commonApi.Author Ids []uint `p:"ids" v:"required#主键必须"` // 通过主键删除 } // Ys7DevicesDeleteRes 删除数据返回 type Ys7DevicesDeleteRes struct { commonApi.EmptyRes } // Ys7DevicesBindProjectReq 摄像头绑定项目 type Ys7DevicesBindProjectReq struct { g.Meta `path:"/bindProject" tags:"荧石摄像头" method:"post" summary:"摄像头绑定项目"` commonApi.Author List *model.Ys7DevicesProject `json:"list"` } // Ys7DevicesBindProjectRes 摄像头绑定项目返回 type Ys7DevicesBindProjectRes struct { commonApi.EmptyRes } // Ys7DevicesEditPositionReq 小程序修改摄像头坐标 type Ys7DevicesEditPositionReq struct { g.Meta `path:"/editPosition" tags:"荧石摄像头" method:"put" summary:"前端和小程序修改摄像头坐标"` commonApi.Author Id uint `p:"id" v:"required#主键ID不能为空" dc:"摄像头主键ID"` Position string `p:"detail" dc:"摄像头位置"` } // Ys7DevicesEditPositionRes 小程序修改摄像头坐标返回 type Ys7DevicesEditPositionRes struct { commonApi.EmptyRes } // Ys7DevicesGetByProjectIdReq 根据项目ID获取摄像头列表 type Ys7DevicesGetByProjectIdReq struct { g.Meta `path:"/getByProjectId" tags:"荧石摄像头" method:"get" summary:"根据项目ID获取摄像头列表"` commonApi.PageReq ProjectId int `p:"projectId" v:"required#项目ID不能为空"` } // Ys7DevicesGetByProjectIdRes 根据项目ID获取摄像头列表返回 type Ys7DevicesGetByProjectIdRes struct { g.Meta `mime:"application/json"` commonApi.ListRes List []*model.Ys7DevicesList2Res `json:"list"` } // 获取视频播放地址 type Ys7DevicesGetVideoUrlReq struct { g.Meta `path:"/getVideoUrl" tags:"荧石摄像头" method:"post" summary:"获取视频播放地址"` commonApi.Author DeviecesSerial string `p:"deviecesSerial" v:"required#设备序列号不能为空"` } // 获取视频播放地址返回 type Ys7DevicesGetVideoUrlRes struct { g.Meta `mime:"application/json"` VideoUrl string `json:"videoUrl"` } // 获取荧石云 AccessTOken type Ys7DevicesGetAccessTokenReq struct { g.Meta `path:"/getAccessToken" tags:"荧石摄像头" method:"get" summary:"获取荧石云AccessToken"` commonApi.Author } // 获取荧石云 AccessToken返回 type Ys7DevicesGetAccessTokenRes struct { g.Meta `mime:"application/json"` Token string `json:"token"` } // Ys7DevicesEditGisReq GIS 前端调用修改摄像头信息 type Ys7DevicesEditGisReq struct { g.Meta `path:"/editGis" tags:"荧石摄像头" method:"put" summary:"GIS前端调用修改摄像头信息"` commonApi.Author Id uint `p:"id" v:"required#主键ID不能为空" dc:"摄像头主键ID"` DeviceSerial string `p:"deviceSerial" dc:"设备序列号"` DeviceName string `p:"deviceName" dc:"设备名称"` Detail string `p:"detail" dc:"摄像头位置信息"` } // Ys7DevicesEditGisRes GIS 前端调用修改摄像头信息返回 type Ys7DevicesEditGisRes struct { commonApi.EmptyRes } // 开启视频加密 type Ys7DevicesOpenEncryptReq struct { g.Meta `path:"/openEncrypt" tags:"荧石摄像头" method:"post" summary:"开启视频加密"` commonApi.Author DeviceSerial string `p:"deviceSerial" v:"required#设备序列号不能为空"` } type Ys7DevicesOpenEncryptRes struct { commonApi.EmptyRes } // 关闭视频加密 type Ys7DevicesCloseEncryptReq struct { g.Meta `path:"/closeEncrypt" tags:"荧石摄像头" method:"post" summary:"关闭视频加密"` commonApi.Author DeviceSerial string `p:"deviceSerial" v:"required#设备序列号不能为空"` } type Ys7DevicesCloseEncryptRes struct { commonApi.EmptyRes } // 小程序获取设备列表 type Ys7DevicesGetListReq struct { g.Meta `path:"/getList" tags:"荧石摄像头" method:"get" summary:"小程序获取设备列表"` commonApi.Author commonApi.PageReq Id string `p:"id" dc:"设备主键"` // id CreatedAt string `p:"createdAt" dc:"创建时间"` // DeviceSerial string `p:"deviceSerial" dc:"设备串号"` // 设备串号 DeviceName string `p:"deviceName" dc:"设备名称"` // 设备名称 DeviceType string `p:"deviceType dc:"设备类型"` // 设备类型 Status string `p:"status" dc:"设备状态"` // 状态 Defence string `p:"defence" dc:"不用管"` // DeviceVersion string `p:"deviceVersion" dc:"设备版本"` // 设备版本 ProjectId string `p:"projectId" dc:"项目id"` Detail string `p:"detail" dc:"设备位置信息"` } type Ys7DevicesGetListRes struct { g.Meta `mime:"application/json"` commonApi.ListRes List []*model.Ys7DevicesList3Res `json:"list"` } type PtzStartReq struct { g.Meta `path:"/ptzStart" tags:"荧石摄像头" method:"put" summary:"开启云台控制"` commonApi.Author DeviceSerial string `p:"deviceSerial" v:"required#设备序列号不能为空"` Direction int `p:"direction" dc:"操作命令:0-上,1-下,2-左,3-右,4-左上,5-左下,6-右上,7-右下,8-放大,9-缩小,10-近焦距,11-远焦距,16-自动控制" v:"between:0,16#取值范围为0~16"` } type PtzStartRes struct { commonApi.EmptyRes } type PtzEndReq struct { g.Meta `path:"/ptzEnd" tags:"荧石摄像头" method:"put" summary:"停止云台控制"` commonApi.Author DeviceSerial string `p:"deviceSerial" v:"required#设备序列号不能为空"` Direction int `p:"direction" dc:"操作命令:0-上,1-下,2-左,3-右,4-左上,5-左下,6-右上,7-右下,8-放大,9-缩小,10-近焦距,11-远焦距,16-自动控制" v:"between:0,16#取值范围为0~16"` } type PtzEndRes struct { commonApi.EmptyRes } type ManualSnapshotInterfaceReq struct { g.Meta `path:"/manualSnapshotInterface" tags:"荧石摄像头" method:"put" summary:"手动摄像头抓拍"` commonApi.Author DeviceSerial string `p:"deviceSerial" v:"required#设备序列号不能为空"` } type ManualSnapshotInterfaceRes struct { commonApi.EmptyRes }