Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
Types ¶
type MRule ¶
type MRule struct {
RulexModel
UUID string `gorm:"not null"`
Name string `gorm:"not null"`
Description string
FromSource stringList `gorm:"not null type:string[]"`
FromDevice stringList `gorm:"not null type:string[]"`
Actions string `gorm:"not null"`
Success string `gorm:"not null"`
Failed string `gorm:"not null"`
}
type RulexModel ¶
type User ¶
type User struct {
Id int64 `gorm:"primaryKey"`
Username string `gorm:"size:255;comment:用户名"`
Password string `gorm:"size:8;comment:密码"`
Address string `gorm:"size:255;comment:地址"`
Tel string `gorm:"size:11;comment:电话号码"`
Admin *bool `gorm:"default:false;comment:管理员(0-否 1-是)"` //数据库默认会将bool转化为tinyint(1)
}
Click to show internal directories.
Click to hide internal directories.