|
- import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
- import Podcast from 'podcast';
- import { Document } from 'mongoose';
- import { Field, ID, InputType, ObjectType } from '@nestjs/graphql';
-
- export type EpisodeEnclosureDocument = EpisodeEnclosure & Document;
-
- @Schema()
- @ObjectType()
- export class EpisodeEnclosure implements Podcast.ItemEnclosure {
- @Prop()
- @Field(type => ID)
- id: string;
-
- @Prop()
- @Field()
- url: string;
-
- @Prop()
- @Field({ nullable: true })
- file?: string;
-
- @Prop()
- @Field({ nullable: true })
- size?: number;
-
- @Prop()
- @Field({ nullable: true })
- type?: string;
- }
-
- export const EpisodeEnclosureSchema = SchemaFactory.createForClass(
- EpisodeEnclosure,
- );
|