mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 05:18:11 +00:00
seed vehicle
This commit is contained in:
@@ -34,6 +34,16 @@ const EDR_TRUCK_FLEET: ReadonlyArray<readonly [string, string]> = [
|
||||
/** Fleet sequence numbers (1-based) that are 20ft-only. 6 of 62 — fill once confirmed. */
|
||||
const TWENTY_FT_SEQS = new Set<number>();
|
||||
|
||||
/**
|
||||
* PLACEHOLDER haulage rate, ETB per km — NOT a real EDR tariff.
|
||||
*
|
||||
* First/last-mile billing is `distance × pricePerKm`, and a truck with no rate
|
||||
* is refused at assignment, which would leave the whole demo flow unusable. This
|
||||
* exists so the flow is clickable end to end; every amount it produces is
|
||||
* fiction. Replace per truck in the fleet UI before anything bills for real.
|
||||
*/
|
||||
const PLACEHOLDER_PRICE_PER_KM = 50;
|
||||
|
||||
@Injectable()
|
||||
export class EdrTruckFleetSeeder {
|
||||
private readonly logger = new Logger(EdrTruckFleetSeeder.name);
|
||||
@@ -50,7 +60,7 @@ export class EdrTruckFleetSeeder {
|
||||
const columns = [
|
||||
'code', 'plate_number', 'registration_number', 'power_plate_no', 'trailer_plate_no',
|
||||
'vehicle_type', 'manufacturer', 'model', 'year', 'fuel_type', 'capacity',
|
||||
'status', 'ownership', 'currency', 'description',
|
||||
'status', 'ownership', 'currency', 'price_per_km', 'description',
|
||||
];
|
||||
|
||||
const rows: unknown[][] = EDR_TRUCK_FLEET.map(([power, trailer], i) => {
|
||||
@@ -71,7 +81,9 @@ export class EdrTruckFleetSeeder {
|
||||
'ACTIVE',
|
||||
'EDR',
|
||||
'ETB',
|
||||
`EDR-owned container truck configured for ${ft} containers.`,
|
||||
PLACEHOLDER_PRICE_PER_KM,
|
||||
`EDR-owned container truck configured for ${ft} containers. ` +
|
||||
`Rate ${PLACEHOLDER_PRICE_PER_KM} ETB/km is DEMO DATA — replace with the real tariff.`,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user