Documentation
¶
Index ¶
Constants ¶
View Source
const TableRole = "roles"
TableRole Table name
View Source
const TableUser = "users"
TableUser Table name
View Source
const TableUserRole = "user_roles"
TableUserRole Table name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct {
// Table meta data
MetaData mb.MetaData `db:"-" model:"table:roles"`
// Table fields
ID int `db:"id" model:"name:id; type:serial,primary"`
Name string `db:"name" model:"name:name"`
Slug types.Role `db:"slug" model:"name:slug"`
CreatedAt time.Time `db:"created_at" model:"name:created_at"`
UpdatedAt sql.NullTime `db:"updated_at" model:"name:updated_at"`
}
Role struct to describe a role object.
type User ¶
type User struct {
// Table meta data
MetaData mb.MetaData `db:"-" model:"table:users"`
// Table fields
ID int `db:"id" model:"name:id; type:serial,primary"`
Email string `db:"email" model:"name:email"`
Password string `db:"password" model:"name:password"`
Fullname string `db:"fullname" model:"name:fullname"`
Phone string `db:"phone" model:"name:phone"`
Token sql.NullString `db:"token" model:"name:token"`
Status types.UserStatus `db:"status" model:"name:status"`
CreatedAt time.Time `db:"created_at" model:"name:created_at"`
Avatar sql.NullString `db:"avatar" model:"name:avatar"`
UpdatedAt time.Time `db:"updated_at" model:"name:updated_at"`
VerifiedAt sql.NullTime `db:"verified_at" model:"name:verified_at"`
BlockedAt sql.NullTime `db:"blocked_at" model:"name:blocked_at"`
DeletedAt sql.NullTime `db:"deleted_at" model:"name:deleted_at"`
LastAccessAt sql.NullTime `db:"last_access_at" model:"name:last_access_at"`
}
User struct to describe a user object.
type UserRole ¶
type UserRole struct {
// Table meta data
MetaData mb.MetaData `db:"-" model:"table:user_roles"`
// Table fields
ID int `db:"id" model:"name:id; type:int,primary"`
RoleID int `db:"role_id" model:"name:role_id; type:int"`
UserID int `db:"user_id" model:"name:user_id; type:int"`
CreatedAt time.Time `db:"created_at" model:"name:created_at"`
}
UserRole struct to describe a user role object.
Click to show internal directories.
Click to hide internal directories.