178 lines
10 KiB
Go
178 lines
10 KiB
Go
// ==========================================================================
|
||
// GFast自动生成api操作代码。
|
||
// 生成日期:2024-04-12 10:38:43
|
||
// 生成路径: api/v1/system/plant.go
|
||
// 生成人:gfast
|
||
// desc:电站信息相关参数
|
||
// company:云南奇讯科技有限公司
|
||
// ==========================================================================
|
||
|
||
package system
|
||
|
||
import (
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
"github.com/gogf/gf/v2/os/gtime"
|
||
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
||
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
||
)
|
||
|
||
// PlantSearchReq 分页请求参数
|
||
type PlantSearchReq struct {
|
||
g.Meta `path:"/list" tags:"电站信息" method:"get" summary:"电站信息列表"`
|
||
Id string `p:"id"` //电站Id
|
||
Name string `p:"name"` //电站名称
|
||
Address string `p:"address"` //详细地址
|
||
City string `p:"city"` //市
|
||
District string `p:"district"` //区
|
||
Province string `p:"province"` //省
|
||
Latitude string `p:"latitude" v:"latitude@float#纬度需为浮点数"` //纬度
|
||
Longitude string `p:"longitude" v:"longitude@float#经度需为浮点数"` //经度
|
||
Kwp string `p:"kwp" v:"kwp@float#总容量kwp需为浮点数"` //总容量kwp
|
||
MonKwh string `p:"monKwh" v:"monKwh@float#当月发电量需为浮点数"` //当月发电量
|
||
NowKw string `p:"nowKw" v:"nowKw@float#实时功率需为浮点数"` //实时功率
|
||
SumKwh string `p:"sumKwh" v:"sumKwh@float#总发电量需为浮点数"` //总发电量
|
||
TodayKwh string `p:"todayKwh" v:"todayKwh@float#当日发电量需为浮点数"` //当日发电量
|
||
YearKwh string `p:"yearKwh" v:"yearKwh@float#当年发电量需为浮点数"` //当年发电量
|
||
NetworkTime string `p:"networkTime" v:"networkTime@datetime#并网日期需为YYYY-MM-DD hh:mm:ss格式"` //并网日期
|
||
UpdateTime string `p:"updateTime" v:"updateTime@datetime#修改时间需为YYYY-MM-DD hh:mm:ss格式"` //修改时间
|
||
CompanyId string `p:"companyId"` //渠道商Id
|
||
CompanyName string `p:"companyName"` //渠道商名称
|
||
OwnerId string `p:"ownerId"` //业主Id
|
||
OwnerName string `p:"ownerName"` //业主姓名
|
||
ServiceProviderName string `p:"serviceProviderName"` //安装商名称
|
||
ServiceProviderPhone string `p:"serviceProviderPhone"` //安装服务商电话
|
||
NetworkType string `p:"networkType"` //并网类型 1:全额上网 2:自发自用余电上网 3:自发自用无馈网 4:离网
|
||
PowerPlantType string `p:"powerPlantType"` //电站类型 1:家庭户用 2:工商业屋顶 3:地面电站 4:扶贫电站 5:储能电站
|
||
Status string `p:"status" v:"status@integer#电站状态 0:未绑定 1:在线 2:停机 3:停机告警 4:运行告警 5:故障 6:离线需为整数"` //电站状态 0:未绑定 1:在线 2:停机 3:停机告警 4:运行告警 5:故障 6:离线
|
||
PaymentType string `p:"paymentType"` //出资方式
|
||
PlantContact string `p:"plantContact"` //电站联系人
|
||
PlantContactPhone string `p:"plantContactPhone"` //电站联系人电话
|
||
PlantImg string `p:"plantImg"` //电站图片
|
||
DipAngle string `p:"dipAngle" v:"dipAngle@float#倾角度数需为浮点数"` //倾角度数
|
||
OrientationAngle string `p:"orientationAngle" v:"orientationAngle@float#方位角度数需为浮点数"` //方位角度数
|
||
SubassemblyNumber string `p:"subassemblyNumber" v:"subassemblyNumber@integer#组件数量需为整数"` //组件数量
|
||
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
|
||
commonApi.PageReq
|
||
commonApi.Author
|
||
}
|
||
|
||
// PlantSearchRes 列表返回结果
|
||
type PlantSearchRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
commonApi.ListRes
|
||
List []*model.PlantListRes `json:"list"`
|
||
}
|
||
|
||
// PlantAddReq 添加操作请求参数
|
||
type PlantAddReq struct {
|
||
g.Meta `path:"/add" tags:"电站信息" method:"post" summary:"电站信息添加"`
|
||
commonApi.Author
|
||
Id string `p:"id" v:"required#主键ID不能为空"`
|
||
Name string `p:"name" v:"required#电站名称不能为空"`
|
||
Address string `p:"address" `
|
||
City string `p:"city" `
|
||
District string `p:"district" `
|
||
Province string `p:"province" `
|
||
Latitude float64 `p:"latitude" `
|
||
Longitude float64 `p:"longitude" `
|
||
Kwp float64 `p:"kwp" `
|
||
MonKwh float64 `p:"monKwh" `
|
||
NowKw float64 `p:"nowKw" `
|
||
SumKwh float64 `p:"sumKwh" `
|
||
TodayKwh float64 `p:"todayKwh" `
|
||
YearKwh float64 `p:"yearKwh" `
|
||
NetworkTime *gtime.Time `p:"networkTime" `
|
||
UpdateTime *gtime.Time `p:"updateTime" `
|
||
CompanyId string `p:"companyId" `
|
||
CompanyName string `p:"companyName" `
|
||
OwnerId string `p:"ownerId" `
|
||
OwnerName string `p:"ownerName" `
|
||
ServiceProviderName string `p:"serviceProviderName" `
|
||
ServiceProviderPhone string `p:"serviceProviderPhone" `
|
||
NetworkType string `p:"networkType" `
|
||
PowerPlantType string `p:"powerPlantType" `
|
||
Status int `p:"status" v:"required#电站状态 0:未绑定 1:在线 2:停机 3:停机告警 4:运行告警 5:故障 6:离线不能为空"`
|
||
PaymentType string `p:"paymentType" `
|
||
PlantContact string `p:"plantContact" `
|
||
PlantContactPhone string `p:"plantContactPhone" `
|
||
PlantImg string `p:"plantImg" `
|
||
Remark string `p:"remark" `
|
||
DipAngle float64 `p:"dipAngle" `
|
||
OrientationAngle float64 `p:"orientationAngle" `
|
||
SubassemblyNumber int `p:"subassemblyNumber" `
|
||
}
|
||
|
||
// PlantAddRes 添加操作返回结果
|
||
type PlantAddRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// PlantEditReq 修改操作请求参数
|
||
type PlantEditReq struct {
|
||
g.Meta `path:"/edit" tags:"电站信息" method:"put" summary:"电站信息修改"`
|
||
commonApi.Author
|
||
Id string `p:"id" v:"required#主键ID不能为空"`
|
||
Name string `p:"name" v:"required#电站名称不能为空"`
|
||
Address string `p:"address" `
|
||
City string `p:"city" `
|
||
District string `p:"district" `
|
||
Province string `p:"province" `
|
||
Latitude float64 `p:"latitude" `
|
||
Longitude float64 `p:"longitude" `
|
||
Kwp float64 `p:"kwp" `
|
||
MonKwh float64 `p:"monKwh" `
|
||
NowKw float64 `p:"nowKw" `
|
||
SumKwh float64 `p:"sumKwh" `
|
||
TodayKwh float64 `p:"todayKwh" `
|
||
YearKwh float64 `p:"yearKwh" `
|
||
NetworkTime *gtime.Time `p:"networkTime" `
|
||
UpdateTime *gtime.Time `p:"updateTime" `
|
||
CompanyId string `p:"companyId" `
|
||
CompanyName string `p:"companyName" `
|
||
OwnerId string `p:"ownerId" `
|
||
OwnerName string `p:"ownerName" `
|
||
ServiceProviderName string `p:"serviceProviderName" `
|
||
ServiceProviderPhone string `p:"serviceProviderPhone" `
|
||
NetworkType string `p:"networkType" `
|
||
PowerPlantType string `p:"powerPlantType" `
|
||
Status int `p:"status" v:"required#电站状态 0:未绑定 1:在线 2:停机 3:停机告警 4:运行告警 5:故障 6:离线不能为空"`
|
||
PaymentType string `p:"paymentType" `
|
||
PlantContact string `p:"plantContact" `
|
||
PlantContactPhone string `p:"plantContactPhone" `
|
||
PlantImg string `p:"plantImg" `
|
||
Remark string `p:"remark" `
|
||
DipAngle float64 `p:"dipAngle" `
|
||
OrientationAngle float64 `p:"orientationAngle" `
|
||
SubassemblyNumber int `p:"subassemblyNumber" `
|
||
}
|
||
|
||
// PlantEditRes 修改操作返回结果
|
||
type PlantEditRes struct {
|
||
commonApi.EmptyRes
|
||
}
|
||
|
||
// PlantGetReq 获取一条数据请求
|
||
type PlantGetReq struct {
|
||
g.Meta `path:"/get" tags:"电站信息" method:"get" summary:"获取电站信息信息"`
|
||
commonApi.Author
|
||
Id string `p:"id" v:"required#主键必须"` //通过主键获取
|
||
}
|
||
|
||
// PlantGetRes 获取一条数据结果
|
||
type PlantGetRes struct {
|
||
g.Meta `mime:"application/json"`
|
||
*model.PlantInfoRes
|
||
}
|
||
|
||
// PlantDeleteReq 删除数据请求
|
||
type PlantDeleteReq struct {
|
||
g.Meta `path:"/delete" tags:"电站信息" method:"delete" summary:"删除电站信息"`
|
||
commonApi.Author
|
||
Ids []string `p:"ids" v:"required#主键必须"` //通过主键删除
|
||
}
|
||
|
||
// PlantDeleteRes 删除数据返回
|
||
type PlantDeleteRes struct {
|
||
commonApi.EmptyRes
|
||
}
|