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 { // User indetifier number Id int64 `json:"id" db:"id" example:"1"` // User first name FirstName string `json:"first_name" db:"first_name" example:"Dzung"` // User last name LastName string `json:"last_name" db:"last_name" example:"Tran"` // User last name Code string `json:"code" db:"code" example:"95a8d1aa-xxx-xxx-0c15d41"` Email string `json:"email" db:"email" example:"email@api.com"` Phone string `json:"phone" db:"phone" example:"+84 0986415xxxx"` Status UserStatus `json:"status" db:"status" example:"active" enums:"active,deactivated,banned"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
User domain info @Description User account information
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" example:"owner" enums:"owner,manager,editor,viewer,guest"` Status UserStatus `json:"status" db:"status" example:"active" enums:"active"` 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.