package Ġorg . w 4 . api . screen ings Ċ Ċ import Ġorg . springframework . format . annotation . DateTime Format Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġorg . w 4 . api . screen ings . domain . Screen ing Facade Ċ import Ġorg . w 4 . api . screen ings . d tos . New Screen ing Dto Ċ import Ġjava . time . LocalDateTime Ċ Ċ @ RestController Ċ class ĠScreen ings Controller ( private Ġval Ġfac ade : ĠScreen ing Facade ) Ġ{ ĊĊĠĠĠ Ġ@ GetMapping ("/ screen ings /{ movie Id }") ĊĠĠĠ Ġfun Ġget Screen ings For Movie (@ PathVariable Ġmovie Id : ĠLong ) Ġ= Ġfac ade . get Shows For Movie ( movie Id ) ĊĊĠĠĠ Ġ@ GetMapping ("/ screen ings ") ĊĠĠĠ Ġfun Ġget Screen ings By Date ( ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġtrue ) Ġ@ DateTime Format ( iso Ġ= ĠDateTime Format . ISO . DATE _ TIME ) Ġfrom : ĠLocalDateTime , ĊĠĠĠĠĠĠĠ Ġ@ RequestParam ( required Ġ= Ġfalse ) Ġ@ DateTime Format ( iso Ġ= ĠDateTime Format . ISO . DATE _ TIME ) Ġto : ĠLocalDateTime ? ĊĠĠĠ Ġ) Ġ= ĊĠĠĠĠĠĠĠ Ġfac ade . search Show sBy Date ( from , Ġto Ġ?: ĠLocalDateTime . now (). plus Days ( 7 )) ĊĊĠĠĠ Ġ@ PostMapping ("/ internal / screen ings ") ĊĠĠĠ Ġfun Ġadd New Screen ing (@ RequestBody Ġscreen ing : ĠNew Screen ing Dto ) Ġ= Ġfac ade . add Screen ing ( screen ing ) Ċ }