mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
889 B
Go
34 lines
889 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type SettingType string
|
|
|
|
const (
|
|
SettingTypeBool SettingType = "bool"
|
|
SettingTypeInt64 SettingType = "int64"
|
|
SettingTypeFloat64 SettingType = "float64"
|
|
SettingTypeString SettingType = "string"
|
|
)
|
|
|
|
type SettingGroup = string
|
|
|
|
const (
|
|
SettingGroupRoom SettingGroup = "room"
|
|
SettingGroupUser SettingGroup = "user"
|
|
SettingGroupProxy SettingGroup = "proxy"
|
|
SettingGroupRtmp SettingGroup = "rtmp"
|
|
SettingGroupDatabase SettingGroup = "database"
|
|
SettingGroupServer SettingGroup = "server"
|
|
SettingGroupOauth2 SettingGroup = "oauth2"
|
|
SettingGroupEmail SettingGroup = "email"
|
|
)
|
|
|
|
type Setting struct {
|
|
Name string `gorm:"primaryKey;type:varchar(256)"`
|
|
UpdatedAt time.Time
|
|
Value string `gorm:"not null;type:text"`
|
|
Type SettingType `gorm:"not null;default:string"`
|
|
Group SettingGroup `gorm:"not null"`
|
|
}
|