Documentation ¶
Index ¶
- Constants
- type ServiceFee
- type ServiceFeeAsSelectOption
- type ServiceFeeListFilter
- type ServiceFeeListResult
- type ServiceFeePaginationListAndCountResult
- type ServiceFeePaginationListFilter
- type ServiceFeePaginationListResult
- type ServiceFeeStorer
- type ServiceFeeStorerImpl
- func (impl ServiceFeeStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl ServiceFeeStorerImpl) CountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (int64, error)
- func (impl ServiceFeeStorerImpl) Create(ctx context.Context, u *ServiceFee) error
- func (impl ServiceFeeStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl ServiceFeeStorerImpl) GetByEmail(ctx context.Context, email string) (*ServiceFee, error)
- func (impl ServiceFeeStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*ServiceFee, error)
- func (impl ServiceFeeStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*ServiceFee, error)
- func (impl ServiceFeeStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*ServiceFee, error)
- func (impl ServiceFeeStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ServiceFee, error)
- func (c *ServiceFeeStorerImpl) ListAndCountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListAndCountResult, error)
- func (impl ServiceFeeStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) ([]*ServiceFeeAsSelectOption, error)
- func (impl ServiceFeeStorerImpl) ListByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListResult, error)
- func (impl ServiceFeeStorerImpl) UpdateByID(ctx context.Context, m *ServiceFee) error
Constants ¶
View Source
const ( StatusActive = 1 StatusArchived = 2 )
View Source
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceFee ¶
type ServiceFee struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Percentage float64 `bson:"percentage" json:"percentage"` 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 ServiceFeeListFilter ¶
type ServiceFeeListResult ¶
type ServiceFeeListResult struct { Results []*ServiceFee `json:"results"` NextCursor primitive.ObjectID `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
type ServiceFeePaginationListAndCountResult ¶
type ServiceFeePaginationListAndCountResult struct { Results []*ServiceFee `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` Count int64 `json:"count"` }
ServiceFeePaginationListResult represents the paginated list results for the ServiceFee records (meaning limited).
type ServiceFeePaginationListResult ¶
type ServiceFeePaginationListResult struct { Results []*ServiceFee `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
ServiceFeePaginationListResult represents the paginated list results for the associate records.
type ServiceFeeStorer ¶
type ServiceFeeStorer interface { Create(ctx context.Context, m *ServiceFee) error GetByID(ctx context.Context, id primitive.ObjectID) (*ServiceFee, error) GetByPublicID(ctx context.Context, oldID uint64) (*ServiceFee, error) GetByEmail(ctx context.Context, email string) (*ServiceFee, error) GetByVerificationCode(ctx context.Context, verificationCode string) (*ServiceFee, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ServiceFee, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *ServiceFee) error ListByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) ([]*ServiceFeeAsSelectOption, error) CountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (int64, error) ListAndCountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListAndCountResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error }
ServiceFeeStorer Interface for user.
func NewDatastore ¶
type ServiceFeeStorerImpl ¶
type ServiceFeeStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (ServiceFeeStorerImpl) CheckIfExistsByEmail ¶
func (ServiceFeeStorerImpl) CountByFilter ¶
func (impl ServiceFeeStorerImpl) CountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (int64, error)
func (ServiceFeeStorerImpl) Create ¶
func (impl ServiceFeeStorerImpl) Create(ctx context.Context, u *ServiceFee) error
func (ServiceFeeStorerImpl) DeleteByID ¶
func (ServiceFeeStorerImpl) GetByEmail ¶
func (impl ServiceFeeStorerImpl) GetByEmail(ctx context.Context, email string) (*ServiceFee, error)
func (ServiceFeeStorerImpl) GetByID ¶
func (impl ServiceFeeStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*ServiceFee, error)
func (ServiceFeeStorerImpl) GetByPublicID ¶
func (impl ServiceFeeStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*ServiceFee, error)
func (ServiceFeeStorerImpl) GetByVerificationCode ¶
func (impl ServiceFeeStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*ServiceFee, error)
func (ServiceFeeStorerImpl) GetLatestByTenantID ¶
func (impl ServiceFeeStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*ServiceFee, error)
func (*ServiceFeeStorerImpl) ListAndCountByFilter ¶
func (c *ServiceFeeStorerImpl) ListAndCountByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListAndCountResult, error)
func (ServiceFeeStorerImpl) ListAsSelectOptionByFilter ¶
func (impl ServiceFeeStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) ([]*ServiceFeeAsSelectOption, error)
func (ServiceFeeStorerImpl) ListByFilter ¶
func (impl ServiceFeeStorerImpl) ListByFilter(ctx context.Context, f *ServiceFeePaginationListFilter) (*ServiceFeePaginationListResult, error)
func (ServiceFeeStorerImpl) UpdateByID ¶
func (impl ServiceFeeStorerImpl) UpdateByID(ctx context.Context, m *ServiceFee) error
Click to show internal directories.
Click to hide internal directories.