Appearance
dbo.primeAppointments
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeAppointments.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | id | uniqueidentifier | no | Primary key / unique identifier for this record | |
| 2 | jobId | uniqueidentifier | yes | Foreign key to primeJobs | |
| 3 | appointmentStatus | nvarchar(100) | yes | Status of the appointment | |
| 4 | appointmentTypeId | uniqueidentifier | yes | Foreign key to primeAppointmentType | |
| 5 | primaryUserId | uniqueidentifier | yes | Foreign key to primeUsers - the primary user for this record | |
| 6 | start | datetime | yes | Start timestamp | |
| 7 | end | datetime | yes | End timestamp | |
| 8 | instructions | nvarchar(MAX) | yes | Free-text instructions | |
| 9 | notes | nvarchar(MAX) | yes | Free-text internal notes | |
| 10 | createdAt | datetime | yes | Timestamp the record was created | |
| 11 | createdBy | nvarchar(100) | yes | User/system that created the record | |
| 12 | updatedAt | datetime | yes | Timestamp the record was last updated | |
| 13 | updatedBy | nvarchar(100) | yes | User/system that last updated the record | |
| 14 | version | bigint | yes | Optimistic-concurrency row version number |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__primeApp__3213E83FF949F251 | CLUSTERED | yes | yes | id |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.ethAppointmentInstance.PrimeAppointmentId | dbo.primeAppointments.id | low |
| dbo.ethBooking.primeAppointmentID | dbo.primeAppointments.id | high |
| dbo.OptimoRouteLog.AppointmentID | dbo.primeAppointments.id | high |
| dbo.optimoRouteOrder.primeAppointmentID | dbo.primeAppointments.id | high |
| dbo.optimoRouteOrder.primeJobID | dbo.primeAppointments.jobId | medium |
| dbo.optimoRouteOrder.Version | dbo.primeAppointments.version | medium |
| dbo.primeAppointments.appointmentTypeId | dbo.primeAppointmentType.id | high |
| dbo.primeAppointments.appointmentTypeId | dbo.ethBookingService.primeAppointmentTypeID | medium |
| dbo.primeAppointments.createdBy | dbo.primeUsers.fullName | high |
| dbo.primeAppointments.jobId | dbo.primeJobs.Id | high |
| dbo.primeAppointments.primaryUserId | dbo.primeUsers.id | high |
| dbo.primeAppointments.primaryUserId | dbo.primeContacts.id | medium |
Referenced by
Views: dbo.VPrimeEstimatorstagesEstimatorworkflowdb
Procedures: dbo.spEthBookingDaySlotUpsert_deprecated, dbo.spEthBookingGetAvailabilityPerSlot_Deprecated, dbo.spEthBookingGetChangedAppointments, dbo.spEthBookingGetOnBook, dbo.spEthBookingGetOnCancel, dbo.spEthBookingGetOnCreate, dbo.spEthCreateAppointment, dbo.spEthFindNextAvailableSlot, dbo.spEthWIPJobClientNoteQueue, dbo.spOptimoRouteGetAllowAdvancedBookings, dbo.spOptimoRouteGetAppointmentCompletionQueue, dbo.spOptimoRouteGetAppointmentQueue, dbo.spOptimoRouteGetAppointmentScheduledEstimatorQueue, dbo.spOptimoRouteGetCountOrderFixedTime_Deprecated, dbo.spOptimoRouteGetLogs, dbo.spOptimoRouteGetLogsPaged, dbo.spOptimoRouteGetNotScheduledOrders, dbo.spOptimoRouteGetNotScheduledOrdersEmailQueue, dbo.spOptimoRouteGetScheduledOrders, dbo.spOptimoRouteOrderGetActiveByJob, dbo.spPrimeGetAppointment, dbo.spPrimeGetAppointmentsNextDates, dbo.spPrimeGetAppointmentVersion, dbo.spPrimeUpsertAppointments, dbo.spRefreshEstimatorStageSummary

