import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { HydratedDocument } from 'mongoose'; import { IS3 } from '../interfaces/s3.interface'; @Schema({ _id: false }) export class S3 implements IS3 { @Prop({ required: false, type: String }) key: string; @Prop({ required: false, type: String }) bucket: string; @Prop({ required: false, type: String }) etag: string; } export const S3Schema = SchemaFactory.createForClass(S3); export type S3Document = HydratedDocument;