package Ġorg . w ats i . device . db . models Ċ Ċ import Ġandroid . arch . persistence . room . Embedded Ċ import Ġandroid . arch . persistence . room . Relation Ċ import Ġorg . w ats i . domain . relations . Member With Id Event And Thumbnail Photo Ċ Ċ data Ġclass ĠMember With Id Event And Thumbnail Photo Model ( ĊĠĠĠĠĠĠĠ Ġ@ Embedded Ġvar Ġmember Model : ĠMember Model ? Ġ= Ġnull , ĊĠĠĠĠĠĠĠ Ġ@ Relation ( parent Column Ġ= Ġ" id ", Ġentity Column Ġ= Ġ" member Id ") ĊĠĠĠĠĠĠĠ Ġvar Ġidentification Event Models : ĠList < Identification Event Model >? Ġ= Ġnull , ĊĠĠĠĠĠĠĠ Ġ@ Relation ( parent Column Ġ= Ġ" thumbnail Photo Id ", Ġentity Column Ġ= Ġ" id ") ĊĠĠĠĠĠĠĠ Ġvar Ġphoto Models : ĠList < Photo Model >? Ġ= Ġnull ) Ġ{ ĊĊĠĠĠ Ġfun Ġto Member With Id Event And Thumbnail Photo (): ĠMember With Id Event And Thumbnail Photo Ġ{ ĊĠĠĠĠĠĠĠ Ġmember Model ?. let Ġ{ Ġmember Model Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠMember With Id Event And Thumbnail Photo ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmember Model . to Member (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġidentification Event Models ?. last OrNull ()?. to Identification Event (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġphoto Models ?. first OrNull ()?. to Photo ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġthrow ĠIllegalStateException (" Member Model Ġcannot Ġbe Ġnull ") ĊĠĠĠ Ġ} Ċ } Ċ