Skip to content

Views

Generated by pnpm docs:reference from the local database (BE-M0-31). Never edit this page by hand (D27).

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

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

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

security_invoker: the reader's own row-level security applies.

Column Type
driver_id uuid
organization_id uuid
pool_id uuid
clearance text

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

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

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

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

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

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

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