1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/backend/model/mongoose/entities/PhotoModel.ts
2016-05-12 18:24:26 +02:00

39 lines
886 B
TypeScript

import {DatabaseManager} from "../DatabaseManager";
import {Schema} from "mongoose";
export var PhotoModel = DatabaseManager.getInstance().getModel('photo', {
name: String,
directory: {
type: Schema.Types.ObjectId,
ref: 'directory'
},
metadata: {
keywords: [String],
cameraData: {
ISO: Number,
maker: String,
fStop: Number,
exposure: Number,
focalLength: Number,
lens: String
},
positionData: {
GPSData: {
latitude: Number,
longitude: Number,
altitude: Number
},
country: String,
state: String,
city: String
},
size: {
width: Number,
height: Number
},
creationDate: Date
}
});