package models
|
|
type Cascade struct {
|
Id string `gorm:"column:id;primary_key;" json:"id"`
|
Name string `gorm:"column:name" json:"name"`
|
Username string `gorm:"column:username" json:"username"`
|
Password string `gorm:"column:password" json:"password"`
|
IP string `gorm:"column:ip" json:"ip"`
|
Port int `gorm:"column:port" json:"port"`
|
Enabled bool `gorm:"column:enabled" json:"enabled"`
|
DeviceIDs []string `gorm:"column:device_ids;type:text[];default '{}'" json:"device_ids"`
|
CreateTime int64 `gorm:"column:create_time;autoCreateTime;" json:"create_time"`
|
UpdateTime int64 `gorm:"column:update_time;autoUpdateTime" json:"-"`
|
DeleteTime int64 `gorm:"column:delete_time" json:"-"`
|
}
|
|
func (c *Cascade) TableName() string {
|
return "cascades"
|
}
|