import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { User } from './user.schema';
import mongoose from 'mongoose';

@Schema({ timestamps: true })
export class Map_User_Attachment {
  @Prop({ type: mongoose.Types.ObjectId })
  user_id: User;

  @Prop({ default: '' })
  type: string;

  @Prop({ default: '' })
  name: string;

  @Prop({ default: '' })
  file_name: string;

  @Prop({ default: '' })
  mime_type: string;

  @Prop({ default: '' })
  path: string;

  @Prop({ default: '' })
  base_url: string;

  @Prop({ default: '' })
  originalName: string;
}

export const Map_User_Attachment_Schema =
  SchemaFactory.createForClass(Map_User_Attachment);
export type Map_User_Attachment_Document = Map_User_Attachment & Document;
