Database works

This commit is contained in:
2026-05-15 18:44:52 +03:00
parent 547a77d52a
commit 92d48211a5
17 changed files with 221 additions and 290 deletions
+4 -3
View File
@@ -24,7 +24,9 @@ import java.util.UUID
@Serializable
data class HumanBeing(
@Serializable(with = UUIDSerializer::class)
val id: UUID = UUID.randomUUID(),
var id: UUID? = null,
@Serializable(with = UUIDSerializer::class)
val ownerId: UUID,
val name: String,
val coordinates: Coordinates,
@Serializable(with = LocalDateSerializer::class)
@@ -42,8 +44,6 @@ data class HumanBeing(
require(name.isNotBlank()) { "Имя не может быть пустым" }
}
fun getFuckingCar(): Car = car
/**
* Сравниваем по имени и id
*/
@@ -70,6 +70,7 @@ data class HumanBeing(
override fun toString(): String =
"""
|HumanBeing (It Drives) {
| owner = $ownerId
| id = $id
| name = $name (a.k.a. Ryan Gosling)
| coordinates = (x=${coordinates.x}, y=${coordinates.y})