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

15 lines
307 B
TypeScript
Raw Normal View History

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