Add basic models for the show.
This commit is contained in:
parent
ae08c669ec
commit
9d2cb42e4b
6
app/src/model/Category.ts
Normal file
6
app/src/model/Category.ts
Normal file
@ -0,0 +1,6 @@
|
||||
type Category = {
|
||||
name: string,
|
||||
categories?: Category[]
|
||||
};
|
||||
|
||||
export default Category;
|
19
app/src/model/Channel.ts
Normal file
19
app/src/model/Channel.ts
Normal 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
13
app/src/model/Episode.ts
Normal 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
8
app/src/model/Image.ts
Normal 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
6
app/src/model/User.ts
Normal file
@ -0,0 +1,6 @@
|
||||
type User = {
|
||||
name: string,
|
||||
email: string,
|
||||
};
|
||||
|
||||
export default User;
|
Loading…
Reference in New Issue
Block a user