Description:
Represents a reservation or usage session of a vehicle in the mobility platform. Each booking contains timeframes, pricing, location data, and associations to users, vehicles, and rentals. Created for pre-booking to hold a vehicle for a specified time window before pickup. Once the user picks up, the system creates a rental and links it back to the booking. Bookings are not revenue events; they drive availability and planning.
🔑 Primary Key
id
| Field Name | Data Type | Description |
|---|---|---|
id |
NUMBER | Unique identifier for the booking. |
guser_id |
NUMBER | User who made the booking. |
group_id |
NUMBER | If part of a group or fleet booking, the group identifier. |
branch_id |
NUMBER | Branch where the booking originated. |
end_branch_id |
NUMBER | Branch where the booking ended, if different from branch_id. |
vehicle_id |
NUMBER | Vehicle used for the booking. |
vehicle_category_id |
NUMBER | Category classification for the vehicle. |
vehicle_type |
NUMBER | Enum representing the type of vehicle (0 => NIU. 1 => NIU_MC. 2 => DUMMY. 3 => NIU_PRTCL. 4 => NINEBOT_ES2. 5 => CUCA_BIKE. 6 => TRACKER. 7 => COMODULE_NINEBOT_ES2. 8 => GOVECS_GOT. 9 => NINEBOT_ES2_TLT. 10 => MANUAL_KICKSCOOTER. 11 => MANUAL_BICYCLE. 12 => NIU_TLT. 13 => SUPER_SOCO_TLT_125. 14 => CAR_TLT. 15 => SEGWAY_V1. 16 => NIU_V2. 17 => CAR_TLT_RELAIS. 18 => LANNMARKER_ZIMO. 19 => INVERS_CAR. 20 => DEVICE_CLOUD. 21 => NIU_V2_READ). |
vehicle_type_name |
TEXT | String label for vehicle_type. |
state |
NUMBER | Booking state (0 => BOOKED. 1 => APPROVED. 2 => DELIVERED. 3 => SUCCESSFUL. 4 => CANCELED. 5 => ABORTED. 6 => EXPIRED. 7 => DECLINED). |
state_name |
TEXT | String label for state. |
type |
NUMBER | Booking type (0 => STATION. 1 => FLOATING). |
type_name |
TEXT | String label for type. |
start_time |
TIMESTAMP_TZ | Scheduled or actual start time of the booking. |
end_time |
TIMESTAMP_TZ | Scheduled or actual end time of the booking. |
rental_id |
NUMBER | Associated rental record (if one exists). |
linked_booking_id |
NUMBER | Related or parent booking, used for chaining or multi-leg trips. |
start_position |
GEOMETRY | Starting location of the booking. |
start_position_radius |
FLOAT | Allowed radius (in meters) from the start position. |
rental_type |
NUMBER | Type of rental (0 => PERSONAL. 1 => BUSINESS. 2 => SERVICE). |
rental_type_name |
TEXT | String label for rental_type. |
rental_source |
NUMBER | Source of rental (0 => INTERNAL. 1 => GAIYO. 2 => TURNN). |
rental_source_name |
TEXT | String label for rental_source. |
invoice_id |
NUMBER | ID of the invoice generated for this booking. |
cost_center_id |
NUMBER | ID for cost center allocation (for business accounting). |
costs |
NUMBER | Total cost of the booking. |
price_v3 |
VARIANT | Flexible pricing metadata in JSON format. Sample Value: { “additions”: {}, “currency”: “EUR”, “penalties”: { “pricing.penalty.cancellation”: { “UNCATEGORIZED”: 9.18 } }, “price”: {}, “rebates”: {}, “scale”: 2, “surcharges”: {}, “tax”: 1.53, “taxPercentage”: 20, “totalGross”: 9.18, “totalNet”: 7.65 } |
pricing_bundle_id |
NUMBER | ID of the pricing bundle applied to this booking. |
pricing_bundle_version_id |
NUMBER | ID of the specific pricing bundle version applied to this booking. |
reason |
TEXT | Optional comment or system message about the booking. |
ext_ref |
TEXT | External reference ID (e.g., from a third-party system). |
rejection_reason |
TEXT | Reason provided for rejection (e.g., vehicle unavailable). |
created_at |
TIMESTAMP_TZ | Timestamp when the booking was created. |
updated_at |
TIMESTAMP_TZ | Timestamp of the last update to the booking. |
created_by |
NUMBER | User or system that created the booking. |
updated_by |
NUMBER | User or system that last modified the booking. |
_snowflake_inserted_at |
TIMESTAMP_NTZ | System timestamp when the record was inserted into Snowflake. |
_snowflake_updated_at |
TIMESTAMP_NTZ | System timestamp when the record was last updated in Snowflake. |
_snowflake_deleted |
BOOLEAN | True if the record was deleted in the source. |