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

@Schema({ timestamps: true })
export class Map_Inquiry_Attachment {
  @Prop({ type: mongoose.Types.ObjectId })
  inquiry_id: Shipment;

  @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: '' })
  original_name: string;

  @Prop({ enum: ['user', 'admin'] })
  uploaded_by: string;
}

export const Map_Inquiry_Attachment_Schema = SchemaFactory.createForClass(
  Map_Inquiry_Attachment,
);
export type Map_Inquiry_Attachment_Document = Map_Inquiry_Attachment & Document;
