Documentation
¶
Index ¶
- Constants
- type User
- func (u *User) Delete(ctx context.Context, db bun.IDB) error
- func (user *User) FullName() string
- func (u User) GetCursor() string
- func (u User) GetSortField() string
- func (u User) GetSortValue() interface{}
- func (u User) GetUniqueField() string
- func (u User) GetUniqueValue() interface{}
- func (user *User) HasEmail() bool
- func (user *User) HasPhoneNumber() bool
- func (u *User) Insert(ctx context.Context, db bun.IDB) error
- func (u *User) Update(ctx context.Context, db bun.IDB) error
- func (user *User) UpdateLocale(locale string) error
- func (u *User) Validate() error
Constants ¶
View Source
const ( ValidateCodeAttempts = 10 DefaultLocale = types.Locale("es-MX") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
bun.BaseModel `bun:"table:users"`
ID int64 `bun:",pk,autoincrement" json:"id"`
Name string `json:"name"`
LastName string `json:"last_name"`
Email string `json:"email"`
PhoneNumber string `json:"phone_number"`
Locale types.Locale `json:"locale"`
CodeAttempts int `json:"-"`
}
func (User) GetSortField ¶
func (User) GetSortValue ¶
func (u User) GetSortValue() interface{}
func (User) GetUniqueField ¶
func (User) GetUniqueValue ¶
func (u User) GetUniqueValue() interface{}
func (*User) HasPhoneNumber ¶
func (*User) UpdateLocale ¶
Click to show internal directories.
Click to hide internal directories.