Documentation
¶
Index ¶
- Constants
- type ComplianceStatus
- type DocumentRequirement
- func (dr *DocumentRequirement) BeforeAppendModel(_ context.Context, query bun.Query) error
- func (dr *DocumentRequirement) DBValidate(ctx context.Context, tx bun.IDB) *errors.MultiError
- func (dr *DocumentRequirement) GetTableName() string
- func (dr *DocumentRequirement) Validate(ctx context.Context, multiErr *errors.MultiError)
- type DocumentRequirementType
- type DocumentReview
- type DocumentStatus
- type DocumentType
- type EndorsementType
- type PTOStatus
- type PTOType
- type RetentionPeriod
- type VerificationStatus
- type Worker
- func (w *Worker) BeforeAppendModel(_ context.Context, query bun.Query) error
- func (w *Worker) FullName() string
- func (w *Worker) GetID() string
- func (w *Worker) GetPostgresSearchConfig() infra.PostgresSearchConfig
- func (w *Worker) GetSearchType() string
- func (w *Worker) GetTableName() string
- func (w *Worker) ToDocument() infra.SearchDocument
- func (w *Worker) Validate(ctx context.Context, multiErr *errors.MultiError)
- type WorkerDocument
- func (wd *WorkerDocument) BeforeAppendModel(_ context.Context, query bun.Query) error
- func (wd *WorkerDocument) DBValidate(ctx context.Context, _ bun.IDB, multiErr *errors.MultiError, index int)
- func (wd *WorkerDocument) GetTableName() string
- func (wd *WorkerDocument) Validate(ctx context.Context, multiErr *errors.MultiError, index int)
- type WorkerPTO
- type WorkerProfile
- type WorkerType
Constants ¶
View Source
const ( // WorkerTypeEmployee is the type of worker for an employee WorkerTypeEmployee = WorkerType("Employee") // WorkerTypeContractor is the type of worker for a contractor WorkerTypeContractor = WorkerType("Contractor") )
View Source
const ( // EndorsementTypeNone is the type of endorsement for no endorsement EndorsementNone = EndorsementType("O") // EndorsementTanker is the type of endorsement for tanker endorsement EndorsementTanker = EndorsementType("N") // EndorsementHazmat is the type of endorsement for hazmat endorsement EndorsementHazmat = EndorsementType("H") // EndorsementTankerHazmat is the type of endorsement for tanker hazmat endorsement EndorsementTankerHazmat = EndorsementType("X") // EndorsementPassenger is the type of endorsement for passenger endorsement EndorsementPassenger = EndorsementType("P") // EndorsementDoublesTriples is the type of endorsement for doubles/triples endorsement EndorsementDoublesTriples = EndorsementType("T") )
View Source
const ( // PTOTypePersonal is the type of PTO for personal leave PTOTypePersonal = PTOType("Personal") // PTOTypeVacation is the type of PTO for vacation leave PTOTypeVacation = PTOType("Vacation") // PTOTypeSick is the type of PTO for sick leave PTOTypeSick = PTOType("Sick") // PTOTypeHoliday is the type of PTO for holiday leave PTOTypeHoliday = PTOType("Holiday") // PTOTypeBereavement is the type of PTO for bereavement leave PTOTypeBereavement = PTOType("Bereavement") // PTOTypeMaternity is the type of PTO for maternity leave PTOTypeMaternity = PTOType("Maternity") // PTOTypePaternity is the type of PTO for paternity leave PTOTypePaternity = PTOType("Paternity") )
View Source
const ( // PTOStatusRequested lets the worker know that the PTO request has been requested // This is typically used when the PTO request is created by the worker PTOStatusRequested = PTOStatus("Requested") // PTOStatusApproved lets the worker know that the PTO request has been approved // This is typically used when the PTO request is approved by the manager PTOStatusApproved = PTOStatus("Approved") // PTOStatusRejected lets the worker know that the PTO request has been rejected // This is typically used when the PTO request is rejected by the manager PTOStatusRejected = PTOStatus("Rejected") // PTOStatusCancelled lets the worker know that the PTO request has been cancelled // This is typically used when the PTO request is cancelled by the worker themselves PTOStatusCancelled = PTOStatus("Cancelled") )
View Source
const ( // DocumentTypeMVR is the type of document for a MVR(Motor Vehicle Record) DocumentTypeMVR = DocumentType("MVR") // DocumentTypeMedicalCert is the type of document for a Medical Certificate DocumentTypeMedicalCert = DocumentType("MedicalCert") // DocumentTypeCDL is the type of document for a CDL DocumentTypeCDL = DocumentType("CDL") // DocumentTypeViolationCert is the type of document for a Violation Certificate DocumentTypeViolationCert = DocumentType("ViolationCert") // DocumentTypeEmploymentHistory is the type of document for an Employment History DocumentTypeEmploymentHistory = DocumentType("EmploymentHistory") // DocumentTypeDrugTest is the type of document for a Drug Test DocumentTypeDrugTest = DocumentType("DrugTest") // DocumentTypeRoadTest is the type of document for a Road Test DocumentTypeRoadTest = DocumentType("RoadTest") // DocumentTypeTrainingCert is the type of document for a Training Certificate DocumentTypeTrainingCert = DocumentType("TrainingCert") )
View Source
const ( // DocumentStatusPending lets the worker know that the document is pending DocumentStatusPending = DocumentStatus("Pending") // DocumentStatusActive lets the worker know that the document is active DocumentStatusActive = DocumentStatus("Active") // DocumentStatusExpired lets the worker know that the document is expired DocumentStatusExpired = DocumentStatus("Expired") // DocumentStatusRejected lets the worker know that the document is rejected DocumentStatusRejected = DocumentStatus("Rejected") // DocumentStatusRevoked lets the worker know that the document is revoked DocumentStatusRevoked = DocumentStatus("Revoked") )
View Source
const ( // VerificationStatusPending lets the worker know that the document is pending VerificationStatusPending = VerificationStatus("Pending") // VerificationStatusVerified lets the worker know that the document is verified VerificationStatusVerified = VerificationStatus("Verified") // VerificationStatusRejected lets the worker know that the document is rejected VerificationStatusRejected = VerificationStatus("Rejected") // VerificationStatusIncomplete lets the worker know that the document is incomplete VerificationStatusIncomplete = VerificationStatus("Incomplete") )
View Source
const ( // RequirementTypeOngoing represents documents that need periodic renewal RequirementTypeOngoing = DocumentRequirementType("Ongoing") // RequirementTypeOneTime represents documents that are collected once RequirementTypeOneTime = DocumentRequirementType("OneTime") // RequirementTypeConditional represents documents that are required based on certain conditions RequirementTypeConditional = DocumentRequirementType("Conditional") )
View Source
const ( // RetentionPeriodThreeYears represents the standard 3-year retention period RetentionPeriodThreeYears = RetentionPeriod("3Years") // RetentionPeriodLifeOfEmployment represents retention for employment duration plus 3 years RetentionPeriodLifeOfEmployment = RetentionPeriod("LifeOfEmployment") // RetentionPeriodCustom represents a custom retention period RetentionPeriodCustom = RetentionPeriod("Custom") )
View Source
const ( // ComplianceStatusCompliant lets the worker know that the worker is compliant ComplianceStatusCompliant = ComplianceStatus("Compliant") // ComplianceStatusNonCompliant lets the worker know that the worker is non-compliant ComplianceStatusNonCompliant = ComplianceStatus("NonCompliant") // ComplianceStatusPending lets the worker know that the worker is pending ComplianceStatusPending = ComplianceStatus("Pending") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComplianceStatus ¶
type ComplianceStatus string
type DocumentRequirement ¶
type DocumentRequirement struct { bun.BaseModel `bun:"table:document_requirements,alias:dr" json:"-"` // Primary identifiers ID pulid.ID `bun:"id,type:VARCHAR(100),pk,notnull" json:"id"` OrganizationID pulid.ID `bun:"organization_id,type:VARCHAR(100),pk,notnull" json:"organizationId"` BusinessUnitID pulid.ID `bun:"business_unit_id,type:VARCHAR(100),notnull" json:"businessUnitId"` // Core Fields Name string `bun:"name,type:VARCHAR(255),notnull" json:"name"` Description string `bun:"description,type:TEXT" json:"description"` DocumentType DocumentType `bun:"document_type,type:document_type_enum,notnull" json:"documentType"` RequirementType DocumentRequirementType `bun:"requirement_type,type:document_requirement_type_enum,notnull" json:"requirementType"` // CFR Reference CFRTitle string `bun:"cfr_title,type:VARCHAR(100)" json:"cfrTitle"` CFRPart string `bun:"cfr_part,type:VARCHAR(100)" json:"cfrPart"` CFRSection string `bun:"cfr_section,type:VARCHAR(100)" json:"cfrSection"` CFRUrl string `bun:"cfr_url,type:VARCHAR(255)" json:"cfrUrl"` // Timing and Retention RetentionPeriod RetentionPeriod `bun:"retention_period,type:retention_period_enum,notnull" json:"retentionPeriod"` CustomRetentionDays *int `bun:"custom_retention_days,type:INTEGER" json:"customRetentionDays,omitempty"` RenewalPeriodDays *int `bun:"renewal_period_days,type:INTEGER" json:"renewalPeriodDays,omitempty"` ReminderDays []int `bun:"reminder_days,type:INTEGER[]" json:"reminderDays,omitempty"` // Validation and Requirements IsRequired bool `bun:"is_required,type:BOOLEAN,notnull" json:"isRequired"` ValidationRules map[string]any `bun:"validation_rules,type:JSONB" json:"validationRules,omitempty"` BlocksAssignment bool `bun:"blocks_assignment,type:BOOLEAN,notnull" json:"blocksAssignment"` // Metadata Version int64 `bun:"version,type:BIGINT,notnull" json:"version"` CreatedAt int64 `bun:"created_at,nullzero,notnull,default:extract(epoch from current_timestamp)::bigint" json:"createdAt"` UpdatedAt int64 `bun:"updated_at,nullzero,notnull,default:extract(epoch from current_timestamp)::bigint" json:"updatedAt"` // Relationships BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` }
func (*DocumentRequirement) BeforeAppendModel ¶
BeforeAppendModel is a bun hook that sets the createdAt and updatedAt fields
func (*DocumentRequirement) DBValidate ¶
func (dr *DocumentRequirement) DBValidate(ctx context.Context, tx bun.IDB) *errors.MultiError
func (*DocumentRequirement) GetTableName ¶
func (dr *DocumentRequirement) GetTableName() string
func (*DocumentRequirement) Validate ¶
func (dr *DocumentRequirement) Validate(ctx context.Context, multiErr *errors.MultiError)
type DocumentRequirementType ¶
type DocumentRequirementType string
type DocumentReview ¶
type DocumentReview struct { bun.BaseModel `bun:"table:document_reviews,alias:dr" json:"-"` // Primary identifiers ID pulid.ID `json:"id" bun:"id,type:VARCHAR(100),pk,notnull"` BusinessUnitID pulid.ID `json:"businessUnitId" bun:"business_unit_id,type:VARCHAR(100),pk,notnull"` OrganizationID pulid.ID `json:"organizationId" bun:"organization_id,type:VARCHAR(100),pk,notnull"` WorkerDocumentID pulid.ID `json:"workerDocumentId" bun:"worker_document_id,type:VARCHAR(100),pk,notnull"` ReviewerID pulid.ID `json:"reviewerId" bun:"reviewer_id,type:VARCHAR(100),notnull"` // Core Fields Status DocumentStatus `json:"status" bun:"status,type:document_status_enum,notnull"` Comments string `json:"comments" bun:"comments,type:TEXT"` ReviewedAt int64 `json:"reviewedAt" bun:"reviewed_at,type:BIGINT,notnull"` // Metadata CreatedAt int64 `json:"createdAt" bun:"created_at,notnull,default:extract(epoch from current_timestamp)::bigint"` UpdatedAt int64 `json:"updatedAt" bun:"updated_at,notnull,default:extract(epoch from current_timestamp)::bigint"` // Relationships WorkerDocument *WorkerDocument `json:"workerDocument,omitempty" bun:"rel:belongs-to,join:worker_document_id=id"` Reviewer *user.User `json:"reviewer,omitempty" bun:"rel:belongs-to,join:reviewer_id=id"` BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` }
func (*DocumentReview) BeforeAppendModel ¶
BeforeAppendModel is a bun hook that sets the createdAt and updatedAt fields
func (*DocumentReview) GetTableName ¶
func (dr *DocumentReview) GetTableName() string
func (*DocumentReview) Validate ¶
func (dr *DocumentReview) Validate(ctx context.Context, multiErr *errors.MultiError, index int)
type DocumentStatus ¶
type DocumentStatus string
DocumentStatus represents the current status of a document
type DocumentType ¶
type DocumentType string
DocumentType represents different types of required driver documents
type EndorsementType ¶
type EndorsementType string
type RetentionPeriod ¶
type RetentionPeriod string
type VerificationStatus ¶
type VerificationStatus string
VerificationStatus represents the verification state of a document
type Worker ¶
type Worker struct { bun.BaseModel `bun:"table:workers,alias:wrk" json:"-"` // Primary identifiers ID pulid.ID `json:"id" bun:"id,pk,type:VARCHAR(100)"` BusinessUnitID pulid.ID `json:"businessUnitId" bun:"business_unit_id,type:VARCHAR(100),notnull"` OrganizationID pulid.ID `json:"organizationId" bun:"organization_id,type:VARCHAR(100),pk,notnull"` StateID pulid.ID `json:"stateId" bun:"state_id,type:VARCHAR(100),notnull"` FleetCodeID *pulid.ID `json:"fleetCodeId" bun:"fleet_code_id,type:VARCHAR(100)"` // Core Fields Status domain.Status `json:"status" bun:"status,type:status_enum,notnull,default:'Active'"` Type WorkerType `json:"type" bun:"type,type:worker_type_enum,notnull,default:'Employee'"` ProfilePicURL string `json:"profilePicUrl" bun:"profile_pic_url,type:VARCHAR(255)"` FirstName string `json:"firstName" bun:"first_name,type:VARCHAR(100),notnull"` LastName string `json:"lastName" bun:"last_name,type:VARCHAR(100),notnull"` AddressLine1 string `json:"addressLine1" bun:"address_line1,type:VARCHAR(150),notnull"` AddressLine2 string `json:"addressLine2" bun:"address_line2,type:VARCHAR(150)"` City string `json:"city" bun:"city,type:VARCHAR(100),notnull"` PostalCode string `json:"postalCode" bun:"postal_code,type:VARCHAR(20),notnull"` Gender domain.Gender `json:"gender" bun:"gender,type:gender_enum,notnull"` CanBeAssigned bool `json:"canBeAssigned" bun:"can_be_assigned,type:BOOLEAN,notnull,default:false"` AssignmentBlocked string `json:"assignmentBlocked,omitempty" bun:"assignment_blocked,type:VARCHAR(255)"` // Metadata Version int64 `json:"version" bun:"version,type:BIGINT"` CreatedAt int64 `json:"createdAt" bun:"created_at,notnull,default:extract(epoch from current_timestamp)::bigint"` UpdatedAt int64 `json:"updatedAt" bun:"updated_at,notnull,default:extract(epoch from current_timestamp)::bigint"` SearchVector string `json:"-" bun:"search_vector,type:TSVECTOR,scanonly"` Rank string `json:"-" bun:"rank,type:VARCHAR(100),scanonly"` // Relationships BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` State *usstate.UsState `json:"state,omitempty" bun:"rel:belongs-to,join:state_id=id"` Profile *WorkerProfile `json:"profile,omitempty" bun:"rel:has-one,join:id=worker_id"` Documents []*WorkerDocument `json:"documents,omitempty" bun:"rel:has-many,join:id=worker_id"` PTO []*WorkerPTO `json:"pto,omitempty" bun:"rel:has-many,join:id=worker_id"` }
func (*Worker) BeforeAppendModel ¶
func (*Worker) GetPostgresSearchConfig ¶
func (w *Worker) GetPostgresSearchConfig() infra.PostgresSearchConfig
func (*Worker) GetSearchType ¶
func (*Worker) GetTableName ¶
func (*Worker) ToDocument ¶
func (w *Worker) ToDocument() infra.SearchDocument
type WorkerDocument ¶
type WorkerDocument struct { bun.BaseModel `bun:"table:worker_documents,alias:wdoc" json:"-"` // Primary identifiers ID pulid.ID `json:"id" bun:"id,pk,type:VARCHAR(100)"` WorkerID pulid.ID `json:"workerId" bun:"worker_id,type:VARCHAR(100),notnull"` DocumentRequirementID pulid.ID `json:"documentRequirementId" bun:"document_requirement_id,type:VARCHAR(100),notnull"` BusinessUnitID pulid.ID `json:"businessUnitId" bun:"business_unit_id,type:VARCHAR(100),notnull"` OrganizationID pulid.ID `json:"organizationId" bun:"organization_id,type:VARCHAR(100),pk,notnull"` // Core fields Status DocumentStatus `json:"status" bun:"status,type:document_status_enum,notnull"` FileURL string `json:"fileUrl" bun:"file_url,type:VARCHAR(255),notnull"` IssueDate int64 `json:"issueDate" bun:"issue_date,type:BIGINT,notnull"` ExpiryDate *int64 `bun:"expiry_date,type:BIGINT" json:"expiryDate"` // Document Metadata/Validation ValidationData map[string]any `json:"validationData" bun:"validation_data,type:JSONB"` ReviewerID *pulid.ID `json:"reviewerId" bun:"reviewer_id,type:VARCHAR(100)"` ReviewedAt *int64 `json:"reviewedAt" bun:"reviewed_at,type:BIGINT"` // Metadata Version int64 `json:"version" bun:"version,type:BIGINT"` CreatedAt int64 `json:"createdAt" bun:"created_at,notnull,default:extract(epoch from current_timestamp)::bigint"` UpdatedAt int64 `json:"updatedAt" bun:"updated_at,notnull,default:extract(epoch from current_timestamp)::bigint"` // Relationships Worker *Worker `json:"worker,omitempty" bun:"rel:belongs-to,join:worker_id=id"` DocumentRequirement *DocumentRequirement `json:"documentRequirement,omitempty" bun:"rel:belongs-to,join:document_requirement_id=id"` BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` Reviewer *user.User `json:"reviewer,omitempty" bun:"rel:belongs-to,join:reviewer_id=id"` }
func (*WorkerDocument) BeforeAppendModel ¶
BeforeAppendModel is a bun hook that sets the createdAt and updatedAt fields
func (*WorkerDocument) DBValidate ¶
func (wd *WorkerDocument) DBValidate(ctx context.Context, _ bun.IDB, multiErr *errors.MultiError, index int)
func (*WorkerDocument) GetTableName ¶
func (wd *WorkerDocument) GetTableName() string
func (*WorkerDocument) Validate ¶
func (wd *WorkerDocument) Validate(ctx context.Context, multiErr *errors.MultiError, index int)
type WorkerPTO ¶
type WorkerPTO struct { bun.BaseModel `bun:"table:worker_pto,alias:wpto" json:"-"` // Primary identifiers ID pulid.ID `json:"id" bun:"id,pk,type:VARCHAR(100)"` BusinessUnitID pulid.ID `bun:"business_unit_id,type:VARCHAR(100),notnull,pk" json:"businessUnitId"` OrganizationID pulid.ID `bun:"organization_id,type:VARCHAR(100),notnull,pk" json:"organizationId"` WorkerID pulid.ID `bun:"worker_id,type:VARCHAR(100),notnull,pk" json:"workerId"` // Relationship identifiers (Non-Primary-Keys) ApproverID *pulid.ID `bun:"approver_id,type:VARCHAR(100),nullzero" json:"approverId"` // Core Fields Status PTOStatus `json:"status" bun:"status,type:worker_pto_status_enum,notnull,default:'Requested'"` Type PTOType `json:"type" bun:"type,type:worker_pto_type_enum,notnull,default:'Vacation'"` StartDate int64 `json:"startDate" bun:"start_date,type:BIGINT,notnull"` EndDate int64 `json:"endDate" bun:"end_date,type:BIGINT,notnull"` Reason string `json:"reason" bun:"reason,type:VARCHAR(255),notnull"` // Metadata Version int64 `json:"version" bun:"version,type:BIGINT"` CreatedAt int64 `json:"createdAt" bun:"created_at,notnull,default:extract(epoch from current_timestamp)::bigint"` UpdatedAt int64 `json:"updatedAt" bun:"updated_at,notnull,default:extract(epoch from current_timestamp)::bigint"` // Relationships BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` Worker *Worker `json:"worker,omitempty" bun:"rel:belongs-to,join:worker_id=id"` Approver *user.User `json:"approver,omitempty" bun:"rel:belongs-to,join:approver_id=id"` }
func (*WorkerPTO) BeforeAppendModel ¶
func (*WorkerPTO) IsCancelled ¶
func (*WorkerPTO) IsInvalid ¶
IsInvalid returns true if the PTO is cancelled, rejected, or both This indicates the PTO should not be considered for operations like overlap validation
func (*WorkerPTO) IsRejected ¶
type WorkerProfile ¶
type WorkerProfile struct { bun.BaseModel `bun:"table:worker_profiles,alias:wp" json:"-"` // Primary identifiers ID pulid.ID `bun:"id,type:VARCHAR(100),pk,notnull" json:"id"` WorkerID pulid.ID `bun:"worker_id,type:VARCHAR(100),notnull" json:"workerId"` BusinessUnitID pulid.ID `bun:"business_unit_id,type:VARCHAR(100),notnull" json:"businessUnitId"` OrganizationID pulid.ID `bun:"organization_id,type:VARCHAR(100),pk,notnull" json:"organizationId"` LicenseStateID pulid.ID `bun:"license_state_id,type:VARCHAR(100)" json:"licenseStateId"` // Core Fields DOB int64 `json:"dob" bun:"dob,type:BIGINT,notnull"` LicenseNumber string `json:"licenseNumber" bun:"license_number,type:VARCHAR(50),notnull"` Endorsement EndorsementType `json:"endorsement" bun:"endorsement,type:endorsement_type_enum,notnull,default:'O'"` HazmatExpiry int64 `json:"hazmatExpiry" bun:"hazmat_expiry,type:BIGINT"` LicenseExpiry int64 `json:"licenseExpiry" bun:"license_expiry,type:BIGINT,notnull"` HireDate int64 `json:"hireDate" bun:"hire_date,type:BIGINT,notnull"` TerminationDate *int64 `json:"terminationDate" bun:"termination_date,type:BIGINT,nullzero"` PhysicalDueDate *int64 `json:"physicalDueDate" bun:"physical_due_date,type:BIGINT,nullzero"` MVRDueDate *int64 `json:"mvrDueDate" bun:"mvr_due_date,type:BIGINT,nullzero"` ComplianceStatus ComplianceStatus `json:"complianceStatus" bun:"compliance_status,type:compliance_status_enum,notnull,default:'Pending'"` IsQualified bool `json:"isQualified" bun:"is_qualified,type:BOOLEAN,notnull,default:true"` DisqualificationReason string `json:"disqualificationReason,omitempty" bun:"disqualification_reason,type:TEXT"` LastComplianceCheck int64 `json:"lastComplianceCheck" bun:"last_compliance_check,type:BIGINT,notnull"` LastMVRCheck int64 `json:"lastMvrCheck" bun:"last_mvr_check,type:BIGINT,notnull"` LastDrugTest int64 `json:"lastDrugTest" bun:"last_drug_test,type:BIGINT,notnull"` // Metadata Version int64 `json:"version" bun:"version,type:BIGINT"` CreatedAt int64 `json:"createdAt" bun:"created_at,notnull,default:extract(epoch from current_timestamp)::bigint"` UpdatedAt int64 `json:"updatedAt" bun:"updated_at,notnull,default:extract(epoch from current_timestamp)::bigint"` // Relationships BusinessUnit *businessunit.BusinessUnit `json:"businessUnit,omitempty" bun:"rel:belongs-to,join:business_unit_id=id"` Organization *organization.Organization `json:"organization,omitempty" bun:"rel:belongs-to,join:organization_id=id"` LicenseState *usstate.UsState `json:"licenseState,omitempty" bun:"rel:belongs-to,join:license_state_id=id"` }
func (*WorkerProfile) BeforeAppendModel ¶
func (*WorkerProfile) Validate ¶
func (p *WorkerProfile) Validate(ctx context.Context, multiErr *errors.MultiError)
type WorkerType ¶
type WorkerType string
Click to show internal directories.
Click to hide internal directories.