import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { HydratedDocument } from 'mongoose'; import { IGeoLocation } from '../interfaces/geo-location.interface'; @Schema({ _id: false }) export class GeoLocation implements IGeoLocation { @Prop({ type: Number, required: false }) lat: number; @Prop({ type: Number, required: false }) lng: number; @Prop({ type: String, required: false }) system: string; } export const GeoLocationSchema = SchemaFactory.createForClass(GeoLocation); export type GeoLocationDocument = HydratedDocument;