Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Service handles operations on model Staff.
Service *serviceProvider
)
Functions ¶
func CreateAdminStaff ¶
func CreateAdminStaff(conn orm.Connection) error
Types ¶
type Permission ¶
type Permission struct { URL string `gorm:"primary_key" sql:"type:varchar(255) not null default ''"` RoleId int16 `gorm:"column:roleid;primary_key" sql:"type:smallint(5) not null default 0"` Created *time.Time }
Permission represents permission of URL.
func (Permission) TableName ¶
func (Permission) TableName() string
TableName returns table name in database.
type Relation ¶
type Relation struct { StaffId int32 `gorm:"column:staffid;primary_key" sql:"type:int(11) not null default 0"` RoleId int16 `gorm:"column:roleid;primary_key" sql:"type:smallint(5) not null default 0"` Created *time.Time }
Staff role relation table.
type Role ¶
type Staff ¶
type Staff struct { Id int32 `gorm:"primary_key;auto_increment"` Name string `gorm:"type:varchar(30);unique"` Pwd string `gorm:"type:varchar(127);not null;default ''"` RealName string `gorm:"column:realname;type:varchar(255);not null;default ''"` Mobile string `gorm:"unique"` Email string `gorm:"type:varchar(80);unique"` CreatedAt *time.Time `gorm:"column:createdat"` ResignAt *time.Time `gorm:"column:resignat"` Male bool Active bool Resigned bool }
Click to show internal directories.
Click to hide internal directories.