Add basic models for the show.

This commit is contained in:
Dave Smith-Hayes 2024-03-18 22:30:56 -04:00
parent ae08c669ec
commit 9d2cb42e4b
5 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,6 @@
type Category = {
name: string,
categories?: Category[]
};
export default Category;

19
app/src/model/Channel.ts Normal file
View File

@ -0,0 +1,19 @@
import Category from './Category';
import Image from './Image';
import Episode from './Episode';
type Channel = {
name: string,
description: string,
link: URL,
language: string,
copyright: string,
explicit: boolean,
category: Category,
image: Image,
episodes: Episode[],
};
export default Channel;

13
app/src/model/Episode.ts Normal file
View File

@ -0,0 +1,13 @@
import Image from './Image';
type Episode = {
title: string,
link: URL,
duration: string,
description: string,
explicit: boolean,
image: Image,
};
export default Episode;

8
app/src/model/Image.ts Normal file
View File

@ -0,0 +1,8 @@
type Image = {
title: string,
url: URL,
width?: number,
height?: number
};
export default Image;

6
app/src/model/User.ts Normal file
View File

@ -0,0 +1,6 @@
type User = {
name: string,
email: string,
};
export default User;