mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
16 lines
399 B
TypeScript
16 lines
399 B
TypeScript
import {DatabaseManager} from "../DatabaseManager";
|
|
import {Schema} from "mongoose";
|
|
|
|
export var DirectoryModel = DatabaseManager.getInstance().getModel('directory', {
|
|
name: String,
|
|
path: String,
|
|
lastUpdate: Date,
|
|
directories: [{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'directory'
|
|
}],
|
|
photos: [{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'photo'
|
|
}]
|
|
}); |