package Ġcom . master 8 . sh ana . domain . use case . movies Ċ Ċ import Ġcom . master 8 . sh ana . domain . entity . Changed Movie Ċ import Ġcom . master 8 . sh ana . domain . entity . Movie Ċ import Ġcom . master 8 . sh ana . domain . entity . Watch Status Ċ import Ġcom . master 8 . sh ana . domain . repository . Movie Changes Repository Ċ import Ġcom . master 8 . sh ana . domain . repository . Movies Repository Ċ Ċ class ĠDelete Movie UseCase ( ĊĠĠĠ Ġprivate Ġval Ġmovies Repository : ĠMov ies Repository , ĊĠĠĠ Ġprivate Ġval Ġmovie Changes Repository : ĠMovie Changes Repository Ċ ) Ġ{ ĊĊĠĠĠ Ġsuspend Ġoperator Ġfun Ġinvoke ( movie : ĠMovie ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġwhen Ġ( movie . watch Status ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠWatch Status . WATCH ED Ġ-> Ġmovies Repository . delete Good Movie ( movie ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠWatch Status . NOT _ WATCH ED Ġ-> Ġmovies Repository . delete Need To Watch Movie ( movie ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġreturn ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġdeleted Movie Ġ= Ġmovie . copy ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinternal Id Ġ= Ġnull , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwatch Status Ġ= ĠWatch Status . UNKNOWN , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdate Added Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġmovie Changes Repository . movie Was Changed ( Changed Movie ( movie , Ġdeleted Movie )) ĊĠĠĠ Ġ} Ċ }