Documentation
¶
Index ¶
- type CustomUser
- func (u *CustomUser) GetCompanyInfo() (string, string)
- func (u *CustomUser) GetEmail() string
- func (u *CustomUser) GetFullName() string
- func (u *CustomUser) GetID() uuid.UUID
- func (u *CustomUser) GetLastLoginAt() *time.Time
- func (u *CustomUser) GetMetadata() map[string]any
- func (u *CustomUser) GetPasswordHash() string
- func (u *CustomUser) GetPhoneNumber() string
- func (u *CustomUser) GetUsername() string
- func (u *CustomUser) IsActive() bool
- type CustomUserFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomUser ¶
type CustomUser struct {
models.User // Embed base user model
FirstName string
LastName string
DateOfBirth *time.Time
Address string
CompanyName string
Department string
Role string
}
CustomUser extends the base user model with additional fields
func (*CustomUser) GetCompanyInfo ¶
func (u *CustomUser) GetCompanyInfo() (string, string)
GetCompanyInfo is a custom method specific to CustomUser
func (*CustomUser) GetEmail ¶
func (u *CustomUser) GetEmail() string
GetEmail implements interfaces.User
func (*CustomUser) GetFullName ¶
func (u *CustomUser) GetFullName() string
GetFullName is a custom method specific to CustomUser
func (*CustomUser) GetLastLoginAt ¶
func (u *CustomUser) GetLastLoginAt() *time.Time
GetLastLoginAt implements interfaces.User
func (*CustomUser) GetMetadata ¶
func (u *CustomUser) GetMetadata() map[string]any
GetMetadata implements interfaces.User
func (*CustomUser) GetPasswordHash ¶
func (u *CustomUser) GetPasswordHash() string
GetPasswordHash implements interfaces.User
func (*CustomUser) GetPhoneNumber ¶
func (u *CustomUser) GetPhoneNumber() string
GetPhoneNumber implements interfaces.User
func (*CustomUser) GetUsername ¶
func (u *CustomUser) GetUsername() string
GetUsername implements interfaces.User
func (*CustomUser) IsActive ¶
func (u *CustomUser) IsActive() bool
IsActive implements interfaces.User
type CustomUserFactory ¶
type CustomUserFactory struct{}
CustomUserFactory creates instances of CustomUser
func NewCustomUserFactory ¶
func NewCustomUserFactory() *CustomUserFactory
NewCustomUserFactory creates a new CustomUserFactory
func (*CustomUserFactory) GetSchema ¶
func (f *CustomUserFactory) GetSchema() any
GetSchema implements interfaces.UserRepositoryFactory
func (*CustomUserFactory) GetTableName ¶
func (f *CustomUserFactory) GetTableName() string
GetTableName implements interfaces.UserRepositoryFactory
func (*CustomUserFactory) NewUser ¶
func (f *CustomUserFactory) NewUser() interfaces.User
NewUser implements interfaces.UserRepositoryFactory