Documentation ¶
Index ¶
Constants ¶
View Source
const EMAIL_REGEX = `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`
View Source
const MAX_CITY_SIZE = 32
View Source
const MAX_FNAME_SIZE = 50
View Source
const MAX_INTITIALS_SIZE = 2
View Source
const MAX_LNAME_SIZE = 50
View Source
const MAX_NAME_SIZE = 255
View Source
const MAX_PASSWORD_SIZE = 16
View Source
const MAX_STATE_SIZE = 32
View Source
const MAX_STREETNAME_SIZE = 120
View Source
const MAX_STREETNUM_SIZE = 8
View Source
const MAX_SUITE_SIZE = 8
View Source
const MAX_USERNAME_SIZE = 16
View Source
const MAX_ZIP_SIZE = 5
View Source
const MIN_FNAME_SIZE = 2
View Source
const MIN_LNAME_SIZE = 2
View Source
const MIN_PASSWORD_SIZE = 8
View Source
const MIN_USERNAME_SIZE = 6
Variables ¶
View Source
var PHONE_FILTER = []string{"-", "(", ")", " "}
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { gorm.Model StreetNumber string StreetName string Suite string City string State string ZipCode string }
func (*Address) IsValidAddr ¶
type Company ¶
type Company struct { gorm.Model Name string Alias string AddressID uint Address Address Departments []Department }
func NewCompany ¶
type Department ¶
func NewDepartment ¶
func NewDepartment(name string, companyID uint) *Department
func (*Department) BeforeCreate ¶
func (d *Department) BeforeCreate(tx *gorm.DB) error
type User ¶
type User struct { gorm.Model FirstName string LastName string MiddleInitials string Username string `gorm:"unique"` Password string Email string Phone string Role Role CompanyID uint Company Company DepartmentID uint Department Department UpdatedAt time.Time CreatedAt time.Time DeletedAt gorm.DeletedAt }
func (*User) CheckPassword ¶
Click to show internal directories.
Click to hide internal directories.