package Ġno . bak ken bae ck . p orch p ir ate prot ector . model Ċ Ċ import Ġno . bak ken bae ck . pp p shared . model . Lock State Ċ import Ġorg . jetbrains . ex posed . dao . Entity ID Ċ import Ġorg . jetbrains . ex posed . dao . Int Entity Ċ import Ġorg . jetbrains . ex posed . dao . Int Entity Class Ċ import Ġorg . jetbrains . ex posed . dao . Int Id Table Ċ Ċ object ĠDevices : ĠInt Id Table () Ġ{ ĊĠĠĠ Ġval Ġip Address Ġ= Ġvarchar (" ip ", Ġ 5 0 ). nullable () Ġ// ĠColumn < String ?> ĊĊĠĠĠ Ġ// ĠTODO : ĠUse Ġactual Ġchecking Ġof Ġthis Ġrather Ġthan Ġstuff ing Ġit Ġin Ġthe Ġdatabase . ĊĠĠĠ Ġval Ġis Locked Ġ= Ġbool (" is Locked ") Ċ } Ċ Ċ class ĠDevice ( id : ĠEntity ID < Int >): ĠInt Entity ( id ) Ġ{ ĊĠĠĠ Ġcompanion Ġobject : ĠInt Entity Class < Device >( Devices ) ĊĊĠĠĠ Ġvar Ġip Address Ġby ĠDevices . ipAddress ĊĠĠĠ Ġvar Ġis Locked Ġby ĠDevices . is Locked ĊĠĠĠ Ġval Ġpair ing Keys Ġby ĠPair ing Key Ġref err ers On ĠPair ing Keys . device ĊĊĠĠĠ Ġfun Ġto Lock State (): ĠLock State Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠLock State ( id . value , Ġis Locked ) ĊĠĠĠ Ġ} Ċ } Ċ