2016-05-05 00:34:54 +08:00
|
|
|
import {DatabaseManager} from "../DatabaseManager";
|
2016-05-10 03:43:52 +08:00
|
|
|
import {Schema} from "mongoose";
|
|
|
|
|
2016-05-05 00:34:54 +08:00
|
|
|
|
2016-05-13 00:24:26 +08:00
|
|
|
export var PhotoModel = DatabaseManager.getInstance().getModel('photo', {
|
|
|
|
name: String,
|
2016-05-10 03:43:52 +08:00
|
|
|
directory: {
|
|
|
|
type: Schema.Types.ObjectId,
|
|
|
|
ref: 'directory'
|
|
|
|
},
|
2016-05-13 00:24:26 +08:00
|
|
|
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
|
|
|
|
}
|
2016-05-05 00:34:54 +08:00
|
|
|
});
|
|
|
|
|
2016-05-10 03:43:52 +08:00
|
|
|
|