Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Org ¶
type Org struct {
Id int64 `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Code string `json:"code" db:"code"`
Description string `json:"description" db:"description"`
Domain string `json:"domain" db:"domain"`
Logo string `json:"logo" db:"logo"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type User ¶
type User struct {
Id int64 `json:"id" db:"id"`
FirstName string `json:"first_name" db:"first_name"`
LastName string `json:"last_name" db:"last_name"`
Code string `json:"code" db:"code"`
Email string `json:"email" db:"email"`
Phone string `json:"phone" db:"phone"`
Status UserStatus `json:"status" db:"status"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type UserOrg ¶
type UserOrg struct {
Id int64 `json:"id" db:"id"`
UserId int64 `json:"user_id" db:"user_id"`
OrgId int64 `json:"org_id" db:"org_id"`
Role UserOrgRole `json:"role" db:"role"`
Status UserStatus `json:"status" db:"status"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type UserOrgRole ¶
type UserOrgRole string
const ( UserRoleOwner UserOrgRole = "owner" UserRoleManager UserOrgRole = "manager" UserRoleEditor UserOrgRole = "editor" UserRoleViewer UserOrgRole = "viewer" UserRoleGuest UserOrgRole = "guest" )
type UserStatus ¶
type UserStatus string
const ( UserStatusActive UserStatus = "active" UserStatusDeactivated UserStatus = "deactivated" UserStatusBanned UserStatus = "banned" // user org UserStatusInvited UserStatus = "invited" )
type UserWithRoles ¶
func (UserWithRoles) GetOrgIds ¶
func (u UserWithRoles) GetOrgIds() []int64
Click to show internal directories.
Click to hide internal directories.