import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; export type NewsletterSubscriptionDocument = NewsletterSubscription & Document; @Schema({ timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt' } }) export class NewsletterSubscription { @Prop({ required: true }) email: string; } export const NewsletterSubscriptionSchema = SchemaFactory.createForClass(NewsletterSubscription);