Views
Generated by pnpm docs:reference from the local database (BE-M0-31). Never edit this page by hand (D27).
v_charge_balance
Section titled “v_charge_balance”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
charge_id |
uuid |
organization_id |
uuid |
driver_id |
uuid |
rental_id |
uuid |
legal_entity_id |
uuid |
charge_type_id |
uuid |
charge_date |
date |
due_date |
date |
amount |
bigint |
status |
charge_status |
allocated |
numeric |
adjusted |
numeric |
balance |
numeric |
v_checkpoint_due
Section titled “v_checkpoint_due”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
vehicle_id |
uuid |
organization_id |
uuid |
pool_id |
uuid |
plate_number |
text |
last_checkpoint_at |
timestamp with time zone |
interval_weeks |
integer |
due_from |
date |
due_to |
date |
is_overdue |
boolean |
v_driver_balance
Section titled “v_driver_balance”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
driver_id |
uuid |
organization_id |
uuid |
pool_id |
uuid |
open_balance |
numeric |
overdue_balance |
numeric |
oldest_due |
date |
v_driver_clearance
Section titled “v_driver_clearance”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
driver_id |
uuid |
organization_id |
uuid |
pool_id |
uuid |
clearance |
text |
v_fleet_monitor
Section titled “v_fleet_monitor”security_invoker: the reader's own row-level security applies. One row per car the caller reads for /fleet-monitor: its active device, latest position and state live, stale, no_data or no_device; driver_name only for a driver:read holder (R-GPS-31 to R-GPS-33).
| Column | Type |
|---|---|
vehicle_id |
uuid |
organization_id |
uuid |
pool_id |
uuid |
pool_code |
text |
unit_code |
text |
plate_number |
text |
status |
vehicle_status |
gps_device_id |
uuid |
slot |
gps_slot |
recorded_at |
timestamp with time zone |
latitude |
double precision |
longitude |
double precision |
speed_kmh |
numeric(6,2) |
last_seen |
timestamp with time zone |
is_stale |
boolean |
state |
text |
driver_name |
text |
v_gps_devices
Section titled “v_gps_devices”security_invoker: the reader's own row-level security applies. A car's linked GPS devices with slot, active or standby and the time of the last position (R-GPS-35).
| Column | Type |
|---|---|
id |
uuid |
vehicle_id |
uuid |
provider |
text |
external_id |
text |
imei |
text |
slot |
gps_slot |
is_active |
boolean |
installed_on |
date |
last_recorded_at |
timestamp with time zone |
v_insurance_expiry
Section titled “v_insurance_expiry”security_invoker: the reader's own row-level security applies. One row per car that isn't inactive, with its latest-ending policy and insurance state (R-ASR-25, R-ASR-29, R-ASR-30).
| Column | Type |
|---|---|
vehicle_id |
uuid |
organization_id |
uuid |
unit_code |
text |
plate_number |
text |
pool_id |
uuid |
pool_code |
text |
pool_name |
text |
policy_id |
uuid |
insurer_id |
uuid |
insurer_name |
text |
policy_number |
text |
ends_on |
date |
state |
text |
days_left |
integer |
v_insurance_policies
Section titled “v_insurance_policies”security_invoker: the reader's own row-level security applies. Every policy of a car with its insurer, its own state and days left, and whether it is the car's current one (R-ASR-25, R-ASR-31).
| Column | Type |
|---|---|
id |
uuid |
organization_id |
uuid |
vehicle_id |
uuid |
insurer_id |
uuid |
insurer_name |
text |
insurer_is_active |
boolean |
policy_number |
text |
coverage |
text |
starts_on |
date |
ends_on |
date |
premium |
bigint |
state |
text |
days_left |
integer |
is_current |
boolean |
v_vehicle_photos
Section titled “v_vehicle_photos”security_invoker: the reader's own row-level security applies. The photo each side of a car shows: the latest v2 photo with a file, else the file from v1 (R-VEH-56, R-VEH-60, R-VEH-61).
| Column | Type |
|---|---|
vehicle_id |
uuid |
organization_id |
uuid |
side |
vehicle_photo_side |
source |
text |
id |
uuid |
bucket |
text |
storage_path |
storage_path |
content_type |
text |
taken_at |
timestamp with time zone |
created_at |
timestamp with time zone |
v_vehicle_position
Section titled “v_vehicle_position”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
vehicle_id |
uuid |
organization_id |
uuid |
pool_id |
uuid |
gps_device_id |
uuid |
slot |
gps_slot |
recorded_at |
timestamp with time zone |
location |
geography(Point,4326) |
speed_kmh |
numeric(6,2) |
latitude |
double precision |
longitude |
double precision |
last_seen |
timestamp with time zone |
is_stale |
boolean |
v_vehicles
Section titled “v_vehicles”security_invoker: the reader's own row-level security applies.
| Column | Type |
|---|---|
id |
uuid |
organization_id |
uuid |
unit_code |
text |
plate_number |
text |
pool_id |
uuid |
pool_code |
text |
pool_name |
text |
rental_company_id |
uuid |
rental_company_name |
text |
brand_name |
text |
model_id |
uuid |
model_name |
text |
year |
smallint |
color |
text |
vin |
text |
odometer_km |
integer |
status |
vehicle_status |
supply_status |
supply_status |