Documentation ¶
Index ¶
- Constants
- type ActivitySheet
- type ActivitySheetAsSelectOption
- type ActivitySheetListFilter
- type ActivitySheetListResult
- type ActivitySheetLite
- type ActivitySheetLiteListResult
- type ActivitySheetPaginationListFilter
- type ActivitySheetPaginationListResult
- type ActivitySheetPaginationLiteListResult
- type ActivitySheetStorer
- type ActivitySheetStorerImpl
- func (impl ActivitySheetStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl ActivitySheetStorerImpl) CountByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (int64, error)
- func (impl ActivitySheetStorerImpl) CountByLast30DaysForAssociateID(ctx context.Context, associateID primitive.ObjectID) (int64, error)
- func (impl ActivitySheetStorerImpl) Create(ctx context.Context, u *ActivitySheet) error
- func (impl ActivitySheetStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl ActivitySheetStorerImpl) GetByEmail(ctx context.Context, email string) (*ActivitySheet, error)
- func (impl ActivitySheetStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*ActivitySheet, error)
- func (impl ActivitySheetStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*ActivitySheet, error)
- func (impl ActivitySheetStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*ActivitySheet, error)
- func (impl ActivitySheetStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ActivitySheet, error)
- func (impl ActivitySheetStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) ([]*ActivitySheetAsSelectOption, error)
- func (impl ActivitySheetStorerImpl) ListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationListResult, error)
- func (impl ActivitySheetStorerImpl) ListByOrderID(ctx context.Context, orderID primitive.ObjectID) (*ActivitySheetPaginationListResult, error)
- func (impl ActivitySheetStorerImpl) ListByOrderWJID(ctx context.Context, orderWJID uint64) (*ActivitySheetPaginationListResult, error)
- func (impl ActivitySheetStorerImpl) LiteListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationLiteListResult, error)
- func (impl *ActivitySheetStorerImpl) PermanentlyDeleteAllByAssociateID(ctx context.Context, associateID primitive.ObjectID) error
- func (impl ActivitySheetStorerImpl) UpdateByID(ctx context.Context, m *ActivitySheet) error
Constants ¶
View Source
const ( ActivitySheetStatusPending = 5 // Deprecated. ActivitySheetStatusDeclined = 4 ActivitySheetStatusAccepted = 3 ActivitySheetStatusError = 2 ActivitySheetStatusArchived = 1 ActivitySheetTypeUnassigned = 1 ActivitySheetTypeResidentia = 2 ActivitySheetTypeCommercial = 3 )
View Source
const ( SortOrderAscending = 1 SortOrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivitySheet ¶
type ActivitySheet struct { ID primitive.ObjectID `bson:"_id" json:"id"` OrderID primitive.ObjectID `bson:"order_id" json:"order_id"` OrderWJID uint64 `bson:"order_wjid" json:"order_wjid"` // A.K.A. `Workery Job ID` AssociateOrganizationName string `bson:"associate_organization_name" json:"associate_organization_name"` AssociateOrganizationType int8 `bson:"associate_organization_type" json:"associate_organization_type"` AssociateID primitive.ObjectID `bson:"associate_id" json:"associate_id"` AssociateName string `bson:"associate_name" json:"associate_name"` AssociateLexicalName string `bson:"associate_lexical_name" json:"associate_lexical_name"` Comment string `bson:"comment" json:"comment"` 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"` Status int8 `bson:"status" json:"status"` Type int8 `bson:"type_of" json:"type_of"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` OrderTenantIDWithWJID string `bson:"order_tenant_id_with_wjid" json:"order_tenant_id_with_wjid"` // TenantIDWithWJID is a combination of `tenancy_id` and `wjid` values written in the following structure `%v_%v`. PublicID uint64 `bson:"public_id" json:"public_id"` }
type ActivitySheetListFilter ¶
type ActivitySheetListFilter struct { // Pagination related. Cursor primitive.ObjectID PageSize int64 SortField string SortOrder int8 // 1=ascending | -1=descending // Filter related. TenantID primitive.ObjectID AssociateID primitive.ObjectID OrderID primitive.ObjectID OrderWJID uint64 // A.K.A. `Workery Job ID` Status int8 ExcludeArchived bool SearchText string }
type ActivitySheetListResult ¶
type ActivitySheetListResult struct { Results []*ActivitySheet `json:"results"` NextCursor primitive.ObjectID `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
type ActivitySheetLite ¶
type ActivitySheetLite struct { ID primitive.ObjectID `bson:"_id" json:"id"` OrderID primitive.ObjectID `bson:"order_id" json:"order_id"` OrderWJID uint64 `bson:"order_wjid" json:"order_wjid"` // A.K.A. `Workery Job ID` AssociateID primitive.ObjectID `bson:"associate_id" json:"associate_id"` AssociateName string `bson:"associate_name" json:"associate_name"` AssociateLexicalName string `bson:"associate_lexical_name" json:"associate_lexical_name"` CreatedAt time.Time `bson:"created_at" json:"created_at"` Status int8 `bson:"status" json:"status"` Type int8 `bson:"type_of" json:"type_of"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` OrderTenantIDWithWJID string `bson:"order_tenant_id_with_wjid" json:"order_tenant_id_with_wjid"` // TenantIDWithWJID is a combination of `tenancy_id` and `wjid` values written in the following structure `%v_%v`. }
type ActivitySheetLiteListResult ¶
type ActivitySheetLiteListResult struct { Results []*ActivitySheetLite `json:"results"` NextCursor primitive.ObjectID `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
type ActivitySheetPaginationListFilter ¶
type ActivitySheetPaginationListFilter struct { // Pagination related. Cursor string PageSize int64 SortField string SortOrder int8 // 1=ascending | -1=descending // Filter related. TenantID primitive.ObjectID AssociateID primitive.ObjectID OrderID primitive.ObjectID OrderWJID uint64 // A.K.A. `Workery Job ID` Status int8 ExcludeArchived bool SearchText string }
type ActivitySheetPaginationListResult ¶
type ActivitySheetPaginationListResult struct { Results []*ActivitySheet `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
ActivitySheetPaginationListResult represents the paginated list results for the activity sheet records.
type ActivitySheetPaginationLiteListResult ¶
type ActivitySheetPaginationLiteListResult struct { Results []*ActivitySheetLite `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
ActivitySheetPaginationLiteListResults represents the paginated list results for the activity sheet records.
type ActivitySheetStorer ¶
type ActivitySheetStorer interface { Create(ctx context.Context, m *ActivitySheet) error GetByID(ctx context.Context, id primitive.ObjectID) (*ActivitySheet, error) GetByPublicID(ctx context.Context, oldID uint64) (*ActivitySheet, error) GetByEmail(ctx context.Context, email string) (*ActivitySheet, error) GetByVerificationCode(ctx context.Context, verificationCode string) (*ActivitySheet, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ActivitySheet, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *ActivitySheet) error ListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationListResult, error) LiteListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationLiteListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) ([]*ActivitySheetAsSelectOption, error) ListByOrderID(ctx context.Context, orderID primitive.ObjectID) (*ActivitySheetPaginationListResult, error) ListByOrderWJID(ctx context.Context, orderWJID uint64) (*ActivitySheetPaginationListResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error PermanentlyDeleteAllByAssociateID(ctx context.Context, associateID primitive.ObjectID) error CountByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (int64, error) CountByLast30DaysForAssociateID(ctx context.Context, associateID primitive.ObjectID) (int64, error) }
ActivitySheetStorer Interface for user.
func NewDatastore ¶
type ActivitySheetStorerImpl ¶
type ActivitySheetStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (ActivitySheetStorerImpl) CheckIfExistsByEmail ¶
func (ActivitySheetStorerImpl) CountByFilter ¶
func (impl ActivitySheetStorerImpl) CountByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (int64, error)
func (ActivitySheetStorerImpl) CountByLast30DaysForAssociateID ¶
func (ActivitySheetStorerImpl) Create ¶
func (impl ActivitySheetStorerImpl) Create(ctx context.Context, u *ActivitySheet) error
func (ActivitySheetStorerImpl) DeleteByID ¶
func (ActivitySheetStorerImpl) GetByEmail ¶
func (impl ActivitySheetStorerImpl) GetByEmail(ctx context.Context, email string) (*ActivitySheet, error)
func (ActivitySheetStorerImpl) GetByID ¶
func (impl ActivitySheetStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*ActivitySheet, error)
func (ActivitySheetStorerImpl) GetByPublicID ¶
func (impl ActivitySheetStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*ActivitySheet, error)
func (ActivitySheetStorerImpl) GetByVerificationCode ¶
func (impl ActivitySheetStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*ActivitySheet, error)
func (ActivitySheetStorerImpl) GetLatestByTenantID ¶
func (impl ActivitySheetStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ActivitySheet, error)
func (ActivitySheetStorerImpl) ListAsSelectOptionByFilter ¶
func (impl ActivitySheetStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) ([]*ActivitySheetAsSelectOption, error)
func (ActivitySheetStorerImpl) ListByFilter ¶
func (impl ActivitySheetStorerImpl) ListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationListResult, error)
func (ActivitySheetStorerImpl) ListByOrderID ¶
func (impl ActivitySheetStorerImpl) ListByOrderID(ctx context.Context, orderID primitive.ObjectID) (*ActivitySheetPaginationListResult, error)
func (ActivitySheetStorerImpl) ListByOrderWJID ¶
func (impl ActivitySheetStorerImpl) ListByOrderWJID(ctx context.Context, orderWJID uint64) (*ActivitySheetPaginationListResult, error)
func (ActivitySheetStorerImpl) LiteListByFilter ¶
func (impl ActivitySheetStorerImpl) LiteListByFilter(ctx context.Context, f *ActivitySheetPaginationListFilter) (*ActivitySheetPaginationLiteListResult, error)
func (*ActivitySheetStorerImpl) PermanentlyDeleteAllByAssociateID ¶
func (ActivitySheetStorerImpl) UpdateByID ¶
func (impl ActivitySheetStorerImpl) UpdateByID(ctx context.Context, m *ActivitySheet) error
Click to show internal directories.
Click to hide internal directories.