removed device_id from all entities except car. Replaced with car_id . Car -> device_id

This commit is contained in:
2026-07-16 17:40:59 +04:00
parent 41eaf49bb2
commit f6547cd1f1
18 changed files with 126 additions and 78 deletions
+5 -2
View File
@@ -189,6 +189,7 @@ func carToWire(c catalog.CarMeta) transport.CarWire {
ColorHex: c.ColorHex,
AvatarURL: c.AvatarURL,
Active: c.Active,
DeviceID: c.DeviceID,
// Stats are read-mostly; the server fills them on read.
TotalDistanceM: c.TotalDistanceM,
TotalRaces: c.TotalRaces,
@@ -239,8 +240,9 @@ func carFromWire(w transport.CarWire) catalog.CarMeta {
ColorHex: w.ColorHex,
AvatarURL: w.AvatarURL,
Active: w.Active,
CreatedMs: w.CreatedMs,
UpdatedMs: w.UpdatedMs,
CreatedMs: w.CreatedMs,
UpdatedMs: w.UpdatedMs,
DeviceID: w.DeviceID,
}
}
@@ -292,6 +294,7 @@ func carPatchFromWire(p transport.CarPatch) catalog.UpdateCarOptions {
Chassis: chassisFromPtr(p.Chassis),
Motor: motorFromPtr(p.Motor),
Battery: batteryFromPtr(p.Battery),
DeviceID: p.DeviceID,
}
}