Database works
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user