Your IP : 216.73.217.95


Current Path : /home/deltalab/PMS/logistic-backend/src/models/pickup-points/
Upload File :
Current File : //home/deltalab/PMS/logistic-backend/src/models/pickup-points/pickup-point.schema.ts

import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
import { Coordinates } from '../shared/coordinates.schema';

export type PickupPointDocument = PickupPoint & Document;

@Schema({ timestamps: true, versionKey: false })
export class PickupPoint {
  @Prop()
  _id: number;

  @Prop({ required: true })
  address: string;

  @Prop({ type: Coordinates })
  coordinates: Coordinates;

  @Prop({ default: false })
  depot: boolean;
}

export const PickupPointSchema = SchemaFactory.createForClass(PickupPoint);