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
Alexander Polynomdivision 048f375724 feat: Implement SM2
2018-09-30 16:17:54 +02:00

70 lines
960 B
Markdown

# User
`collection`: users
`
{
username: string,
salt: string,
hash: string,
uid: number,
showWelcome: boolean,
classId: string,
score: number,
lastReview: {
correct: number,
wrong: number,
},
lastLevel: number,
levels: number[],
vocabMetadata: {
[id: number]: ISM2Metadata,
},
}
`
- 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
# Sessions
column: sessions
`
{
username: string,
session: string,
}
`