This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/backend/db.md

70 lines
960 B
Markdown
Raw Normal View History

2018-09-29 12:23:09 +00:00
# User
2018-09-29 17:10:27 +00:00
`collection`: users
2018-09-29 12:23:09 +00:00
`
{
username: string,
salt: string,
hash: string,
uid: number,
showWelcome: boolean,
classId: string,
2018-09-29 13:06:14 +00:00
score: number,
lastReview: {
correct: number,
wrong: number,
2018-09-29 17:10:27 +00:00
},
2018-09-29 20:09:49 +00:00
lastLevel: number,
levels: number[],
2018-09-29 17:10:27 +00:00
2018-09-30 14:17:54 +00:00
vocabMetadata: {
[id: number]: ISM2Metadata,
},
2018-09-29 12:23:09 +00:00
}
`
2018-09-29 17:10:27 +00:00
- queue stores IDs of the vocabulary
# Vocab
`collection`: vocabulary
`
{
id: string,
german: string[],
hint: string?,
mnemonic: string?,
type: VocabType,
latin: INomenData | IVerbData | IAdjektivData (See frontend models),
`
- VocabType -> number?
- id == _id?
# Levels
`collection`: levels
`
{
level: number;
name: string;
description: string;
vocab: number[],
}
`
- vocab stores the IDs of the vocabulary items from the `vocabulary` collection
2018-09-29 12:23:09 +00:00
# Sessions
column: sessions
`
{
username: string,
session: string,
}
`