package Ġcom . soft cube . re _ reddit . data . remote . model Ċ Ċ import Ġandroid . os . Parcelable Ċ import Ġcom . google . gson . annotations . SerializedName Ċ import Ġcom . soft cube . re _ reddit . domain . model . Post Ċ import Ġcom . soft cube . re _ reddit . domain . model . Post Response Ċ import Ġkotlinx . parcel ize . Parcel ize Ċ Ċ /** Ċ Ġ* Ġcom . soft cube . re _ reddit . data . remote . model Ċ Ġ* Ċ Ġ* ĠCreated Ġby ĠWil son ĠG arc ia Ġon Ġ 6 / 6 / 2 1 Ċ Ġ* ĠCopyright ĠÂ© Ġ 2 0 2 1 ĠWil son ĠG arc ia . ĠAll Ġrights Ġreserved . Ċ Ġ*/ Ċ @ Parcel ize Ċ data Ġclass ĠPosts Response DTO ( Ċ ĉ @ SerializedName (" kind ") Ġval Ġkind : ĠString , Ċ ĉ @ SerializedName (" data ") Ġval Ġdata : ĠPosts Data DTO , Ċ ): ĠEntity < Post Response > Ġ{ Ċ ĉ private Ġfun Ġget Posts (): ĠList < Post > Ġ= Ġdata . get Posts () ĊĊ ĉ override Ġfun Ġto Domain (): ĠPost Response Ġ{ Ċĉ ĉ return ĠPost Response ( Ċĉĉ ĉ posts Ġ= Ġget Posts (), Ċĉĉ ĉ after Ġ= Ġdata . after Ċĉ ĉ ) Ċ ĉ } Ċ } Ċ Ċ @ Parcel ize Ċ data Ġclass ĠPosts Children DTO ( Ċ ĉ @ SerializedName (" kind ") Ġval Ġkind : ĠString , Ċ ĉ @ SerializedName (" data ") Ġval Ġdata : ĠPost DTO , Ċ ): ĠParcel able ĊĊ Ċ @ Parcel ize Ċ data Ġclass ĠPosts Data DTO ( Ċ ĉ @ SerializedName (" mod hash ") Ġval Ġhash : ĠString , Ċ ĉ @ SerializedName (" dist ") Ġval Ġtotal : ĠInt , Ċ ĉ @ SerializedName (" children ") Ġval Ġchildren : ĠList < Posts Children DTO >, Ċ ĉ @ SerializedName (" after ") Ġval Ġafter : ĠString , Ċ ĉ @ SerializedName (" before ") Ġval Ġbefore : ĠString ?, Ċ ) Ġ: ĠParcel able Ġ{ Ċ ĉ fun Ġget Posts (): ĠList < Post > Ġ{ Ċĉ ĉ val Ġposts Ġ= Ġmutable ListOf < Post >() Ċĉ ĉ for ( child Ġin Ġchildren ) Ġ{ Ċĉĉ ĉ posts . add ( child . data . to Domain ()) Ċĉ ĉ } Ċĉ ĉ return Ġposts Ċ ĉ } Ċ } Ċ