Skip to content
Snippets Groups Projects
tclStopPoint.schema.ts 750 B
Newer Older
  • Learn to ignore specific revisions
  • Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
    import { Document } from 'mongoose';
    
    export type TclStopPointDocument = TclStopPoint & Document;
    
    @Schema()
    export class TclStopPoint {
      @Prop()
      id: number;
    
      @Prop()
      name?: string;
    
      @Prop()
      busLines?: string[];
    
      @Prop()
      subLines?: string[];
    
      @Prop()
      tramLines?: string[];
    
      @Prop()
      prm?: boolean;
    
      @Prop()
      elevator?: boolean;
    
      @Prop()
      escalator?: boolean;
    
      @Prop()
      gid: number;
    
      @Prop()
      lastUpdate?: Date;
    
      @Prop()
      lastUpdateFme?: Date;
    
      @Prop()
      pgisCoord?: string | any;
    
      @Prop()
      distance?: number;
    }
    
    export const TclStopPointSchema = SchemaFactory.createForClass(TclStopPoint);
    
    TclStopPointSchema.index({ pgisCoord: '2dsphere' });