P1: drivers + trips(★state machine) + matching(Redis GEO) + tariff engine + maps + realtime + seed

- drivers: apply/approve/status/location (+Redis GEO presence)
- trips: request→accept→status transitions + trip_events audit + offers via socket
- matching: Redis GEO nearby drivers
- tariff: JSON-rule engine (time_or_distance/window/rounding) + quote endpoint
- maps: straight-line routing seam (انطلق later)
- realtime: Socket.IO gateway (JWT auth, tenant rooms)
- seed: demo tenant siro + default tariff on boot
- migration InitP1 (drivers/tariffs/trips/trip_events)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 16:41:58 +03:00
co-authored by Claude Opus 4.8
parent 4397b07d2f
commit 00870a8cc3
26 changed files with 1358 additions and 1 deletions
+10 -1
View File
@@ -32,7 +32,16 @@ export class UsersService {
id: string,
data: Partial<Pick<User, 'name'>>,
): Promise<User | null> {
await this.userRepository.update({ tenant_id: tenantId, id }, { name: data.name });
if (data.name !== undefined) {
await this.userRepository.update({ tenant_id: tenantId, id }, { name: data.name });
}
return this.findById(tenantId, id);
}
async setRole(tenantId: string, id: string, role: string): Promise<void> {
await this.userRepository.update(
{ tenant_id: tenantId, id },
{ role: role as UserRole },
);
}
}