import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';

@Schema({ timestamps: false, _id: false })
export class StorageFile {
	@Prop({ type: String, required: true })
	id: string;

	@Prop({ type: String, required: true })
	name: string;

	@Prop({ type: String, required: true })
	mimeType: string;

	@Prop({ type: Number, required: true })
	size: number;

	@Prop({ type: String, required: false })
	url?: string;
}

export const StorageFileSchema = SchemaFactory.createForClass(StorageFile);
