Skip to content

Commit

Permalink
OwnerUUID in broker now can be nullable to improve compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
HLCaptain committed Nov 24, 2023
1 parent b940d0b commit 5615cd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import kotlinx.serialization.Serializable
@Serializable
data class FirestoreBroker(
val uuid: String,
val ownerUUID: String,
val sensors: List<String>,
val ownerUUID: String? = null,
val sensors: List<String> = emptyList()
) {
companion object {
const val COLLECTION_NAME = "brokers"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package nest.planty.domain.model

data class DomainBroker(
val uuid: String,
val ownerUUID: String,
val ownerUUID: String?,
val sensors: List<String>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import kotlin.collections.List;

CREATE TABLE Broker(
uuid TEXT PRIMARY KEY NOT NULL UNIQUE,
ownerUUID TEXT NOT NULL,
ownerUUID TEXT,
sensors TEXT AS List<String> NOT NULL
);

Expand Down

0 comments on commit 5615cd5

Please sign in to comment.