Skip to content

Commit 052d1ab

Browse files
committed
task: add support for vehicle inspection comments
1 parent 3a7cb2e commit 052d1ab

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

src/main/kotlin/com/ctrlhub/core/assets/vehicles/resource/VehicleInspection.kt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.ctrlhub.core.assets.vehicles.resource
22

3+
import com.ctrlhub.core.assets.vehicles.resource.VehicleInspectionChecks
34
import com.ctrlhub.core.serializer.JacksonLocalDateTimeSerializer
45
import com.fasterxml.jackson.annotation.JsonCreator
56
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
@@ -16,15 +17,62 @@ import java.time.LocalDateTime
1617
class VehicleInspection @JsonCreator constructor(
1718
@JsonProperty("id") @Id(StringIdHandler::class) var id: String = "",
1819
@JsonProperty("checks") var checks: VehicleInspectionChecks? = null,
20+
@JsonProperty("comments") var comments: VehicleInspectionComments? = null,
1921
@SerialName("inspected_at") @JsonProperty("inspected_at") var inspectedAt: LocalDateTime? = null
2022
) {
2123
constructor() : this(
2224
id = "",
2325
checks = null,
26+
comments = null,
2427
inspectedAt = null
2528
)
2629
}
2730

31+
@JsonIgnoreProperties(ignoreUnknown = true)
32+
class VehicleInspectionComments @JsonCreator constructor(
33+
@JsonProperty("visible_damage") var visibleDamage: String? = null,
34+
@JsonProperty("tyres") var tyres: String? = null,
35+
@JsonProperty("washers_and_wipers") var washersAndWipers: String? = null,
36+
@JsonProperty("windscreen") var windscreen: String? = null,
37+
@JsonProperty("number_plate") var numberPlate: String? = null,
38+
@JsonProperty("security") var security: String? = null,
39+
@JsonProperty("accessories") var accessories: String? = null,
40+
@JsonProperty("spare_number_plate") var spareNumberPlate: String? = null,
41+
@JsonProperty("safe_access") var safeAccess: String? = null,
42+
@JsonProperty("reversing_alarm") var reversingAlarm: String? = null,
43+
@JsonProperty("beacons") var beacons: String? = null,
44+
@JsonProperty("chemicals_and_fuel") var chemicalsAndFuel: String? = null,
45+
@JsonProperty("storage") var storage: String? = null,
46+
@JsonProperty("lights_and_indicators") var lightsAndIndicators: String? = null,
47+
@JsonProperty("engine_warning_lights") var engineWarningLights: String? = null,
48+
@JsonProperty("servicing") var servicing: String? = null,
49+
@JsonProperty("levels") var levels: String? = null,
50+
@JsonProperty("cleanliness") var cleanliness: String? = null,
51+
@JsonProperty("driver_checks") var driverChecks: String? = null
52+
) {
53+
constructor() : this(
54+
visibleDamage = null,
55+
tyres = null,
56+
washersAndWipers = null,
57+
windscreen = null,
58+
numberPlate = null,
59+
security = null,
60+
accessories = null,
61+
spareNumberPlate = null,
62+
safeAccess = null,
63+
reversingAlarm = null,
64+
beacons = null,
65+
chemicalsAndFuel = null,
66+
storage = null,
67+
lightsAndIndicators = null,
68+
engineWarningLights = null,
69+
servicing = null,
70+
levels = null,
71+
cleanliness = null,
72+
driverChecks = null
73+
)
74+
}
75+
2876
@JsonIgnoreProperties(ignoreUnknown = true)
2977
class VehicleInspectionChecks @JsonCreator constructor(
3078
@JsonProperty("visible_damage") var visibleDamage: Boolean? = null,

0 commit comments

Comments
 (0)