diff --git a/app/src/models/channel.ts b/app/src/models/channel.ts index ef9416a..b44bef0 100644 --- a/app/src/models/channel.ts +++ b/app/src/models/channel.ts @@ -1,4 +1,7 @@ -type Channel = { +import type { Episode } from "@slovo/models/episode"; +import type { Image } from "@slobo/models/image"; + +export type Channel = { name: string, description: string, link: URL, @@ -6,6 +9,8 @@ type Channel = { copyright: string, explicit: boolean, category: string, + + episodes?: Set, + image?: Image }; -export default Channel; diff --git a/app/src/models/episode.ts b/app/src/models/episode.ts index dafcadd..538fb5d 100644 --- a/app/src/models/episode.ts +++ b/app/src/models/episode.ts @@ -1,9 +1,12 @@ -type Episode = { +import type { Image } from "@slovo/models/image"; + +export type Episode = { title: string, link: URL, duration: string, description: string, - explicit: boolean + explicit: boolean, + + image?: Image, }; -export default Episode; diff --git a/app/src/models/image.ts b/app/src/models/image.ts index a8faa3c..47a8147 100644 --- a/app/src/models/image.ts +++ b/app/src/models/image.ts @@ -1,8 +1,6 @@ -type Image = { +export type Image = { url: URL, title: string, width: number, height: number, }; - -export default Image; diff --git a/app/src/models/user.ts b/app/src/models/user.ts new file mode 100644 index 0000000..4c0e81c --- /dev/null +++ b/app/src/models/user.ts @@ -0,0 +1,10 @@ +import type { Channel } from "@slovo/models/channel"; + +export type User = { + email: string, + name: string, + password?: string, + + channel?: Channel +}; + diff --git a/app/tsconfig.json b/app/tsconfig.json index 0fef23a..7c32296 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -22,6 +22,9 @@ // Some stricter flags (disabled by default) "noUnusedLocals": false, "noUnusedParameters": false, - "noPropertyAccessFromIndexSignature": false + "noPropertyAccessFromIndexSignature": false, + "paths": { + "@slovo/*": [ "./src/*" ] + } } }