|
- import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
- import Podcast from 'podcast';
- import { ItunesEpisodeTypeEnum } from 'schemas/enum/itunes-episode-type.enum';
- import { EpisodeEnclosure } from './episode-enclosure';
- import { Document } from 'mongoose';
-
- export type EpisodeDocument = Episode & Document;
-
- @Schema()
- export class Episode implements Podcast.Item {
- @Prop()
- title?: string;
- @Prop()
- description?: string;
- @Prop()
- url: string;
- @Prop()
- guid?: string;
- @Prop([String])
- categories?: string[];
- @Prop()
- author?: string;
- @Prop()
- date: Date;
- @Prop()
- lat?: number;
- @Prop()
- long?: number;
- @Prop(EpisodeEnclosure)
- enclosure?: EpisodeEnclosure;
- @Prop()
- content?: string;
- @Prop()
- itunesAuthor?: string;
- @Prop()
- itunesExplicit?: boolean;
- @Prop()
- itunesSubtitle?: string;
- @Prop()
- itunesSummary?: string;
- @Prop()
- itunesDuration?: number;
- @Prop()
- itunesImage?: string;
- @Prop()
- itunesSeason?: number;
- @Prop()
- itunesEpisode?: number;
- @Prop()
- itunesTitle?: string;
- @Prop(ItunesEpisodeTypeEnum)
- itunesEpisodeType?: ItunesEpisodeTypeEnum;
- }
-
- export const EpisodeSchema = SchemaFactory.createForClass(Episode);
|