114 lines
3.5 KiB
Go
114 lines
3.5 KiB
Go
package models
|
|
|
|
type SystemGroup struct {
|
|
ID int `gorm:"primaryKey"`
|
|
Name string `gorm:"size:256"`
|
|
}
|
|
|
|
func (SystemGroup) TableName() string {
|
|
return "system_group"
|
|
}
|
|
|
|
type SystemProgram struct {
|
|
ID int `gorm:"primaryKey"`
|
|
Name string `gorm:"size:256"`
|
|
Controller string `gorm:"size:256"`
|
|
}
|
|
|
|
type SystemUnit struct {
|
|
ID int `gorm:"primaryKey"`
|
|
Name string `gorm:"size:256"`
|
|
ConnectionName string `gorm:"size:256"`
|
|
CustomCode string `gorm:"size:256"`
|
|
}
|
|
|
|
type SystemRole struct {
|
|
ID int `gorm:"primaryKey"`
|
|
Name string `gorm:"size:256"`
|
|
CustomCode string `gorm:"size:256"`
|
|
}
|
|
|
|
type SystemPreference struct {
|
|
ID string `gorm:"primaryKey;size:256"`
|
|
Value string `gorm:"type:citext"`
|
|
}
|
|
|
|
type SystemUser struct {
|
|
ID int `gorm:"primaryKey"`
|
|
Name string `gorm:"size:256"`
|
|
Login string `gorm:"size:256"`
|
|
Password string `gorm:"size:256"`
|
|
Email string `gorm:"size:256"`
|
|
AcceptedTermPolicy string `gorm:"size:1"`
|
|
Phone string `gorm:"size:256"`
|
|
Address string `gorm:"size:256"`
|
|
FunctionName string `gorm:"size:256"`
|
|
About string `gorm:"type:citext"`
|
|
AcceptedTermPolicyAt string `gorm:"size:20"`
|
|
AcceptedTermPolicyData string `gorm:"type:citext"`
|
|
FrontpageID int `gorm:"index"`
|
|
SystemUnitID int `gorm:"index"`
|
|
Active string `gorm:"size:1"`
|
|
CustomCode string `gorm:"size:256"`
|
|
OTPSecret string `gorm:"size:256"`
|
|
SystemUnit SystemUnit `gorm:"foreignKey:SystemUnitID"`
|
|
Frontpage SystemProgram `gorm:"foreignKey:FrontpageID"`
|
|
}
|
|
|
|
type SystemUserUnit struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemUserID int
|
|
SystemUnitID int
|
|
SystemUser SystemUser `gorm:"foreignKey:SystemUserID"`
|
|
SystemUnit SystemUnit `gorm:"foreignKey:SystemUnitID"`
|
|
}
|
|
|
|
type SystemUserGroup struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemUserID int
|
|
SystemGroupID int
|
|
SystemUser SystemUser `gorm:"foreignKey:SystemUserID"`
|
|
SystemGroup SystemGroup `gorm:"foreignKey:SystemGroupID"`
|
|
}
|
|
|
|
type SystemUserRole struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemUserID int
|
|
SystemRoleID int
|
|
SystemUser SystemUser `gorm:"foreignKey:SystemUserID"`
|
|
SystemRole SystemRole `gorm:"foreignKey:SystemRoleID"`
|
|
}
|
|
|
|
type SystemGroupProgram struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemGroupID int
|
|
SystemProgramID int
|
|
SystemGroup SystemGroup `gorm:"foreignKey:SystemGroupID"`
|
|
SystemProgram SystemProgram `gorm:"foreignKey:SystemProgramID"`
|
|
}
|
|
|
|
type SystemUserProgram struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemUserID int
|
|
SystemProgramID int
|
|
SystemUser SystemUser `gorm:"foreignKey:SystemUserID"`
|
|
SystemProgram SystemProgram `gorm:"foreignKey:SystemProgramID"`
|
|
}
|
|
|
|
type SystemUserOldPassword struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemUserID int
|
|
Password string `gorm:"size:256"`
|
|
CreatedAt string `gorm:"size:20"`
|
|
SystemUser SystemUser `gorm:"foreignKey:SystemUserID"`
|
|
}
|
|
|
|
type SystemProgramMethodRole struct {
|
|
ID int `gorm:"primaryKey"`
|
|
SystemProgramID int
|
|
SystemRoleID int
|
|
MethodName string `gorm:"size:256"`
|
|
SystemProgram SystemProgram `gorm:"foreignKey:SystemProgramID"`
|
|
SystemRole SystemRole `gorm:"foreignKey:SystemRoleID"`
|
|
}
|