add apis
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 1s
CI / bff (push) Successful in 26s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 1s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / water (push) Failing after 8s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 1s
CI / bff (push) Successful in 26s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 1s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / water (push) Failing after 8s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"lone-services/pkg/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
WarningStatus = 1
|
||||
WarningStatusSolved = 2
|
||||
WarningStatusUnsolved = 3
|
||||
)
|
||||
|
||||
type WarningCreate struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
|
||||
UserId int64 `gorm:"column:user_id;type:int;default:NULL" json:"user_id"` // 用户ID
|
||||
HostCode string `gorm:"column:host_code;type:varchar(255);default:NULL" json:"host_code"` // 设备号
|
||||
Time utils.CustomTime `gorm:"column:time;type:datetime;default:NULL" json:"time"` // 剩余盐量
|
||||
Type int32 `gorm:"column:type;type:tinyint(1);default:NULL" json:"type"` // 类型:1流量计 2液位计 3侵水计 4超声
|
||||
Content string `gorm:"column:content;type:varchar(255);default:NULL" json:"content"`
|
||||
}
|
||||
|
||||
type WarningInfo struct {
|
||||
Id int64 `gorm:"column:id;type:int;not null;autoIncrement" json:"id"`
|
||||
UserId int64 `gorm:"column:user_id;type:int;default:NULL" json:"user_id"` // 用户ID
|
||||
HostCode string `gorm:"column:host_code;type:varchar(255);default:NULL" json:"host_code"` // 设备号
|
||||
Time utils.CustomTime `gorm:"column:time;type:datetime;default:NULL" json:"time"` // 剩余盐量
|
||||
Status int32 `gorm:"column:status;type:tinyint(1);default:NULL" json:"status"` // 状态,1为报警,2为已解决,3为未解决
|
||||
Type int32 `gorm:"column:type;type:tinyint(1);default:NULL" json:"type"` // 类型:1流量计 2液位计 3侵水计 4超声
|
||||
Content string `gorm:"column:content;type:varchar(255);default:NULL" json:"content"`
|
||||
CarteTime utils.CustomTime `json:"carte_time" gorm:"carte_time"`
|
||||
}
|
||||
Reference in New Issue
Block a user