Documentation
¶
Index ¶
Constants ¶
View Source
const (
// RoleSuperAdmin is the highest role in the app
RoleSuperAdmin = "Super Admin"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Company ¶
type Company struct { ID int Username string `max:"16"` Name string `max:"32"` Status CompanyStatus }
Company is used to contains company data
type CompanyDetail ¶
type CompanyDetail struct { ID int CompanyID int Address *string `max:"128"` City *string `max:"64"` Province *string `max:"32"` Postal *string `max:"5"` Lat *float64 Lon *float64 PhoneNumber *string `max:"16"` WhatsApp *string `max:"16"` Email *string `max:"48"` Website *string `max:"64"` Twitter *string `max:"48"` Facebook *string `max:"48"` }
CompanyDetail contains details of a company
type CompanyStatus ¶
type CompanyStatus int
CompanyStatus is used for listing paid tier of the company account
const ( // CompanyStatusFree is for free account CompanyStatusFree CompanyStatus = iota // CompanyStatusFreeAds is for free account with ads CompanyStatusFreeAds // CompanyStatusPaid01 is for paid account tier 01 CompanyStatusPaid01 )
func (CompanyStatus) String ¶
func (cs CompanyStatus) String() string
type Employee ¶
type Employee struct { CompanyID int ID int FullName string `max:"32"` Email string `max:"48"` PhoneNumber string `max:"16"` RoleID int Status EmployeeStatus }
Employee is used to contains employee data
type EmployeeRegister ¶
type EmployeeRegister struct { ID int EmployeeID int Email string `max:"48"` PhoneNumber string `max:"16"` OTPCode string `max:"64"` ExpiredAt time.Time }
EmployeeRegister is used to contains employee registration data
type EmployeeStatus ¶
type EmployeeStatus int
EmployeeStatus is used to indicate whether a role unvalidate, active, or inactive
const ( // EmployeeStatusUnverified is registered, but not yet verified EmployeeStatusUnverified EmployeeStatus = iota // EmployeeStatusInactive is inactive EmployeeStatusInactive // EmployeeStatusActive is active EmployeeStatusActive )
func (EmployeeStatus) String ¶
func (es EmployeeStatus) String() string
type Role ¶
type Role struct { CompanyID int ID int Name string `max:"16"` Status RoleStatus }
Role is used to contains role data
type RoleStatus ¶
type RoleStatus int
RoleStatus is used to indicate whether a role active or not
const ( // RoleStatusActive is active RoleStatusActive RoleStatus = iota // RoleStatusInactive is inactive RoleStatusInactive )
func (RoleStatus) String ¶
func (rs RoleStatus) String() string
Click to show internal directories.
Click to hide internal directories.