Description:
Captures information about vehicle damages, including details, location, severity, and associated rentals, users, and branches. Tracks who reported and updated the damage as well as timestamps for lifecycle management.
🔑 Primary Key
id
| Field Name | Data Type | Description |
|---|---|---|
id |
NUMBER |
Unique identifier for the damage record. |
description |
TEXT |
Free-text description of the damage. |
part |
TEXT |
Vehicle part affected by the damage. |
state |
NUMBER |
Current state of the damage. (0 => NEW. 1 => APPROVED. 2 => UNDER_REPAIR. 3 => REPAIRED. 4 => IGNORED) |
state_name |
TEXT |
String label for state. |
vehicle_position |
GEOMETRY |
Geolocation of the vehicle when the damage was recorded. |
user_position |
GEOMETRY |
Geolocation of the user when the damage was recorded. |
branch_id |
NUMBER |
Identifier of the branch where the damage was reported. |
vehicle_id |
NUMBER |
Identifier of the damaged vehicle. |
current_rental_id |
NUMBER |
Identifier of the current rental associated with the damage. |
previous_rental_id |
NUMBER |
Identifier of the previous rental where the damage may have occurred. |
reported_by_id |
NUMBER |
Identifier of the user who reported the damage. |
created_by |
NUMBER |
Identifier of the user who created the record. |
updated_by |
NUMBER |
Identifier of the user who last updated the record. |
updated_at |
TIMESTAMP_TZ |
Timestamp when the damage record was last updated. |
created_at |
TIMESTAMP_TZ |
Timestamp when the damage record was created. |
repair_code |
TEXT |
Code representing the type of repair required. |
severity |
NUMBER |
Severity level of the damage. (0 => MINOR. 1 => MEDIUM. 2 => CRITICAL. 3 => HIGH) |
severity_name |
TEXT |
String label for severity. |
caused_by_id |
NUMBER |
Identifier of the user or entity who caused the damage. |
issue_id |
NUMBER |
Identifier of the issue associated with the damage (if applicable). |
_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. |