@@ -162,6 +162,39 @@ export const GenericEntity = Entity.Schema(
162162 } ,
163163) ;
164164
165+ export const Episode2 = Entity . Schema (
166+ {
167+ name : Type . String ,
168+ description : Type . optional ( Type . String ) ,
169+ airDate : Type . Date ,
170+ avatar : Type . Relation ( Image ) ,
171+ duration : Type . optional ( Type . Number ) , // in seconds
172+ audioUrl : Type . optional ( Type . String ) ,
173+ listenOn : Type . Relation ( GenericEntity , {
174+ properties : {
175+ website : Type . optional ( Type . String ) ,
176+ } ,
177+ } ) ,
178+ } ,
179+ {
180+ types : [ Id ( '972d201a-d780-4568-9e01-543f67b26bee' ) ] ,
181+ properties : {
182+ name : Id ( 'a126ca53-0c8e-48d5-b888-82c734c38935' ) ,
183+ description : Id ( '9b1f76ff-9711-404c-861e-59dc3fa7d037' ) ,
184+ airDate : Id ( '77999397-f78d-44a7-bbc5-d93a617af47c' ) ,
185+ duration : Id ( '76996acc-d10f-4cd5-9ac9-4a705b8e03b4' ) ,
186+ audioUrl : Id ( '87f919d5-560b-408c-be8d-318e2c5c098b' ) ,
187+ avatar : Id ( '1155beff-fad5-49b7-a2e0-da4777b8792c' ) ,
188+ listenOn : {
189+ propertyId : Id ( '1367bac7-dcea-4b80-86ad-a4a4cdd7c2cb' ) ,
190+ properties : {
191+ website : Id ( 'eed38e74-e679-46bf-8a42-ea3e4f8fb5fb' ) ,
192+ } ,
193+ } ,
194+ } ,
195+ } ,
196+ ) ;
197+
165198export const Podcast = Entity . Schema (
166199 {
167200 name : Type . String ,
@@ -176,6 +209,7 @@ export const Podcast = Entity.Schema(
176209 website : Type . optional ( Type . String ) ,
177210 } ,
178211 } ) ,
212+ episodes : Type . Backlink ( Episode2 ) ,
179213 } ,
180214 {
181215 types : [ Id ( '4c81561d-1f95-4131-9cdd-dd20ab831ba2' ) ] ,
@@ -193,6 +227,7 @@ export const Podcast = Entity.Schema(
193227 website : Id ( 'eed38e74-e679-46bf-8a42-ea3e4f8fb5fb' ) ,
194228 } ,
195229 } ,
230+ episodes : Id ( 'f1873bbc-381f-4604-abad-76fed4f6d73f' ) ,
196231 } ,
197232 } ,
198233) ;
0 commit comments