package Ġac . ob l . pect op ah . repo . tables Ċ Ċ import Ġac . ob l . pect op ah . model .* Ċ import Ġorg . jetbrains . ex posed . dao . id . UUID Table Ċ import Ġorg . jetbrains . ex posed . sql . Result Row Ċ import Ġorg . jetbrains . ex posed . sql . jav atime . date Ċ import Ġorg . jetbrains . ex posed . sql . statements . Insert Statement Ċ import Ġjava . time . Duration Ċ import Ġjava . time . Local Time Ċ Ċ object ĠReser v ations Ġ: ĠUUID Table ( name Ġ= Ġ" re servations ") Ġ{ ĊĠĠĠ Ġval Ġrestaurant Id Ġ= Ġuuid (" restaurant _ id "). references ( Rest aurants . id ) ĊĠĠĠ Ġval Ġpeople Ġ= Ġinteger (" people ") ĊĠĠĠ Ġval Ġdate Ġ= Ġdate (" date ") ĊĠĠĠ Ġval Ġtime Ġ= Ġinteger (" time ") ĊĠĠĠ Ġval Ġduration Ġ= Ġinteger (" duration ") Ċ } Ċ fun ĠResult Row . to Reservation () Ġ= ĠReser vation ( ĊĠĠĠ Ġid Ġ= ĠReser vation Id ( this [ Reser v ations . id ]. value ), ĊĠĠĠ Ġrestaurant Id Ġ= ĠRest aurant Id ( this [ Reser v ations . restaurant Id ]), ĊĠĠĠ Ġpersons Ġ= Ġthis [ Reser v ations . people ], ĊĠĠĠ Ġslot Ġ= ĠReser vation Slot ( ĊĠĠĠĠĠĠĠ Ġday Ġ= Ġthis [ Reser v ations . date ], ĊĠĠĠĠĠĠĠ Ġtime Ġ= ĠLocal Time . of Second OfDay ( this [ Reser v ations . time ]. to Long ()), ĊĠĠĠĠĠĠĠ Ġduration Ġ= ĠDuration . of Minutes ( this [ Reser v ations . duration ]. to Long ()) ĊĠĠĠ Ġ) Ċ ) Ċ fun ĠInsert Statement < Number >. record ( dao : ĠReser vation Request ) Ġ{ ĊĠĠĠ Ġval Ġinsert Ġ= Ġthis ĊĠĠĠ Ġwith ( Reser v ations ) Ġ{ ĊĠĠĠĠĠĠĠ Ġinsert [ restaurant Id ] Ġ= Ġdao . restaurant Id . uuid ĊĠĠĠĠĠĠĠ Ġinsert [ people ] Ġ= Ġdao . places ĊĠĠĠĠĠĠĠ Ġinsert [ date ] Ġ= Ġdao . slot . day ĊĠĠĠĠĠĠĠ Ġinsert [ time ] Ġ= Ġdao . slot . time . to Second OfDay () ĊĠĠĠĠĠĠĠ Ġinsert [ duration ] Ġ= Ġdao . slot . duration . to Minutes (). toInt () ĊĠĠĠ Ġ} Ċ } Ċ