Documentation
¶
Index ¶
- Constants
- type HowHearAboutUsItem
- type HowHearAboutUsItemAsSelectOption
- type HowHearAboutUsItemListResult
- type HowHearAboutUsItemPaginationListFilter
- type HowHearAboutUsItemPaginationListResult
- type HowHearAboutUsItemStorer
- type HowHearAboutUsItemStorerImpl
- func (impl HowHearAboutUsItemStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl HowHearAboutUsItemStorerImpl) Create(ctx context.Context, u *HowHearAboutUsItem) error
- func (impl HowHearAboutUsItemStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl HowHearAboutUsItemStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*HowHearAboutUsItem, error)
- func (impl HowHearAboutUsItemStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*HowHearAboutUsItem, error)
- func (impl HowHearAboutUsItemStorerImpl) GetByText(ctx context.Context, text string) (*HowHearAboutUsItem, error)
- func (impl HowHearAboutUsItemStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*HowHearAboutUsItem, error)
- func (impl HowHearAboutUsItemStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) ([]*HowHearAboutUsItemAsSelectOption, error)
- func (impl HowHearAboutUsItemStorerImpl) ListByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) (*HowHearAboutUsItemPaginationListResult, error)
- func (impl HowHearAboutUsItemStorerImpl) ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*HowHearAboutUsItemPaginationListResult, error)
- func (impl HowHearAboutUsItemStorerImpl) UpdateByID(ctx context.Context, m *HowHearAboutUsItem) error
Constants ¶
View Source
const ( HowHearAboutUsItemStatusActive = 1 HowHearAboutUsItemStatusArchived = 2 )
View Source
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HowHearAboutUsItem ¶
type HowHearAboutUsItem struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id"` Text string `bson:"text" json:"text"` SortNumber int8 `bson:"sort_number" json:"sort_number"` IsForAssociate bool `bson:"is_for_associate" json:"is_for_associate"` IsForCustomer bool `bson:"is_for_customer" json:"is_for_customer"` IsForStaff bool `bson:"is_for_staff" json:"is_for_staff"` Status int8 `bson:"status" json:"status"` PublicID uint64 `bson:"public_id" json:"public_id"` CreatedAt time.Time `bson:"created_at" json:"created_at"` CreatedByUserID primitive.ObjectID `bson:"created_by_user_id" json:"created_by_user_id,omitempty"` CreatedByUserName string `bson:"created_by_user_name" json:"created_by_user_name"` CreatedFromIPAddress string `bson:"created_from_ip_address" json:"created_from_ip_address"` ModifiedAt time.Time `bson:"modified_at" json:"modified_at"` ModifiedByUserID primitive.ObjectID `bson:"modified_by_user_id" json:"modified_by_user_id,omitempty"` ModifiedByUserName string `bson:"modified_by_user_name" json:"modified_by_user_name"` ModifiedFromIPAddress string `bson:"modified_from_ip_address" json:"modified_from_ip_address"` }
type HowHearAboutUsItemListResult ¶
type HowHearAboutUsItemListResult struct { Results []*HowHearAboutUsItem `json:"results"` NextCursor primitive.ObjectID `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
type HowHearAboutUsItemPaginationListResult ¶
type HowHearAboutUsItemPaginationListResult struct { Results []*HowHearAboutUsItem `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
HowHearAboutUsItemPaginationListResult represents the paginated list results for the associate records.
type HowHearAboutUsItemStorer ¶
type HowHearAboutUsItemStorer interface { Create(ctx context.Context, m *HowHearAboutUsItem) error GetByID(ctx context.Context, id primitive.ObjectID) (*HowHearAboutUsItem, error) GetByPublicID(ctx context.Context, oldID uint64) (*HowHearAboutUsItem, error) GetByText(ctx context.Context, text string) (*HowHearAboutUsItem, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*HowHearAboutUsItem, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *HowHearAboutUsItem) error ListByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) (*HowHearAboutUsItemPaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) ([]*HowHearAboutUsItemAsSelectOption, error) ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*HowHearAboutUsItemPaginationListResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error }
HowHearAboutUsItemStorer Interface for user.
func NewDatastore ¶
type HowHearAboutUsItemStorerImpl ¶
type HowHearAboutUsItemStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (HowHearAboutUsItemStorerImpl) CheckIfExistsByEmail ¶
func (HowHearAboutUsItemStorerImpl) Create ¶
func (impl HowHearAboutUsItemStorerImpl) Create(ctx context.Context, u *HowHearAboutUsItem) error
func (HowHearAboutUsItemStorerImpl) DeleteByID ¶
func (HowHearAboutUsItemStorerImpl) GetByID ¶
func (impl HowHearAboutUsItemStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*HowHearAboutUsItem, error)
func (HowHearAboutUsItemStorerImpl) GetByPublicID ¶
func (impl HowHearAboutUsItemStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*HowHearAboutUsItem, error)
func (HowHearAboutUsItemStorerImpl) GetByText ¶
func (impl HowHearAboutUsItemStorerImpl) GetByText(ctx context.Context, text string) (*HowHearAboutUsItem, error)
func (HowHearAboutUsItemStorerImpl) GetLatestByTenantID ¶
func (impl HowHearAboutUsItemStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*HowHearAboutUsItem, error)
func (HowHearAboutUsItemStorerImpl) ListAsSelectOptionByFilter ¶
func (impl HowHearAboutUsItemStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) ([]*HowHearAboutUsItemAsSelectOption, error)
func (HowHearAboutUsItemStorerImpl) ListByFilter ¶
func (impl HowHearAboutUsItemStorerImpl) ListByFilter(ctx context.Context, f *HowHearAboutUsItemPaginationListFilter) (*HowHearAboutUsItemPaginationListResult, error)
func (HowHearAboutUsItemStorerImpl) ListByTenantID ¶
func (impl HowHearAboutUsItemStorerImpl) ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*HowHearAboutUsItemPaginationListResult, error)
func (HowHearAboutUsItemStorerImpl) UpdateByID ¶
func (impl HowHearAboutUsItemStorerImpl) UpdateByID(ctx context.Context, m *HowHearAboutUsItem) error
Click to show internal directories.
Click to hide internal directories.