Skip to content

Commit

Permalink
✨ add clipping status property
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Vondee committed Aug 9, 2024
1 parent 268713c commit 4b49782
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
11 changes: 9 additions & 2 deletions packages/server/src/interfaces/session.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Document, Types } from 'mongoose';
import { ISpeaker } from './speaker.interface';
import type { Document, Types } from 'mongoose';
import type { ISpeaker } from './speaker.interface';

export interface ISource {
streamUrl?: string;
Expand All @@ -21,6 +21,12 @@ export enum SessionType {
video = 'video',
}

export enum ClippingStatus {
pending = 'pending',
failed = 'failed',
completed = 'completed',
}

export interface ISession {
_id?: Types.ObjectId;
name: string;
Expand Down Expand Up @@ -54,6 +60,7 @@ export interface ISession {
socials?: { name: string; date: number }[];
firebaseId?: string;
talkType?: string;
clippingStatus?: ClippingStatus;
}

export interface ISessionModel extends Omit<ISession, '_id'>, Document {}
4 changes: 2 additions & 2 deletions packages/server/src/interfaces/state.interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Types, Document } from 'mongoose';
import type { Document, Types } from 'mongoose';

export enum SheetType {
gsheet = 'gsheet',
Expand All @@ -10,7 +10,7 @@ export enum StateStatus {
completed = 'completed',
canceled = 'canceled',
sync = 'sync',
error = 'error',
failed = 'failed',
}

export enum StateType {
Expand Down
7 changes: 6 additions & 1 deletion packages/server/src/models/session.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { ISessionModel, SessionType } from '@interfaces/session.interface';
import {
ClippingStatus,
type ISessionModel,
SessionType,
} from '@interfaces/session.interface';
import { Schema, model } from 'mongoose';

const SessionSchema = new Schema<ISessionModel>(
Expand Down Expand Up @@ -59,6 +63,7 @@ const SessionSchema = new Schema<ISessionModel>(
],
firebaseId: { type: String, default: '' },
talkType: { type: String, default: '' },
clippingStatus: { type: String, enum: Object.keys(ClippingStatus) },
},
{
timestamps: true,
Expand Down

0 comments on commit 4b49782

Please sign in to comment.