package Ġbr . com . edu ard os ou za . application A . extensions Ċ Ċ import Ġbr . com . edu ard os ou za . application A . dto . Company DTO Ċ import Ġbr . com . edu ard os ou za . application A . dto . Partner DTO Ċ import Ġbr . com . edu ard os ou za . application A . model . Company Ċ import Ġbr . com . edu ard os ou za . application A . model . Partner Ċ Ċ fun ĠCompany DTO . to Model (): ĠCompany Ġ{ ĊĠĠĠ Ġreturn ĠCompany ( ĊĠĠĠĠĠĠĠ Ġcorpor ate Name Ġ= Ġthis . corpor ate Name , ĊĠĠĠĠĠĠĠ Ġreg Number Ġ= Ġthis . reg Number , ĊĠĠĠĠĠĠĠ Ġpart ners Ġ= Ġthis . partners . toList Model () ĊĠĠĠ Ġ) Ċ } Ċ Ċ private Ġfun ĠList < Partner DTO >. toList Model () Ġ: ĠList < Partner > Ġ Ġ{ ĊĠĠĠ Ġreturn Ġthis . map Ġ{ ĊĠĠĠĠĠĠĠ Ġit . to Model () ĊĠĠĠ Ġ}. toList () Ċ } Ċ Ċ fun ĠPartner DTO . to Model (): ĠPartner Ġ{ ĊĠĠĠ Ġreturn ĠPartner ( ĊĠĠĠĠĠĠĠ Ġitr Ġ= Ġthis . itr , ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġthis . name ĊĠĠĠ Ġ) Ċ } Ċ Ċ fun ĠCompany . to DTO (): ĠCompany DTO Ġ{ ĊĠĠĠ Ġreturn ĠCompany DTO ( ĊĠĠĠĠĠĠĠ Ġcorpor ate Name Ġ= Ġthis . corpor ate Name , ĊĠĠĠĠĠĠĠ Ġreg Number Ġ= Ġthis . reg Number , ĊĠĠĠĠĠĠĠ Ġpart ners Ġ= Ġthis . partners . toList DTO () ĊĠĠĠ Ġ) Ċ } Ċ Ċ private Ġfun ĠList < Partner >. toList DTO (): ĠList < Partner DTO > Ġ{ ĊĠĠĠ Ġreturn Ġthis . map Ġ{ ĊĠĠĠĠĠĠĠ Ġit . to DTO () ĊĠĠĠ Ġ}. toList () Ċ } Ċ Ċ fun ĠPartner . to DTO (): ĠPartner DTO Ġ{ ĊĠĠĠ Ġreturn ĠPartner DTO ( ĊĠĠĠĠĠĠĠ Ġitr Ġ= Ġthis . itr , ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġthis . name ĊĠĠĠ Ġ) Ċ }