Documentation ¶
Index ¶
- Constants
- type SkillSet
- type SkillSetAsSelectOption
- type SkillSetInsuranceRequirement
- type SkillSetListFilter
- type SkillSetListResult
- type SkillSetPaginationListFilter
- type SkillSetPaginationListResult
- type SkillSetStorer
- type SkillSetStorerImpl
- func (impl SkillSetStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl SkillSetStorerImpl) Create(ctx context.Context, u *SkillSet) error
- func (impl SkillSetStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl SkillSetStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*SkillSet, error)
- func (impl SkillSetStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*SkillSet, error)
- func (impl SkillSetStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SkillSet, error)
- func (impl SkillSetStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *SkillSetListFilter) ([]*SkillSetAsSelectOption, error)
- func (impl SkillSetStorerImpl) ListByFilter(ctx context.Context, f *SkillSetPaginationListFilter) (*SkillSetPaginationListResult, error)
- func (impl SkillSetStorerImpl) ListByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SkillSetPaginationListResult, error)
- func (impl SkillSetStorerImpl) UpdateByID(ctx context.Context, m *SkillSet) error
Constants ¶
View Source
const ( SkillSetStatusActive = 1 SkillSetStatusArchived = 2 SkillSetRoleRoot = 1 SkillSetRoleRetailer = 2 SkillSetRoleCustomer = 3 )
View Source
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkillSet ¶
type SkillSet struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` Category string `bson:"category" json:"category"` SubCategory string `bson:"sub_category" json:"sub_category"` Description string `bson:"description" json:"description"` Status int8 `bson:"status" json:"status"` PublicID uint64 `bson:"public_id" json:"public_id"` InsuranceRequirements []*SkillSetInsuranceRequirement `bson:"insurance_requirements" json:"insurance_requirements,omitempty"` // Reference 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 SkillSetAsSelectOption ¶
type SkillSetInsuranceRequirement ¶
type SkillSetInsuranceRequirement struct { SkillSetID primitive.ObjectID `bson:"skill_set_id" json:"skill_set_id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id"` ID primitive.ObjectID `bson:"_id" json:"id"` PublicID uint64 `bson:"public_id" json:"public_id"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Status int8 `bson:"status" json:"status"` }
SkillSetInsuranceRequirement structure is a copy of `InsuranceRequirement` with extra `SkillSetID` field.
type SkillSetListFilter ¶
type SkillSetListFilter struct { // Pagination related. Cursor primitive.ObjectID PageSize int64 SortField string SortOrder int8 // 1=ascending | -1=descending // Filter related. TenantID primitive.ObjectID Role int8 Status int8 UUIDs []string ExcludeArchived bool SearchText string FirstName string LastName string Email string Phone string CreatedAtGTE time.Time }
type SkillSetListResult ¶
type SkillSetPaginationListResult ¶
type SkillSetPaginationListResult struct { Results []*SkillSet `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
SkillSetPaginationListResult represents the paginated list results for the associate records.
type SkillSetStorer ¶
type SkillSetStorer interface { Create(ctx context.Context, m *SkillSet) error GetByID(ctx context.Context, id primitive.ObjectID) (*SkillSet, error) GetByPublicID(ctx context.Context, oldID uint64) (*SkillSet, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SkillSet, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *SkillSet) error ListByFilter(ctx context.Context, f *SkillSetPaginationListFilter) (*SkillSetPaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *SkillSetListFilter) ([]*SkillSetAsSelectOption, error) ListByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SkillSetPaginationListResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error }
SkillSetStorer Interface for user.
func NewDatastore ¶
type SkillSetStorerImpl ¶
type SkillSetStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (SkillSetStorerImpl) CheckIfExistsByEmail ¶
func (SkillSetStorerImpl) Create ¶
func (impl SkillSetStorerImpl) Create(ctx context.Context, u *SkillSet) error
func (SkillSetStorerImpl) DeleteByID ¶
func (SkillSetStorerImpl) GetByPublicID ¶
func (SkillSetStorerImpl) GetLatestByTenantID ¶
func (SkillSetStorerImpl) ListAsSelectOptionByFilter ¶
func (impl SkillSetStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *SkillSetListFilter) ([]*SkillSetAsSelectOption, error)
func (SkillSetStorerImpl) ListByFilter ¶
func (impl SkillSetStorerImpl) ListByFilter(ctx context.Context, f *SkillSetPaginationListFilter) (*SkillSetPaginationListResult, error)
func (SkillSetStorerImpl) ListByTenantID ¶
func (impl SkillSetStorerImpl) ListByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SkillSetPaginationListResult, error)
func (SkillSetStorerImpl) UpdateByID ¶
func (impl SkillSetStorerImpl) UpdateByID(ctx context.Context, m *SkillSet) error
Click to show internal directories.
Click to hide internal directories.