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.
FLAD/src/Api/src/database/LocationSchema.ts

26 lines
512 B

import { Schema, model } from 'mongoose';
import { Location } from '../models/Location';
const locationSchema = new Schema({
userId: {
type: String,
required: true,
unique: true,
},
musicId: {
type: String,
required: true,
},
latitude: {
type: Number,
required: true,
},
longitude: {
type: Number,
required: true,
}
},
{ timestamps: true }
);
export default model<Location>('Location', locationSchema);