You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

48 lines
694 B

import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';
export type WeatherDocument = HydratedDocument<Weather>;
@Schema()
export class Weather {
@Prop()
deviceId: string;
@Prop()
date: Date;
@Prop()
summary: string;
@Prop()
precipType: string;
@Prop()
temperature: number;
@Prop()
apparentTemperature: number;
@Prop()
humidity: number;
@Prop()
windSpeed: number;
@Prop()
windBearing: number;
@Prop()
visibility: number;
@Prop()
loudCover: number;
@Prop()
pressure: number;
@Prop()
dailySummary: string;
}
export const WeatherSchema = SchemaFactory.createForClass(Weather);