diff options
Diffstat (limited to 'shared/models/videos/channel-sync')
4 files changed, 27 insertions, 0 deletions
diff --git a/shared/models/videos/channel-sync/index.ts b/shared/models/videos/channel-sync/index.ts new file mode 100644 index 000000000..7d25aaac3 --- /dev/null +++ b/shared/models/videos/channel-sync/index.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export * from './video-channel-sync-state.enum' | ||
2 | export * from './video-channel-sync.model' | ||
3 | export * from './video-channel-sync-create.model' | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync-create.model.ts b/shared/models/videos/channel-sync/video-channel-sync-create.model.ts new file mode 100644 index 000000000..753a8ee4c --- /dev/null +++ b/shared/models/videos/channel-sync/video-channel-sync-create.model.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export interface VideoChannelSyncCreate { | ||
2 | externalChannelUrl: string | ||
3 | videoChannelId: number | ||
4 | } | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts b/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts new file mode 100644 index 000000000..3e9f5ddc2 --- /dev/null +++ b/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts | |||
@@ -0,0 +1,6 @@ | |||
1 | export const enum VideoChannelSyncState { | ||
2 | WAITING_FIRST_RUN = 1, | ||
3 | PROCESSING = 2, | ||
4 | SYNCED = 3, | ||
5 | FAILED = 4 | ||
6 | } | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync.model.ts b/shared/models/videos/channel-sync/video-channel-sync.model.ts new file mode 100644 index 000000000..73ac0615b --- /dev/null +++ b/shared/models/videos/channel-sync/video-channel-sync.model.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | import { VideoChannelSummary } from '../channel/video-channel.model' | ||
2 | import { VideoConstant } from '../video-constant.model' | ||
3 | import { VideoChannelSyncState } from './video-channel-sync-state.enum' | ||
4 | |||
5 | export interface VideoChannelSync { | ||
6 | id: number | ||
7 | |||
8 | externalChannelUrl: string | ||
9 | |||
10 | createdAt: string | ||
11 | channel: VideoChannelSummary | ||
12 | state: VideoConstant<VideoChannelSyncState> | ||
13 | lastSyncAt: string | ||
14 | } | ||