creating rough models to make everythigg work

This commit is contained in:
talksik
2022-05-28 14:12:35 -05:00
parent 1e21941c77
commit b7dea99d4e
2 changed files with 62 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
import { Timestamp } from 'firebase/firestore';
interface IContent {
id: string;
creatorUserId: string;
contentUrl: string; // remote resource of file/media
createdDate: Timestamp;
// visitCount
}
// ? persist length of clip for easier viewing for others...
// ?they have to load it anyway and will get metadata anyway?
export class AudioClip implements IContent {
constructor(
public id: string,
public creatorUserId: string,
public contentUrl: string,
public createdDate: Timestamp = Timestamp.now(),
) {}
}
export class Link implements IContent {
constructor(
public id: string,
public creatorUserId: string,
public contentUrl: string,
public createdDate: Timestamp = Timestamp.now(),
) {}
}
export class Image implements IContent {
constructor(
public id: string,
public creatorUserId: string,
public contentUrl: string,
public thumbnailUrl?: string,
public createdDate: Timestamp = Timestamp.now(),
) {}
}