Skip to Content
File StructurePackagesDbDocumentation for serviceOrder_lu.ts

Documentation for serviceOrder_lu.ts

This file defines several lookup tables and their relationships using drizzle-orm for managing service orders and their related entities in a PostgreSQL database.

Tables

serviceOrderCategoryLU

The serviceOrderCategoryLU table stores the categories of service orders.

ColumnData TypeDescription
idserialUnique identifier for the category. Primary key.
namevarcharName of the category.
descriptionvarcharDescription of the category.
createdAttimestampTimestamp when the category was created. Default is the current time.
updatedAttimestampTimestamp when the category was last updated. Updates automatically.
isActivebooleanIndicates if the category is active. Default is true.
createdByIdtextIdentifier of the user who created the category. References user.id.
updatedByIdtextIdentifier of the user who last updated the category. References user.id.

fareTypeLU

The fareTypeLU table stores the types of fares.

ColumnData TypeDescription
idserialUnique identifier for the fare type. Primary key.
namevarcharName of the fare type.
descriptionvarcharDescription of the fare type.
createdAttimestampTimestamp when the fare type was created. Default is the current time.
updatedAttimestampTimestamp when the fare type was last updated. Updates automatically.
isActivebooleanIndicates if the fare type is active. Default is true.
createdByIdtextIdentifier of the user who created the fare type. References user.id.
updatedByIdtextIdentifier of the user who last updated the fare type. References user.id.

fare

The fare table stores information about fares.

ColumnData TypeDescription
idvarcharUnique identifier for the fare. Primary key.
namevarcharName of the fare.
slugtextSlug for the fare.
typeIdintegerIdentifier of the fare type. References fareTypeLU.id.
costPerKmdoubleCost per kilometer.
initialCostdoubleInitial cost.
organizationIdvarcharIdentifier of the organization. References organization.id.
assistIdintegerIdentifier of the assist. References assist.id.
createdAttimestampTimestamp when the fare was created. Default is the current time.
updatedAttimestampTimestamp when the fare was last updated. Updates automatically.
isActivebooleanIndicates if the fare is active. Default is true.
createdByIdtextIdentifier of the user who created the fare. References user.id.
updatedByIdtextIdentifier of the user who last updated the fare. References user.id.

serviceOrderLogActionLU

The serviceOrderLogActionLU table stores the actions that can be logged for service orders.

ColumnData TypeDescription
idserialUnique identifier for the log action. Primary key.
namevarcharName of the log action.
displayNamevarcharDisplay name of the log action.
createdAttimestampTimestamp when the log action was created. Default is the current time.
updatedAttimestampTimestamp when the log action was last updated. Updates automatically.
isActivebooleanIndicates if the log action is active. Default is true.
createdByIdtextIdentifier of the user who created the log action. References user.id.
updatedByIdtextIdentifier of the user who last updated the log action. References user.id.

damageTypeLU

The damageTypeLU table stores the types of damages.

ColumnData TypeDescription
idserialUnique identifier for the damage type. Primary key.
namevarcharName of the damage type.
createdAttimestampTimestamp when the damage type was created. Default is the current time.
updatedAttimestampTimestamp when the damage type was last updated. Updates automatically.
isActivebooleanIndicates if the damage type is active. Default is true.
createdByIdtextIdentifier of the user who created the damage type. References user.id.
updatedByIdtextIdentifier of the user who last updated the damage type. References user.id.

serviceOrderTypeLU

The serviceOrderTypeLU table stores the types of service orders.

ColumnData TypeDescription
idserialUnique identifier for the service order type. Primary key.
namevarcharName of the service order type.
descriptionvarcharDescription of the service order type.
createdAttimestampTimestamp when the service order type was created. Default is the current time.
updatedAttimestampTimestamp when the service order type was last updated. Updates automatically.
isActivebooleanIndicates if the service order type is active. Default is true.
createdByIdtextIdentifier of the user who created the service order type. References user.id.
updatedByIdtextIdentifier of the user who last updated the service order type. References user.id.
Last updated on