Documentation
¶
Index ¶
- Constants
- Variables
- type Associate
- type AssociateAsSelectOption
- type AssociateAwayLog
- type AssociateComment
- type AssociateInsuranceRequirement
- type AssociateListFilter
- type AssociateListResult
- type AssociateLite
- type AssociatePaginationListAndCountResult
- type AssociatePaginationListFilter
- type AssociatePaginationListResult
- type AssociatePaginationLiteListAndCountResult
- type AssociatePaginationLiteListResult
- type AssociateSkillSet
- type AssociateStorer
- type AssociateStorerImpl
- func (impl AssociateStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl AssociateStorerImpl) CountAllJobSeekersByTenantID(ctx context.Context, tid primitive.ObjectID) (int64, error)
- func (impl AssociateStorerImpl) CountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (int64, error)
- func (impl AssociateStorerImpl) Create(ctx context.Context, u *Associate) error
- func (impl AssociateStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl AssociateStorerImpl) GetByEmail(ctx context.Context, email string) (*Associate, error)
- func (impl AssociateStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*Associate, error)
- func (impl AssociateStorerImpl) GetByPublicID(ctx context.Context, publicID uint64) (*Associate, error)
- func (impl AssociateStorerImpl) GetByUserID(ctx context.Context, userID primitive.ObjectID) (*Associate, error)
- func (impl AssociateStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*Associate, error)
- func (impl AssociateStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*Associate, error)
- func (c *AssociateStorerImpl) ListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListAndCountResult, error)
- func (impl AssociateStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *AssociateListFilter) ([]*AssociateAsSelectOption, error)
- func (impl AssociateStorerImpl) ListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListResult, error)
- func (impl AssociateStorerImpl) ListByHowDidYouHearAboutUsID(ctx context.Context, howDidYouHearAboutUsID primitive.ObjectID) (*AssociatePaginationListResult, error)
- func (impl AssociateStorerImpl) ListByInsuranceRequirementID(ctx context.Context, irID primitive.ObjectID) (*AssociatePaginationListResult, error)
- func (c *AssociateStorerImpl) LiteListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListAndCountResult, error)
- func (impl AssociateStorerImpl) LiteListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListResult, error)
- func (impl AssociateStorerImpl) UpdateByID(ctx context.Context, m *Associate) error
- func (impl AssociateStorerImpl) UpsertByID(ctx context.Context, user *Associate) error
- type AssociateTag
- type AssociateVehicleType
Constants ¶
const ( AssociateStatusActive = 1 AssociateStatusArchived = 2 AssociateDeactivationReasonNotSpecified = 0 AssociateDeactivationReasonOther = 1 AssociateDeactivationReasonBlacklisted = 2 AssociateDeactivationReasonMoved = 3 AssociateDeactivationReasonDeceased = 4 AssociateDeactivationReasonDoNotConstact = 5 AssociateTypeUnassigned = 1 AssociateTypeResidential = 2 AssociateTypeCommercial = 3 AssociatePhoneTypeLandline = 1 AssociatePhoneTypeMobile = 2 AssociatePhoneTypeWork = 3 AssociateGenderOther = 1 AssociateGenderMale = 2 AssociateGenderFemale = 3 AssociateGenderTransgender = 4 AssociateGenderNonBinary = 5 AssociateGenderTwoSpirit = 6 AssociateGenderPreferNotToSay = 7 AssociateGenderDoNotKnow = 8 AssociateIdentifyAsOther = 1 AssociateIdentifyAsPreferNotToSay = 2 AssociateIdentifyAsWomen = 3 AssociateIdentifyAsNewcomer = 4 AssociateIdentifyAsRacializedPerson = 5 AssociateIdentifyAsVeteran = 6 AssociateIdentifyAsFrancophone = 7 AssociateIdentifyAsPersonWithDisability = 8 AssociateIdentifyAsInuit = 9 AssociateIdentifyAsFirstNations = 10 AssociateIdentifyAsMetis = 11 AssociateIsJobSeekerYes = 1 AssociateIsJobSeekerNo = 2 StatusInCountryOther = 1 StatusInCountryCanadaCitizen = 2 StatusInCountryPermanentResident = 3 StatusInCountryNaturalizedCanadianCitizen = 4 StatusInCountryProtectedPersons = 5 StatusInCountryPreferNotToSay = 6 )
const ( MaritalStatusOther = 1 MaritalStatusMarried = 2 MaritalStatusCommonLaw = 3 MaritalStatusDivorced = 4 MaritalStatusSeparated = 5 MaritalStatusWidowed = 6 MaritalStatusSingle = 7 MaritalStatusPreferNotToSay = 8 )
const ( AccomplishedEducationOther = 1 AccomplishedEducationGrade0To8 = 2 AccomplishedEducationGrade9 = 3 AccomplishedEducationGrade10 = 4 AccomplishedEducationGrade11 = 5 AccomplishedEducationGrade12OrEquivalent = 6 AccomplishedEducationOAC = 7 AccomplishedEducationCertificateOfApprenticeship = 8 AccomplishedEducationJourneyperson = 9 AccomplishedEducationCertificateOrDiploma = 10 AccomplishedEducationBachelorsDegree = 11 AccomplishedEducationPostGraduate = 12 )
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
var AccomplishedEducationLabels = map[int8]string{ AccomplishedEducationOther: "Other", AccomplishedEducationGrade0To8: "Grade 0-8", AccomplishedEducationGrade9: "Grade 9", AccomplishedEducationGrade10: "Grade 10", AccomplishedEducationGrade11: "Grade 11", AccomplishedEducationGrade12OrEquivalent: "Grade 12 (or equivalent)", AccomplishedEducationOAC: "OAC", AccomplishedEducationCertificateOfApprenticeship: "Certificate of Apprenticeship", AccomplishedEducationJourneyperson: "Journeyperson", AccomplishedEducationCertificateOrDiploma: "Certificate/Diploma", AccomplishedEducationBachelorsDegree: "Bachelor’s Degree", AccomplishedEducationPostGraduate: "Post graduate", }
var AssociateDeactivationReasonLabels = map[int8]string{ AssociateDeactivationReasonNotSpecified: "Not Specified", AssociateDeactivationReasonOther: "Other", AssociateDeactivationReasonBlacklisted: "Blacklisted", AssociateDeactivationReasonMoved: "Moved", AssociateDeactivationReasonDeceased: "Deceased", AssociateDeactivationReasonDoNotConstact: "Do not contact", }
var AssociateGenderLabels = map[int8]string{ AssociateGenderOther: "Other", AssociateGenderMale: "Male", AssociateGenderFemale: "Female", AssociateGenderNonBinary: "Non-Binary", AssociateGenderTwoSpirit: "Two Spirit", AssociateGenderPreferNotToSay: "Prefer Not To Say", AssociateGenderDoNotKnow: "Do Not Know", }
var AssociateMaritalStatusLabels = map[int8]string{ MaritalStatusOther: "Other", MaritalStatusMarried: "Married", MaritalStatusCommonLaw: "Common Law", MaritalStatusDivorced: "Divorced", MaritalStatusSeparated: "Separated", MaritalStatusWidowed: "Widowed", MaritalStatusSingle: "Single", MaritalStatusPreferNotToSay: "Prefer not to say", }
var AssociateOrganizationTypeLabels = map[int8]string{
1: "Unknown",
2: "Private",
3: "Non-Profit",
4: "Government",
}
var AssociateStateLabels = map[int8]string{ AssociateStatusActive: "Active", AssociateStatusArchived: "Archived", }
var AssociateTelephoneTypeLabels = map[int8]string{
1: "Landline",
2: "Mobile",
3: "Work",
}
var AssociateTypeLabels = map[int8]string{ AssociateTypeResidential: "Residential", AssociateTypeCommercial: "Commercial", AssociateTypeUnassigned: "Unassigned", }
Functions ¶
This section is empty.
Types ¶
type Associate ¶
type Associate struct { ID primitive.ObjectID `bson:"_id" json:"id"` PublicID uint64 `bson:"public_id" json:"public_id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` FirstName string `bson:"first_name" json:"first_name"` LastName string `bson:"last_name" json:"last_name"` Name string `bson:"name" json:"name"` LexicalName string `bson:"lexical_name" json:"lexical_name"` Email string `bson:"email" json:"email"` PersonalEmail string `bson:"personal_email" json:"personal_email"` IsOkToEmail bool `bson:"is_ok_to_email" json:"is_ok_to_email"` Phone string `bson:"phone" json:"phone,omitempty"` PhoneType int8 `bson:"phone_type" json:"phone_type"` PhoneExtension string `bson:"phone_extension" json:"phone_extension"` IsOkToText bool `bson:"is_ok_to_text" json:"is_ok_to_text"` FaxNumber string `bson:"fax_number" json:"fax_number"` OtherPhone string `bson:"other_phone" json:"other_phone"` OtherPhoneExtension string `bson:"other_phone_extension" json:"other_phone_extension"` OtherPhoneType int8 `bson:"other_phone_type" json:"other_phone_type"` Country string `bson:"country" json:"country,omitempty"` Region string `bson:"region" json:"region,omitempty"` City string `bson:"city" json:"city,omitempty"` PostalCode string `bson:"postal_code" json:"postal_code,omitempty"` AddressLine1 string `bson:"address_line1" json:"address_line1,omitempty"` AddressLine2 string `bson:"address_line2" json:"address_line2,omitempty"` PostOfficeBoxNumber string `bson:"post_office_box_number" json:"post_office_box_number"` FullAddressWithoutPostalCode string `bson:"full_address_without_postal_code" json:"full_address_without_postal_code,omitempty"` // Compiled value FullAddressWithPostalCode string `bson:"full_address_with_postal_code" json:"full_address_with_postal_code,omitempty"` // Compiled value FullAddressURL string `bson:"full_address_url" json:"full_address_url,omitempty"` // Compiled value HasShippingAddress bool `bson:"has_shipping_address" json:"has_shipping_address,omitempty"` ShippingName string `bson:"shipping_name" json:"shipping_name,omitempty"` ShippingPhone string `bson:"shipping_phone" json:"shipping_phone,omitempty"` ShippingCountry string `bson:"shipping_country" json:"shipping_country,omitempty"` ShippingRegion string `bson:"shipping_region" json:"shipping_region,omitempty"` ShippingCity string `bson:"shipping_city" json:"shipping_city,omitempty"` ShippingPostalCode string `bson:"shipping_postal_code" json:"shipping_postal_code,omitempty"` ShippingAddressLine1 string `bson:"shipping_address_line1" json:"shipping_address_line1,omitempty"` ShippingAddressLine2 string `bson:"shipping_address_line2" json:"shipping_address_line2,omitempty"` ShippingPostOfficeBoxNumber string `bson:"shipping_post_office_box_number" json:"shipping_post_office_box_number"` ShippingFullAddressWithoutPostalCode string `bson:"shipping_full_address_without_postal_code" json:"shipping_full_address_without_postal_code,omitempty"` // Compiled value ShippingFullAddressWithPostalCode string `bson:"shipping_full_address_with_postal_code" json:"shipping_full_address_with_postal_code,omitempty"` // Compiled value ShippingFullAddressURL string `bson:"shipping_full_address_url" json:"shipping_full_address_url,omitempty"` // Compiled value HowDidYouHearAboutUsID primitive.ObjectID `bson:"how_did_you_hear_about_us_id" json:"how_did_you_hear_about_us_id,omitempty"` HowDidYouHearAboutUsText string `bson:"how_did_you_hear_about_us_text" json:"how_did_you_hear_about_us_text,omitempty"` IsHowDidYouHearAboutUsOther bool `bson:"is_how_did_you_hear_about_us_other" json:"is_how_did_you_hear_about_us_other,omitempty"` HowDidYouHearAboutUsOther string `bson:"how_did_you_hear_about_us_other" json:"how_did_you_hear_about_us_other,omitempty"` AgreeTOS bool `bson:"agree_tos" json:"agree_tos,omitempty"` CreatedAt time.Time `bson:"created_at" json:"created_at,omitempty"` CreatedByUserID primitive.ObjectID `bson:"created_by_user_id" json:"created_by_user_id"` 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,omitempty"` ModifiedByUserID primitive.ObjectID `bson:"modified_by_user_id" json:"modified_by_user_id"` 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"` Salt string `bson:"salt" json:"salt,omitempty"` PrAccessCode string `bson:"pr_access_code" json:"pr_access_code,omitempty"` PrExpiryTime time.Time `bson:"pr_expiry_time" json:"pr_expiry_time,omitempty"` Timezone string `bson:"timezone" json:"timezone,omitempty"` HasUserAccount bool `bson:"has_user_account" json:"has_user_account,omitempty"` UserID primitive.ObjectID `bson:"user_id" json:"user_id,omitempty"` Type int8 `bson:"type" json:"type"` IsBusiness bool `bson:"is_business" json:"is_business"` IsSenior bool `bson:"is_senior" json:"is_senior"` IsSupport bool `bson:"is_support" json:"is_support"` JobInfoRead string `bson:"job_info_read" json:"job_info_read"` DeactivationReason int8 `bson:"deactivation_reason" json:"deactivation_reason"` DeactivationReasonOther string `bson:"deactivation_reason_other" json:"deactivation_reason_other"` Description string `bson:"description" json:"description"` IsJobSeeker int8 `bson:"is_job_seeker" json:"is_job_seeker"` StatusInCountry int8 `bson:"status_in_country" json:"status_in_country"` StatusInCountryOther string `bson:"status_in_country_other" json:"status_in_country_other"` CountryOfOrigin string `bson:"country_of_origin" json:"country_of_origin"` DateOfEntryIntoCountry time.Time `bson:"date_of_entry_into_country" json:"date_of_entry_into_country"` JobSeekerID string `bson:"job_seeker_id" json:"job_seeker_id"` MaritalStatus int8 `bson:"marital_status" json:"marital_status"` MaritalStatusOther string `bson:"marital_status_other" json:"marital_status_other"` AccomplishedEducation int8 `bson:"accomplished_education" json:"accomplished_education"` AccomplishedEducationOther string `bson:"accomplished_education_other" json:"accomplished_education_other"` AvatarObjectExpiry time.Time `bson:"avatar_object_expiry" json:"avatar_object_expiry"` AvatarObjectURL string `bson:"avatar_object_url" json:"avatar_object_url"` AvatarObjectKey string `bson:"avatar_object_key" json:"avatar_object_key"` AvatarFileType string `bson:"avatar_file_type" json:"avatar_file_type"` AvatarFileName string `bson:"avatar_file_name" json:"avatar_file_name"` BirthDate time.Time `bson:"birth_date" json:"birth_date"` JoinDate time.Time `bson:"join_date" json:"join_date"` Nationality string `bson:"nationality" json:"nationality"` Gender int8 `bson:"gender" json:"gender"` GenderOther string `bson:"gender_other" json:"gender_other"` TaxID string `bson:"tax_id" json:"tax_id"` Elevation float64 `bson:"elevation" json:"elevation"` Latitude float64 `bson:"latitude" json:"latitude"` Longitude float64 `bson:"longitude" json:"longitude"` AreaServed string `bson:"area_served" json:"area_served"` PreferredLanguage string `bson:"preferred_language" json:"preferred_language"` ContactType string `bson:"contact_type" json:"contact_type"` OrganizationName string `bson:"organization_name" json:"organization_name"` OrganizationType int8 `bson:"organization_type" json:"organization_type"` HourlySalaryDesired int64 `bson:"hourly_salary_desired" json:"hourly_salary_desired"` LimitSpecial string `bson:"limit_special" json:"limit_special"` DuesDate time.Time `bson:"dues_date" json:"dues_date"` CommercialInsuranceExpiryDate time.Time `bson:"commercial_insurance_expiry_date" json:"commercial_insurance_expiry_date"` AutoInsuranceExpiryDate time.Time `bson:"auto_insurance_expiry_date" json:"auto_insurance_expiry_date"` WsibNumber string `bson:"wsib_number" json:"wsib_number"` WsibInsuranceDate time.Time `bson:"wsib_insurance_date" json:"wsib_insurance_date"` PoliceCheck time.Time `bson:"police_check" json:"police_check"` DriversLicenseClass string `bson:"drivers_license_class" json:"drivers_license_class"` Score float64 `bson:"score" json:"score"` ServiceFeeID primitive.ObjectID `bson:"service_fee_id" json:"service_fee_id"` ServiceFeeName string `bson:"service_fee_name" json:"service_fee_name"` ServiceFeePercentage float64 `bson:"service_fee_percentage" json:"service_fee_percentage"` BalanceOwingAmount float64 `bson:"balance_owing_amount" json:"balance_owing_amount"` EmergencyContactName string `bson:"emergency_contact_name" json:"emergency_contact_name"` EmergencyContactRelationship string `bson:"emergency_contact_relationship" json:"emergency_contact_relationship"` EmergencyContactTelephone string `bson:"emergency_contact_telephone" json:"emergency_contact_telephone"` EmergencyContactAlternativeTelephone string `bson:"emergency_contact_alternative_telephone" json:"emergency_contact_alternative_telephone"` Comments []*AssociateComment `bson:"comments" json:"comments"` SkillSets []*AssociateSkillSet `bson:"skill_sets" json:"skill_sets,omitempty"` InsuranceRequirements []*AssociateInsuranceRequirement `bson:"insurance_requirements" json:"insurance_requirements,omitempty"` VehicleTypes []*AssociateVehicleType `bson:"vehicle_types" json:"vehicle_types,omitempty"` AwayLogs []*AssociateAwayLog `bson:"away_logs" json:"away_logs,omitempty"` Tags []*AssociateTag `bson:"tags" json:"tags,omitempty"` IdentifyAs []int8 `bson:"identify_as" json:"identify_as,omitempty"` // OTPEnabled controls whether we force 2FA or not during login for this associate. OTPEnabled bool `bson:"otp_enabled" json:"otp_enabled"` }
func (*Associate) SkillSetIDs ¶
SkillSetIDs is a convinience function which will return an array of skill set ID values from the associate.
type AssociateAsSelectOption ¶
type AssociateAwayLog ¶
type AssociateAwayLog struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` AssociateID primitive.ObjectID `bson:"associate_id" json:"associate_id"` AssociateName string `bson:"associate_name" json:"associate_name,omitempty"` AssociateLexicalName string `bson:"associate_lexical_name" json:"associate_lexical_name,omitempty"` Reason int8 `bson:"reason" json:"reason"` ReasonOther string `bson:"reason_other" json:"reason_other"` UntilFurtherNotice int8 `bson:"until_further_notice" json:"until_further_notice"` UntilDate time.Time `bson:"until_date" json:"until_date"` StartDate time.Time `bson:"start_date" json:"start_date"` Status int8 `bson:"status" json:"status"` 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"` PublicID uint64 `bson:"public_id" json:"public_id"` }
type AssociateComment ¶
type AssociateComment struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id"` CreatedAt time.Time `bson:"created_at,omitempty" json:"created_at,omitempty"` CreatedByUserID primitive.ObjectID `bson:"created_by_user_id" json:"created_by_user_id"` 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,omitempty" json:"modified_at,omitempty"` ModifiedByUserID primitive.ObjectID `bson:"modified_by_user_id" json:"modified_by_user_id"` ModifiedByUserName string `bson:"modified_by_user_name" json:"modified_by_user_name"` ModifiedFromIPAddress string `bson:"modified_from_ip_address" json:"modified_from_ip_address"` Content string `bson:"content" json:"content"` Status int8 `bson:"status" json:"status"` PublicID uint64 `bson:"public_id" json:"public_id"` }
type AssociateListFilter ¶
type AssociateListFilter 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 Type int8 ExcludeArchived bool SearchText string FirstName string LastName string Email string Phone string CreatedAtGTE time.Time SkillSetIDs []primitive.ObjectID OrganizationName string IsJobSeeker int8 HasTaxID int8 // IDs filter is used if you know the `ID` values of all the // customers you want to retrieve. IDs []primitive.ObjectID }
type AssociateListResult ¶
type AssociateLite ¶
type AssociateLite struct { ID primitive.ObjectID `bson:"_id" json:"id"` FirstName string `bson:"first_name" json:"first_name"` LastName string `bson:"last_name" json:"last_name"` Name string `bson:"name" json:"name"` LexicalName string `bson:"lexical_name" json:"lexical_name"` Email string `bson:"email" json:"email"` Phone string `bson:"phone" json:"phone,omitempty"` PhoneType int8 `bson:"phone_type" json:"phone_type"` PhoneExtension string `bson:"phone_extension" json:"phone_extension"` OtherPhone string `bson:"other_phone" json:"other_phone"` OtherPhoneExtension string `bson:"other_phone_extension" json:"other_phone_extension"` OtherPhoneType int8 `bson:"other_phone_type" json:"other_phone_type"` Status int8 `bson:"status" json:"status"` Type int8 `bson:"type" json:"type"` AvatarObjectKey string `bson:"avatar_object_key" json:"avatar_object_key"` AvatarFileType string `bson:"avatar_file_type" json:"avatar_file_type"` AvatarFileName string `bson:"avatar_file_name" json:"avatar_file_name"` Birthdate time.Time `bson:"birthdate" json:"birthdate"` JoinDate time.Time `bson:"join_date" json:"join_date"` Nationality string `bson:"nationality" json:"nationality"` Gender int8 `bson:"gender" json:"gender"` GenderOther string `bson:"gender_other" json:"gender_other"` OrganizationName string `bson:"organization_name" json:"organization_name"` OrganizationType int8 `bson:"organization_type" json:"organization_type"` Country string `bson:"country" json:"country,omitempty"` Region string `bson:"region" json:"region,omitempty"` City string `bson:"city" json:"city,omitempty"` PostalCode string `bson:"postal_code" json:"postal_code,omitempty"` AddressLine1 string `bson:"address_line1" json:"address_line1,omitempty"` AddressLine2 string `bson:"address_line2" json:"address_line2,omitempty"` SkillSets []*AssociateSkillSet `bson:"skill_sets" json:"skill_sets,omitempty"` Tags []*AssociateTag `bson:"tags" json:"tags,omitempty"` }
AssociateLite represents the limited detail of a associate which is to be displayed in a list view.
type AssociatePaginationListAndCountResult ¶
type AssociatePaginationListAndCountResult struct { Results []*Associate `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` Count int64 `json:"count"` }
AssociatePaginationListResult represents the paginated list results for the Associate records (meaning limited).
type AssociatePaginationListFilter ¶
type AssociatePaginationListFilter struct { // Pagination related. Cursor string PageSize int64 SortField string SortOrder int8 // 1=ascending | -1=descending // Filter related. TenantID primitive.ObjectID HowDidYouHearAboutUsID primitive.ObjectID Type int8 Role int8 Status int8 UUIDs []string SearchText string FirstName string LastName string Email string Phone string CreatedAtGTE time.Time OrganizationName string IsJobSeeker int8 HasTaxID int8 CommercialInsuranceExpiryDateGTE time.Time CommercialInsuranceExpiryDateGT time.Time CommercialInsuranceExpiryDateLTE time.Time CommercialInsuranceExpiryDateLT time.Time PoliceCheckGTE time.Time PoliceCheckGT time.Time PoliceCheckLTE time.Time PoliceCheckLT time.Time JoinDateGT time.Time JoinDateGTE time.Time JoinDateLT time.Time JoinDateLTE time.Time // InSkillSetIDs filter is used if you want to find one or more skill set // ids inside the associate. InSkillSetIDs []primitive.ObjectID // AllSkillSetIDs filter is used if you want to find all skill set ids for // the associate. AllSkillSetIDs []primitive.ObjectID // InTagIDs filter is used if you want to find one or more tag // ids inside the associate. InTagIDs []primitive.ObjectID // AllTagIDs filter is used if you want to find all tag ids for // the associate. AllTagIDs []primitive.ObjectID // InInsuranceRequirementIDs filter is used if you want to find one or more tag // ids inside the associate. InInsuranceRequirementIDs []primitive.ObjectID // AllInsuranceRequirementIDs filter is used if you want to find all tag ids for // the associate. AllInsuranceRequirementIDs []primitive.ObjectID // InVehicleTypeIDs filter is used if you want to find one or more tag // ids inside the associate. InVehicleTypeIDs []primitive.ObjectID // AllVehicleTypeIDs filter is used if you want to find all tag ids for // the associate. AllVehicleTypeIDs []primitive.ObjectID // IDs filter is used if you know the `ID` values of all the // customers you want to retrieve. IDs []primitive.ObjectID }
type AssociatePaginationListResult ¶
type AssociatePaginationListResult struct { Results []*Associate `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
AssociatePaginationLiteListResult represents the paginated list results for the associate records.
type AssociatePaginationLiteListAndCountResult ¶
type AssociatePaginationLiteListAndCountResult struct { Results []*AssociateLite `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` Count int64 `json:"count"` }
AssociatePaginationLiteListResult represents the paginated list results for the Associate lite records (meaning limited).
type AssociatePaginationLiteListResult ¶
type AssociatePaginationLiteListResult struct { Results []*AssociateLite `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
AssociatePaginationLiteListResult represents the paginated list results for the associate lite records (meaning limited).
type AssociateSkillSet ¶
type AssociateStorer ¶
type AssociateStorer interface { Create(ctx context.Context, m *Associate) error GetByID(ctx context.Context, id primitive.ObjectID) (*Associate, error) GetByPublicID(ctx context.Context, publicID uint64) (*Associate, error) GetByUserID(ctx context.Context, userID primitive.ObjectID) (*Associate, error) GetByEmail(ctx context.Context, email string) (*Associate, error) GetByVerificationCode(ctx context.Context, verificationCode string) (*Associate, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*Associate, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *Associate) error UpsertByID(ctx context.Context, user *Associate) error ListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListResult, error) ListByInsuranceRequirementID(ctx context.Context, irID primitive.ObjectID) (*AssociatePaginationListResult, error) ListByHowDidYouHearAboutUsID(ctx context.Context, howDidYouHearAboutUsID primitive.ObjectID) (*AssociatePaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *AssociateListFilter) ([]*AssociateAsSelectOption, error) LiteListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListResult, error) ListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListAndCountResult, error) LiteListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListAndCountResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error CountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (int64, error) CountAllJobSeekersByTenantID(ctx context.Context, tid primitive.ObjectID) (int64, error) }
AssociateStorer Interface for user.
func NewDatastore ¶
type AssociateStorerImpl ¶
type AssociateStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (AssociateStorerImpl) CheckIfExistsByEmail ¶
func (AssociateStorerImpl) CountAllJobSeekersByTenantID ¶
func (AssociateStorerImpl) CountByFilter ¶
func (impl AssociateStorerImpl) CountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (int64, error)
func (AssociateStorerImpl) Create ¶
func (impl AssociateStorerImpl) Create(ctx context.Context, u *Associate) error
func (AssociateStorerImpl) DeleteByID ¶
func (AssociateStorerImpl) GetByEmail ¶
func (AssociateStorerImpl) GetByPublicID ¶
func (AssociateStorerImpl) GetByUserID ¶
func (AssociateStorerImpl) GetByVerificationCode ¶
func (AssociateStorerImpl) GetLatestByTenantID ¶
func (*AssociateStorerImpl) ListAndCountByFilter ¶
func (c *AssociateStorerImpl) ListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListAndCountResult, error)
func (AssociateStorerImpl) ListAsSelectOptionByFilter ¶
func (impl AssociateStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *AssociateListFilter) ([]*AssociateAsSelectOption, error)
func (AssociateStorerImpl) ListByFilter ¶
func (impl AssociateStorerImpl) ListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationListResult, error)
func (AssociateStorerImpl) ListByHowDidYouHearAboutUsID ¶
func (impl AssociateStorerImpl) ListByHowDidYouHearAboutUsID(ctx context.Context, howDidYouHearAboutUsID primitive.ObjectID) (*AssociatePaginationListResult, error)
func (AssociateStorerImpl) ListByInsuranceRequirementID ¶
func (impl AssociateStorerImpl) ListByInsuranceRequirementID(ctx context.Context, irID primitive.ObjectID) (*AssociatePaginationListResult, error)
func (*AssociateStorerImpl) LiteListAndCountByFilter ¶
func (c *AssociateStorerImpl) LiteListAndCountByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListAndCountResult, error)
func (AssociateStorerImpl) LiteListByFilter ¶
func (impl AssociateStorerImpl) LiteListByFilter(ctx context.Context, f *AssociatePaginationListFilter) (*AssociatePaginationLiteListResult, error)
func (AssociateStorerImpl) UpdateByID ¶
func (impl AssociateStorerImpl) UpdateByID(ctx context.Context, m *Associate) error
func (AssociateStorerImpl) UpsertByID ¶
func (impl AssociateStorerImpl) UpsertByID(ctx context.Context, user *Associate) error