Documentation
¶
Index ¶
- Constants
- func RoleNoImageUrl() string
- func UserNoImageUrl() string
- type GroupInterface
- type GroupQueryInterface
- type NewStoreOptions
- type RoleInterface
- type RoleQueryInterface
- type StoreInterface
- type UserGroupInterface
- type UserGroupQueryInterface
- type UserInterface
- type UserQueryInterface
- type UserRoleInterface
- type UserRoleQueryInterface
Constants ¶
const COLUMN_BUSINESS_NAME = "business_name"
const COLUMN_COUNTRY = "country"
const COLUMN_CREATED_AT = "created_at"
const COLUMN_EMAIL = "email"
const COLUMN_FIRST_NAME = "first_name"
const COLUMN_GROUP_ID = "group_id"
const COLUMN_HANDLE = "handle"
const COLUMN_ID = "id"
const COLUMN_LAST_NAME = "last_name"
const COLUMN_MEMO = "memo"
const COLUMN_METAS = "metas"
const COLUMN_MIDDLE_NAMES = "middle_names"
const COLUMN_NAME = "name"
const COLUMN_PASSWORD = "password"
const COLUMN_PHONE = "phone"
const COLUMN_PROFILE_IMAGE_URL = "profile_image_url"
const COLUMN_ROLE = "role"
const COLUMN_ROLE_ID = "role_id"
const COLUMN_SOFT_DELETED_AT = "soft_deleted_at"
const COLUMN_STATUS = "status"
const COLUMN_TIMEZONE = "timezone"
const COLUMN_UPDATED_AT = "updated_at"
const COLUMN_USER_ID = "user_id"
const ERROR_EMPTY_ARRAY = "array cannot be empty"
const ERROR_EMPTY_STRING = "string cannot be empty"
const ERROR_NEGATIVE_NUMBER = "number cannot be negative"
const GROUP_STATUS_ACTIVE = "active"
const GROUP_STATUS_DELETED = "deleted"
const GROUP_STATUS_INACTIVE = "inactive"
const MAX_DATETIME = "9999-12-31 23:59:59"
MAX_DATETIME is a far-future datetime used as the default soft-delete sentinel.
const ROLE_STATUS_ACTIVE = "active"
const ROLE_STATUS_DELETED = "deleted"
const ROLE_STATUS_INACTIVE = "inactive"
const SORT_ORDER_ASC = "asc"
const SORT_ORDER_DESC = "desc"
const USER_ROLE_ADMINISTRATOR = "administrator"
const USER_ROLE_MANAGER = "manager"
const USER_ROLE_SUPERUSER = "superuser"
const USER_ROLE_USER = "user"
const USER_STATUS_ACTIVE = "active"
const USER_STATUS_DELETED = "deleted"
const USER_STATUS_INACTIVE = "inactive"
const USER_STATUS_UNVERIFIED = "unverified"
Variables ¶
This section is empty.
Functions ¶
func RoleNoImageUrl ¶
func RoleNoImageUrl() string
func UserNoImageUrl ¶
func UserNoImageUrl() string
Types ¶
type GroupInterface ¶ added in v1.20.0
type GroupInterface interface {
// Data returns all fields as a map
Data() map[string]string
// DataChanged returns the changed fields as a map
DataChanged() map[string]string
// MarkAsNotDirty marks all fields as not changed
MarkAsNotDirty()
// ToMap returns a DB-ready map of the group
ToMap() map[string]any
// IsActive returns true if the group is active
IsActive() bool
// IsInactive returns true if the group is inactive
IsInactive() bool
// IsSoftDeleted returns true if the group is soft deleted
IsSoftDeleted() bool
// GetCreatedAt returns the created at datetime
GetCreatedAt() string
// GetCreatedAtCarbon returns the created at datetime as carbon
GetCreatedAtCarbon() *carbon.Carbon
// SetCreatedAt sets the created at datetime
SetCreatedAt(createdAt string) GroupInterface
// GetHandle returns the handle
GetHandle() string
// SetHandle sets the handle
SetHandle(handle string) GroupInterface
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) GroupInterface
// GetName returns the name
GetName() string
// SetName sets the name
SetName(name string) GroupInterface
// GetMemo returns the memo
GetMemo() string
// SetMemo sets the memo
SetMemo(memo string) GroupInterface
// GetMeta returns the value of the meta with the given name
GetMeta(name string) string
// SetMeta sets the value of the meta with the given name
SetMeta(name string, value string) error
// GetMetas returns all metas
GetMetas() (map[string]string, error)
// SetMetas sets all metas, overwriting existing ones
SetMetas(metas map[string]string) error
// UpsertMetas merges the given metas with the existing ones
UpsertMetas(metas map[string]string) error
// GetStatus returns the status
GetStatus() string
// SetStatus sets the status
SetStatus(status string) GroupInterface
// GetSoftDeletedAt returns the soft deleted at datetime
GetSoftDeletedAt() string
// GetSoftDeletedAtCarbon returns the soft deleted at datetime as carbon
GetSoftDeletedAtCarbon() *carbon.Carbon
// SetSoftDeletedAt sets the soft deleted at datetime
SetSoftDeletedAt(softDeletedAt string) GroupInterface
// GetUpdatedAt returns the updated at datetime
GetUpdatedAt() string
// GetUpdatedAtCarbon returns the updated at datetime as carbon
GetUpdatedAtCarbon() *carbon.Carbon
// SetUpdatedAt sets the updated at datetime
SetUpdatedAt(updatedAt string) GroupInterface
}
GroupInterface defines the interface for a group
func NewGroup ¶ added in v1.20.0
func NewGroup() GroupInterface
func NewGroupFromExistingData ¶ added in v1.20.0
func NewGroupFromExistingData(data map[string]string) GroupInterface
type GroupQueryInterface ¶ added in v1.20.0
type GroupQueryInterface interface {
// Validate validates the query
Validate() error
// Columns returns the columns to return from the database
Columns() []string
// SetColumns sets the columns to return from the database
SetColumns(columns []string) GroupQueryInterface
// HasCountOnly returns true if the query is for counting only
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only
IsCountOnly() bool
// SetCountOnly sets the query to count only
SetCountOnly(countOnly bool) GroupQueryInterface
// HasHandle returns true if the query has a handle
HasHandle() bool
// Handle returns the handle
Handle() string
// SetHandle sets the handle
SetHandle(handle string) GroupQueryInterface
// HasID returns true if the query has an ID
HasID() bool
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) GroupQueryInterface
// HasIDIn returns true if the query has an ID in
HasIDIn() bool
// IDIn returns the ID in
IDIn() []string
// SetIDIn sets the ID in
SetIDIn(idIn []string) GroupQueryInterface
// HasLimit returns true if the query has a limit
HasLimit() bool
// Limit returns the limit
Limit() int
// SetLimit sets the limit
SetLimit(limit int) GroupQueryInterface
// HasOffset returns true if the query has an offset
HasOffset() bool
// Offset returns the offset
Offset() int
// SetOffset sets the offset
SetOffset(offset int) GroupQueryInterface
// HasOrderBy returns true if the query has an order by
HasOrderBy() bool
// OrderBy returns the order by
OrderBy() string
// SetOrderBy sets the order by
SetOrderBy(orderBy string) GroupQueryInterface
// HasSortDirection returns true if the query has a sort direction
HasSortDirection() bool
// SortDirection returns the sort direction
SortDirection() string
// SetSortDirection sets the sort direction
SetSortDirection(sortDirection string) GroupQueryInterface
// HasSoftDeletedIncluded returns true if the query has soft deleted included
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns the soft deleted included
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the soft deleted included
SetSoftDeletedIncluded(softDeletedIncluded bool) GroupQueryInterface
// HasStatus returns true if the query has a status
HasStatus() bool
// Status returns the status
Status() string
// SetStatus sets the status
SetStatus(status string) GroupQueryInterface
// HasTitleLike returns true if the query has a title like
HasTitleLike() bool
// TitleLike returns the title like
TitleLike() string
// SetTitleLike sets the title like
SetTitleLike(titleLike string) GroupQueryInterface
// contains filtered or unexported methods
}
GroupQueryInterface defines the interface for group queries
func NewGroupQuery ¶ added in v1.20.0
func NewGroupQuery() GroupQueryInterface
type NewStoreOptions ¶
type NewStoreOptions struct {
// Table names
UserTableName string
RolesEnabled bool
RoleTableName string
UserRoleTableName string
GroupsEnabled bool
GroupTableName string
UserGroupTableName string
// Database
DB *sql.DB
// Options
AutomigrateEnabled bool
DebugEnabled bool
}
NewStoreOptions define the options for creating a new user store
type RoleInterface ¶
type RoleInterface interface {
// Data returns all fields as a map
Data() map[string]string
// DataChanged returns the changed fields as a map
DataChanged() map[string]string
// MarkAsNotDirty marks all fields as not changed
MarkAsNotDirty()
// ToMap returns a DB-ready map of the role
ToMap() map[string]any
// IsActive returns true if the role is active
IsActive() bool
// IsInactive returns true if the role is inactive
IsInactive() bool
// IsSoftDeleted returns true if the role is soft deleted
IsSoftDeleted() bool
// GetCreatedAt returns the created at datetime
GetCreatedAt() string
// GetCreatedAtCarbon returns the created at datetime as carbon
GetCreatedAtCarbon() *carbon.Carbon
// SetCreatedAt sets the created at datetime
SetCreatedAt(createdAt string) RoleInterface
// GetHandle returns the handle
GetHandle() string
// SetHandle sets the handle
SetHandle(handle string) RoleInterface
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) RoleInterface
// GetName returns the name
GetName() string
// SetName sets the name
SetName(name string) RoleInterface
// GetMemo returns the memo
GetMemo() string
// SetMemo sets the memo
SetMemo(memo string) RoleInterface
// GetMeta returns the value of the meta with the given name
GetMeta(name string) string
// SetMeta sets the value of the meta with the given name
SetMeta(name string, value string) error
// GetMetas returns all metas
GetMetas() (map[string]string, error)
// SetMetas sets all metas, overwriting existing ones
SetMetas(metas map[string]string) error
// GetStatus returns the status
GetStatus() string
// SetStatus sets the status
SetStatus(status string) RoleInterface
// GetSoftDeletedAt returns the soft deleted at datetime
GetSoftDeletedAt() string
// GetSoftDeletedAtCarbon returns the soft deleted at datetime as carbon
GetSoftDeletedAtCarbon() *carbon.Carbon
// SetSoftDeletedAt sets the soft deleted at datetime
SetSoftDeletedAt(softDeletedAt string) RoleInterface
// GetUpdatedAt returns the updated at datetime
GetUpdatedAt() string
// GetUpdatedAtCarbon returns the updated at datetime as carbon
GetUpdatedAtCarbon() *carbon.Carbon
// SetUpdatedAt sets the updated at datetime
SetUpdatedAt(updatedAt string) RoleInterface
}
RoleInterface defines the interface for a role
func NewRole ¶
func NewRole() RoleInterface
func NewRoleFromExistingData ¶
func NewRoleFromExistingData(data map[string]string) RoleInterface
type RoleQueryInterface ¶
type RoleQueryInterface interface {
// Validate validates the query
Validate() error
// Columns returns the columns to retrurn from the database
Columns() []string
// SetColumns sets the columns to retrurn from the database
SetColumns(columns []string) RoleQueryInterface
// HasCountOnly returns true if the query is for counting only
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only
IsCountOnly() bool
// SetCountOnly sets the query to count only
SetCountOnly(countOnly bool) RoleQueryInterface
// HasHandle returns true if the query has a handle
HasHandle() bool
// Handle returns the handle
Handle() string
// SetHandle sets the handle
SetHandle(handle string) RoleQueryInterface
// HasID returns true if the query has an ID
HasID() bool
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) RoleQueryInterface
// HasIDIn returns true if the query has an ID in
HasIDIn() bool
// IDIn returns the ID in
IDIn() []string
// SetIDIn sets the ID in
SetIDIn(idIn []string) RoleQueryInterface
// HasLimit returns true if the query has a limit
HasLimit() bool
// Limit returns the limit
Limit() int
// SetLimit sets the limit
SetLimit(limit int) RoleQueryInterface
// HasOffset returns true if the query has an offset
HasOffset() bool
// Offset returns the offset
Offset() int
// SetOffset sets the offset
SetOffset(offset int) RoleQueryInterface
// HasOrderBy returns true if the query has an order by
HasOrderBy() bool
// OrderBy returns the order by
OrderBy() string
// SetOrderBy sets the order by
SetOrderBy(orderBy string) RoleQueryInterface
// HasSortDirection returns true if the query has a sort direction
HasSortDirection() bool
// SortDirection returns the sort direction
SortDirection() string
// SetSortDirection sets the sort direction
SetSortDirection(sortDirection string) RoleQueryInterface
// HasSoftDeletedIncluded returns true if the query has soft deleted included
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns the soft deleted included
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the soft deleted included
SetSoftDeletedIncluded(softDeletedIncluded bool) RoleQueryInterface
// HasStatus returns true if the query has a status
HasStatus() bool
// Status returns the status
Status() string
// SetStatus sets the status
SetStatus(status string) RoleQueryInterface
// HasTitleLike returns true if the query has a title like
HasTitleLike() bool
// TitleLike returns the title like
TitleLike() string
// SetTitleLike sets the title like
SetTitleLike(titleLike string) RoleQueryInterface
// contains filtered or unexported methods
}
RoleQueryInterface defines the interface for role queries
func NewRoleQuery ¶
func NewRoleQuery() RoleQueryInterface
type StoreInterface ¶
type StoreInterface interface {
// contains filtered or unexported methods
}
StoreInterface defines the interface for the user store
func NewStore ¶
func NewStore(opts NewStoreOptions) (StoreInterface, error)
NewStore creates a new user store
type UserGroupInterface ¶ added in v1.20.0
type UserGroupInterface interface {
// Data returns all fields as a map
Data() map[string]string
// DataChanged returns the changed fields as a map
DataChanged() map[string]string
// MarkAsNotDirty marks all fields as not changed
MarkAsNotDirty()
// ToMap returns a DB-ready map of the user group
ToMap() map[string]any
// IsSoftDeleted returns true if the user group is soft deleted
IsSoftDeleted() bool
// GetCreatedAt returns the created at datetime
GetCreatedAt() string
// GetCreatedAtCarbon returns the created at datetime as carbon
GetCreatedAtCarbon() *carbon.Carbon
// SetCreatedAt sets the created at datetime
SetCreatedAt(createdAt string) UserGroupInterface
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserGroupInterface
// GetUserID returns the user ID
GetUserID() string
// SetUserID sets the user ID
SetUserID(userID string) UserGroupInterface
// GetGroupID returns the group ID
GetGroupID() string
// SetGroupID sets the group ID
SetGroupID(groupID string) UserGroupInterface
// GetSoftDeletedAt returns the soft deleted at datetime
GetSoftDeletedAt() string
// GetSoftDeletedAtCarbon returns the soft deleted at datetime as carbon
GetSoftDeletedAtCarbon() *carbon.Carbon
// SetSoftDeletedAt sets the soft deleted at datetime
SetSoftDeletedAt(softDeletedAt string) UserGroupInterface
// GetUpdatedAt returns the updated at datetime
GetUpdatedAt() string
// GetUpdatedAtCarbon returns the updated at datetime as carbon
GetUpdatedAtCarbon() *carbon.Carbon
// SetUpdatedAt sets the updated at datetime
SetUpdatedAt(updatedAt string) UserGroupInterface
}
UserGroupInterface defines the interface for a user group membership
func NewUserGroup ¶ added in v1.20.0
func NewUserGroup() UserGroupInterface
func NewUserGroupFromExistingData ¶ added in v1.20.0
func NewUserGroupFromExistingData(data map[string]string) UserGroupInterface
type UserGroupQueryInterface ¶ added in v1.20.0
type UserGroupQueryInterface interface {
// Validate validates the query
Validate() error
// Columns returns the columns to return from the database
Columns() []string
// SetColumns sets the columns to return from the database
SetColumns(columns []string) UserGroupQueryInterface
// HasCountOnly returns true if the query is for counting only
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only
IsCountOnly() bool
// SetCountOnly sets the query to count only
SetCountOnly(countOnly bool) UserGroupQueryInterface
// HasID returns true if the query has an ID
HasID() bool
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserGroupQueryInterface
// HasIDIn returns true if the query has an ID in
HasIDIn() bool
// IDIn returns the ID in
IDIn() []string
// SetIDIn sets the ID in
SetIDIn(idIn []string) UserGroupQueryInterface
// HasUserID returns true if the query has a user ID
HasUserID() bool
// UserID returns the user ID
UserID() string
// SetUserID sets the user ID
SetUserID(userID string) UserGroupQueryInterface
// HasUserIDIn returns true if the query has a user ID in
HasUserIDIn() bool
// UserIDIn returns the user ID in
UserIDIn() []string
// SetUserIDIn sets the user ID in
SetUserIDIn(userIDIn []string) UserGroupQueryInterface
// HasGroupID returns true if the query has a group ID
HasGroupID() bool
// GroupID returns the group ID
GroupID() string
// SetGroupID sets the group ID
SetGroupID(groupID string) UserGroupQueryInterface
// HasGroupIDIn returns true if the query has a group ID in
HasGroupIDIn() bool
// GroupIDIn returns the group ID in
GroupIDIn() []string
// SetGroupIDIn sets the group ID in
SetGroupIDIn(groupIDIn []string) UserGroupQueryInterface
// HasLimit returns true if the query has a limit
HasLimit() bool
// Limit returns the limit
Limit() int
// SetLimit sets the limit
SetLimit(limit int) UserGroupQueryInterface
// HasOffset returns true if the query has an offset
HasOffset() bool
// Offset returns the offset
Offset() int
// SetOffset sets the offset
SetOffset(offset int) UserGroupQueryInterface
// HasOrderBy returns true if the query has an order by
HasOrderBy() bool
// OrderBy returns the order by
OrderBy() string
// SetOrderBy sets the order by
SetOrderBy(orderBy string) UserGroupQueryInterface
// HasSortDirection returns true if the query has a sort direction
HasSortDirection() bool
// SortDirection returns the sort direction
SortDirection() string
// SetSortDirection sets the sort direction
SetSortDirection(sortDirection string) UserGroupQueryInterface
// HasSoftDeletedIncluded returns true if the query has soft deleted included
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns the soft deleted included
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the soft deleted included
SetSoftDeletedIncluded(softDeletedIncluded bool) UserGroupQueryInterface
// contains filtered or unexported methods
}
UserGroupQueryInterface defines the interface for user group queries
func NewUserGroupQuery ¶ added in v1.20.0
func NewUserGroupQuery() UserGroupQueryInterface
type UserInterface ¶
type UserInterface interface {
// Data returns all fields as a map
Data() map[string]string
// DataChanged returns the changed fields as a map
DataChanged() map[string]string
// MarkAsNotDirty marks all fields as not changed
MarkAsNotDirty()
// Get returns the value of the specified column
Get(columnName string) string
// Set sets the value of the specified column
Set(columnName string, value string)
// ToMap returns a DB-ready map of the user
ToMap() map[string]any
// IsActive returns true if the user is active
IsActive() bool
// IsInactive returns true if the user is inactive
IsInactive() bool
// IsSoftDeleted returns true if the user is soft deleted
IsSoftDeleted() bool
// IsUnverified returns true if the user is unverified
IsUnverified() bool
// IsAdministrator returns true if the user has the administrator role
IsAdministrator() bool
// IsManager returns true if the user has the manager role
IsManager() bool
// IsSuperuser returns true if the user has the superuser role
IsSuperuser() bool
// IsRegistrationCompleted returns true if the user has completed registration
IsRegistrationCompleted() bool
// GetBusinessName returns the business name
GetBusinessName() string
// SetBusinessName sets the business name
SetBusinessName(businessName string) UserInterface
// GetCountry returns the country
GetCountry() string
// SetCountry sets the country
SetCountry(country string) UserInterface
// GetCreatedAt returns the created at datetime
GetCreatedAt() string
// GetCreatedAtCarbon returns the created at datetime as carbon
GetCreatedAtCarbon() *carbon.Carbon
// SetCreatedAt sets the created at datetime
SetCreatedAt(createdAt string) UserInterface
// GetEmail returns the email
GetEmail() string
// SetEmail sets the email
SetEmail(email string) UserInterface
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserInterface
// GetFirstName returns the first name
GetFirstName() string
// SetFirstName sets the first name
SetFirstName(firstName string) UserInterface
// GetLastName returns the last name
GetLastName() string
// SetLastName sets the last name
SetLastName(lastName string) UserInterface
// GetMemo returns the memo
GetMemo() string
// SetMemo sets the memo
SetMemo(memo string) UserInterface
// GetMeta returns the value of the meta with the given name
GetMeta(name string) string
// SetMeta sets the value of the meta with the given name
SetMeta(name string, value string) error
// GetMetas returns all metas
GetMetas() (map[string]string, error)
// SetMetas sets all metas, overwriting existing ones
SetMetas(metas map[string]string) error
// UpsertMetas merges the given metas with the existing ones
UpsertMetas(metas map[string]string) error
// GetMiddleNames returns the middle names
GetMiddleNames() string
// SetMiddleNames sets the middle names
SetMiddleNames(middleNames string) UserInterface
// GetPassword returns the password hash
GetPassword() string
// PasswordCompare compares the given password with the stored hash
PasswordCompare(password string) bool
// SetPassword sets the password hash
SetPassword(password string) UserInterface
// SetPasswordAndHash hashes and sets the given plain text password
SetPasswordAndHash(password string) error
// GetPhone returns the phone
GetPhone() string
// SetPhone sets the phone
SetPhone(phone string) UserInterface
// GetProfileImageUrl returns the profile image URL
GetProfileImageUrl() string
// ProfileImageOrDefaultUrl returns the profile image URL or the default URL
ProfileImageOrDefaultUrl() string
// SetProfileImageUrl sets the profile image URL
SetProfileImageUrl(profileImageUrl string) UserInterface
// GetRole returns the role
GetRole() string
// SetRole sets the role
SetRole(role string) UserInterface
// GetSoftDeletedAt returns the soft deleted at datetime
GetSoftDeletedAt() string
// GetSoftDeletedAtCarbon returns the soft deleted at datetime as carbon
GetSoftDeletedAtCarbon() *carbon.Carbon
// SetSoftDeletedAt sets the soft deleted at datetime
SetSoftDeletedAt(deletedAt string) UserInterface
// GetTimezone returns the timezone
GetTimezone() string
// SetTimezone sets the timezone
SetTimezone(timezone string) UserInterface
// GetStatus returns the status
GetStatus() string
// SetStatus sets the status
SetStatus(status string) UserInterface
// GetUpdatedAt returns the updated at datetime
GetUpdatedAt() string
// GetUpdatedAtCarbon returns the updated at datetime as carbon
GetUpdatedAtCarbon() *carbon.Carbon
// SetUpdatedAt sets the updated at datetime
SetUpdatedAt(updatedAt string) UserInterface
}
UserInterface defines the interface for a user
func NewUser ¶
func NewUser() UserInterface
func NewUserFromExistingData ¶
func NewUserFromExistingData(data map[string]string) UserInterface
type UserQueryInterface ¶
type UserQueryInterface interface {
// Validate validates the query
Validate() error
// Columns returns the columns to return from the database
Columns() []string
// SetColumns sets the columns to return from the database
SetColumns(columns []string) UserQueryInterface
// HasCountOnly returns true if the query is for counting only
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only
IsCountOnly() bool
// SetCountOnly sets the query to count only
SetCountOnly(countOnly bool) UserQueryInterface
// HasCreatedAtGte returns true if the query has a created at greater than or equal to
HasCreatedAtGte() bool
// CreatedAtGte returns the created at greater than or equal to
CreatedAtGte() string
// SetCreatedAtGte sets the created at greater than or equal to
SetCreatedAtGte(createdAtGte string) UserQueryInterface
// HasCreatedAtLte returns true if the query has a created at less than or equal to
HasCreatedAtLte() bool
// CreatedAtLte returns the created at less than or equal to
CreatedAtLte() string
// SetCreatedAtLte sets the created at less than or equal to
SetCreatedAtLte(createdAtLte string) UserQueryInterface
// HasEmail returns true if the query has an email
HasEmail() bool
// Email returns the email
Email() string
// SetEmail sets the email
SetEmail(email string) UserQueryInterface
// HasEmailLike returns true if the query has an email like
HasEmailLike() bool
// EmailLike returns the email like
EmailLike() string
// SetEmailLike sets the email like
SetEmailLike(emailLike string) UserQueryInterface
// HasFirstName returns true if the query has a first name
HasFirstName() bool
// FirstName returns the first name
FirstName() string
// SetFirstName sets the first name
SetFirstName(firstName string) UserQueryInterface
// HasFirstNameLike returns true if the query has a first name like
HasFirstNameLike() bool
// FirstNameLike returns the first name like
FirstNameLike() string
// SetFirstNameLike sets the first name like
SetFirstNameLike(firstNameLike string) UserQueryInterface
// HasLastName returns true if the query has a last name
HasLastName() bool
// LastName returns the last name
LastName() string
// SetLastName sets the last name
SetLastName(lastName string) UserQueryInterface
// HasLastNameLike returns true if the query has a last name like
HasLastNameLike() bool
// LastNameLike returns the last name like
LastNameLike() string
// SetLastNameLike sets the last name like
SetLastNameLike(lastNameLike string) UserQueryInterface
// HasID returns true if the query has an ID
HasID() bool
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserQueryInterface
// HasIDIn returns true if the query has an ID in
HasIDIn() bool
// IDIn returns the ID in
IDIn() []string
// SetIDIn sets the ID in
SetIDIn(idIn []string) UserQueryInterface
// HasMetaLike returns true if the query has a meta like
HasMetaLike() bool
// MetaLike returns the meta like
MetaLike() string
// SetMetaLike sets the meta like
SetMetaLike(metaLike string) UserQueryInterface
// HasLimit returns true if the query has a limit
HasLimit() bool
// Limit returns the limit
Limit() int
// SetLimit sets the limit
SetLimit(limit int) UserQueryInterface
// HasOffset returns true if the query has an offset
HasOffset() bool
// Offset returns the offset
Offset() int
// SetOffset sets the offset
SetOffset(offset int) UserQueryInterface
// HasOrderBy returns true if the query has an order by
HasOrderBy() bool
// OrderBy returns the order by
OrderBy() string
// SetOrderBy sets the order by
SetOrderBy(orderBy string) UserQueryInterface
// HasSortDirection returns true if the query has a sort direction
HasSortDirection() bool
// SortDirection returns the sort direction
SortDirection() string
// SetSortDirection sets the sort direction
SetSortDirection(sortDirection string) UserQueryInterface
// HasSoftDeletedIncluded returns true if the query has soft deleted included
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns the soft deleted included
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the soft deleted included
SetSoftDeletedIncluded(softDeletedIncluded bool) UserQueryInterface
// HasStatus returns true if the query has a status
HasStatus() bool
// Status returns the status
Status() string
// SetStatus sets the status
SetStatus(status string) UserQueryInterface
// HasStatusIn returns true if the query has a status in
HasStatusIn() bool
// StatusIn returns the status in
StatusIn() []string
// SetStatusIn sets the status in
SetStatusIn(statusIn []string) UserQueryInterface
// contains filtered or unexported methods
}
func NewUserQuery ¶
func NewUserQuery() UserQueryInterface
type UserRoleInterface ¶ added in v1.20.0
type UserRoleInterface interface {
// Data returns all fields as a map
Data() map[string]string
// DataChanged returns the changed fields as a map
DataChanged() map[string]string
// MarkAsNotDirty marks all fields as not changed
MarkAsNotDirty()
// ToMap returns a DB-ready map of the user role
ToMap() map[string]any
// IsSoftDeleted returns true if the user role is soft deleted
IsSoftDeleted() bool
// GetCreatedAt returns the created at datetime
GetCreatedAt() string
// GetCreatedAtCarbon returns the created at datetime as carbon
GetCreatedAtCarbon() *carbon.Carbon
// SetCreatedAt sets the created at datetime
SetCreatedAt(createdAt string) UserRoleInterface
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserRoleInterface
// GetUserID returns the user ID
GetUserID() string
// SetUserID sets the user ID
SetUserID(userID string) UserRoleInterface
// GetRoleID returns the role ID
GetRoleID() string
// SetRoleID sets the role ID
SetRoleID(roleID string) UserRoleInterface
// GetSoftDeletedAt returns the soft deleted at datetime
GetSoftDeletedAt() string
// GetSoftDeletedAtCarbon returns the soft deleted at datetime as carbon
GetSoftDeletedAtCarbon() *carbon.Carbon
// SetSoftDeletedAt sets the soft deleted at datetime
SetSoftDeletedAt(softDeletedAt string) UserRoleInterface
// GetUpdatedAt returns the updated at datetime
GetUpdatedAt() string
// GetUpdatedAtCarbon returns the updated at datetime as carbon
GetUpdatedAtCarbon() *carbon.Carbon
// SetUpdatedAt sets the updated at datetime
SetUpdatedAt(updatedAt string) UserRoleInterface
}
UserRoleInterface defines the interface for a user role assignment
func NewUserRole ¶ added in v1.20.0
func NewUserRole() UserRoleInterface
func NewUserRoleFromExistingData ¶ added in v1.20.0
func NewUserRoleFromExistingData(data map[string]string) UserRoleInterface
type UserRoleQueryInterface ¶ added in v1.20.0
type UserRoleQueryInterface interface {
// Validate validates the query
Validate() error
// Columns returns the columns to return from the database
Columns() []string
// SetColumns sets the columns to return from the database
SetColumns(columns []string) UserRoleQueryInterface
// HasCountOnly returns true if the query is for counting only
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only
IsCountOnly() bool
// SetCountOnly sets the query to count only
SetCountOnly(countOnly bool) UserRoleQueryInterface
// HasID returns true if the query has an ID
HasID() bool
// GetID returns the ID
GetID() string
// SetID sets the ID
SetID(id string) UserRoleQueryInterface
// HasIDIn returns true if the query has an ID in
HasIDIn() bool
// IDIn returns the ID in
IDIn() []string
// SetIDIn sets the ID in
SetIDIn(idIn []string) UserRoleQueryInterface
// HasUserID returns true if the query has a user ID
HasUserID() bool
// UserID returns the user ID
UserID() string
// SetUserID sets the user ID
SetUserID(userID string) UserRoleQueryInterface
// HasUserIDIn returns true if the query has a user ID in
HasUserIDIn() bool
// UserIDIn returns the user ID in
UserIDIn() []string
// SetUserIDIn sets the user ID in
SetUserIDIn(userIDIn []string) UserRoleQueryInterface
// HasRoleID returns true if the query has a role ID
HasRoleID() bool
// RoleID returns the role ID
RoleID() string
// SetRoleID sets the role ID
SetRoleID(roleID string) UserRoleQueryInterface
// HasRoleIDIn returns true if the query has a role ID in
HasRoleIDIn() bool
// RoleIDIn returns the role ID in
RoleIDIn() []string
// SetRoleIDIn sets the role ID in
SetRoleIDIn(roleIDIn []string) UserRoleQueryInterface
// HasLimit returns true if the query has a limit
HasLimit() bool
// Limit returns the limit
Limit() int
// SetLimit sets the limit
SetLimit(limit int) UserRoleQueryInterface
// HasOffset returns true if the query has an offset
HasOffset() bool
// Offset returns the offset
Offset() int
// SetOffset sets the offset
SetOffset(offset int) UserRoleQueryInterface
// HasOrderBy returns true if the query has an order by
HasOrderBy() bool
// OrderBy returns the order by
OrderBy() string
// SetOrderBy sets the order by
SetOrderBy(orderBy string) UserRoleQueryInterface
// HasSortDirection returns true if the query has a sort direction
HasSortDirection() bool
// SortDirection returns the sort direction
SortDirection() string
// SetSortDirection sets the sort direction
SetSortDirection(sortDirection string) UserRoleQueryInterface
// HasSoftDeletedIncluded returns true if the query has soft deleted included
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns the soft deleted included
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the soft deleted included
SetSoftDeletedIncluded(softDeletedIncluded bool) UserRoleQueryInterface
// contains filtered or unexported methods
}
UserRoleQueryInterface defines the interface for user role queries
func NewUserRoleQuery ¶ added in v1.20.0
func NewUserRoleQuery() UserRoleQueryInterface