-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2607 from KaelenProctor/feature/dynamo-6
Conversion of Content dynamo model to Typescript
- Loading branch information
Showing
24 changed files
with
420 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
import User from './User'; | ||
|
||
export const CONVERT_STATUS = { | ||
p: 'Published', | ||
r: 'In Review', | ||
d: 'Draft', | ||
}; | ||
export enum ContentType { | ||
VIDEO = 'v', | ||
ARTICLE = 'a', | ||
EPISODE = 'e', | ||
PODCAST = 'p', | ||
} | ||
|
||
export enum ContentStatus { | ||
IN_REVIEW = 'r', | ||
DRAFT = 'd', | ||
PUBLISHED = 'p', | ||
} | ||
|
||
export default interface Content { | ||
export const ContentStatusEnglish = { | ||
[ContentStatus.DRAFT]: 'Draft', | ||
[ContentStatus.IN_REVIEW]: 'In Review', | ||
[ContentStatus.PUBLISHED]: 'Published', | ||
}; | ||
export interface UnhydratedContent { | ||
id: string; | ||
date: number; | ||
status: 'p' | 'r' | 'd'; | ||
owner: User; | ||
type: string; | ||
typeStatusComp: string; | ||
typeOwnerComp: string; | ||
date: number; | ||
status: ContentStatus; | ||
owner: string; | ||
title?: string; | ||
body?: string; | ||
short?: string; | ||
url?: string; | ||
username?: string; | ||
imageName?: string; | ||
} | ||
|
||
export interface Content extends Omit<UnhydratedContent, 'owner' | 'image'> { | ||
owner: User; | ||
} | ||
|
||
export default Content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.