Migrated loadCreatures to nested sets

This commit is contained in:
ThaumRystra
2023-09-28 23:00:36 +02:00
parent ece4a9391a
commit 60f542e64e
9 changed files with 106 additions and 110 deletions

View File

@@ -1,6 +1,19 @@
import SimpleSchema from 'simpl-schema';
import STORAGE_LIMITS from '/imports/constants/STORAGE_LIMITS';
export interface Reference {
collection: string,
id: string,
}
export interface TreeDoc {
_id: string,
root: Reference,
parentId?: string,
left: number,
right: number,
}
const RefSchema = new SimpleSchema({
id: {
type: String,
@@ -57,19 +70,6 @@ const ChildSchema = new SimpleSchema({
}
});
export interface Reference {
collection: string,
id: string,
}
export interface TreeDoc {
_id: string,
root: Reference,
parentId?: string,
left: number,
right: number,
}
export const treeDocFields = {
_id: 1,
root: 1,