@ooneex/typeorm 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/chunk-0swb1h0m.js +51 -0
- package/dist/shared/{chunk-xwe8m6av.js.map → chunk-0swb1h0m.js.map} +2 -2
- package/dist/shared/chunk-2wdazj26.js +371 -0
- package/dist/shared/{chunk-5tnqjb3n.js.map → chunk-2wdazj26.js.map} +2 -2
- package/dist/shared/chunk-6m3p1ht9.js +606 -0
- package/dist/shared/{chunk-yrwsqc6r.js.map → chunk-6m3p1ht9.js.map} +2 -2
- package/dist/shared/{chunk-qrs0g3m9.js → chunk-6vmvyg0q.js} +58 -17
- package/dist/shared/{chunk-qrs0g3m9.js.map → chunk-6vmvyg0q.js.map} +2 -2
- package/dist/shared/chunk-bkdccdhn.js +105 -0
- package/dist/shared/{chunk-p22keb3y.js.map → chunk-bkdccdhn.js.map} +2 -2
- package/dist/shared/chunk-chan1evn.js +72 -0
- package/dist/shared/{chunk-xrqhqgen.js.map → chunk-chan1evn.js.map} +2 -2
- package/dist/shared/chunk-cv6xa6qy.js +621 -0
- package/dist/shared/{chunk-t1jad451.js.map → chunk-cv6xa6qy.js.map} +2 -2
- package/dist/shared/chunk-cwxhwya1.js +548 -0
- package/dist/shared/{chunk-x3pmm3na.js.map → chunk-cwxhwya1.js.map} +2 -2
- package/dist/shared/{chunk-qyf32qsz.js → chunk-eets3mef.js} +75 -22
- package/dist/shared/{chunk-qyf32qsz.js.map → chunk-eets3mef.js.map} +2 -2
- package/dist/shared/chunk-efmap3y3.js +345 -0
- package/dist/shared/{chunk-e51ktjsq.js.map → chunk-efmap3y3.js.map} +2 -2
- package/dist/shared/chunk-hkfj9j6w.js +30 -0
- package/dist/shared/{chunk-pbns711f.js.map → chunk-hkfj9j6w.js.map} +2 -2
- package/dist/shared/{chunk-aj0aak90.js → chunk-jap9t59k.js} +52 -14
- package/dist/shared/{chunk-aj0aak90.js.map → chunk-jap9t59k.js.map} +2 -2
- package/dist/shared/chunk-m4mpkr4n.js +34 -0
- package/dist/shared/{chunk-5ybg5hda.js.map → chunk-m4mpkr4n.js.map} +2 -2
- package/dist/shared/chunk-m9wkjs7v.js +639 -0
- package/dist/shared/{chunk-kw4t1san.js.map → chunk-m9wkjs7v.js.map} +2 -2
- package/dist/shared/chunk-mssxq87m.js +195 -0
- package/dist/shared/{chunk-6kdkyjbn.js.map → chunk-mssxq87m.js.map} +2 -2
- package/dist/shared/chunk-p12g6e7b.js +38 -0
- package/dist/shared/{chunk-6jnj2pfx.js.map → chunk-p12g6e7b.js.map} +2 -2
- package/dist/shared/chunk-qbn9p4vj.js +835 -0
- package/dist/shared/{chunk-nfv9ce7v.js.map → chunk-qbn9p4vj.js.map} +2 -2
- package/dist/shared/chunk-r9hsk9fk.js +20 -0
- package/dist/shared/{chunk-59vwmfpm.js.map → chunk-r9hsk9fk.js.map} +1 -1
- package/dist/shared/chunk-sk8z5zmk.js +112 -0
- package/dist/shared/{chunk-x2d798hg.js.map → chunk-sk8z5zmk.js.map} +2 -2
- package/dist/shared/chunk-tqd6ek7s.js +86 -0
- package/dist/shared/{chunk-19qhst35.js.map → chunk-tqd6ek7s.js.map} +2 -2
- package/dist/shared/{chunk-31y260d6.js → chunk-trhrh4e1.js} +89 -24
- package/dist/shared/{chunk-31y260d6.js.map → chunk-trhrh4e1.js.map} +2 -2
- package/dist/shared/chunk-wg7xcq50.js +38 -0
- package/dist/shared/{chunk-t5cy307m.js.map → chunk-wg7xcq50.js.map} +2 -2
- package/dist/shared/{chunk-jr0xys18.js → chunk-yszvxhf3.js} +41 -11
- package/dist/shared/{chunk-jr0xys18.js.map → chunk-yszvxhf3.js.map} +2 -2
- package/dist/src/entities/book/index.js +34 -2
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.js +26 -2
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.js +9 -2
- package/dist/src/entities/country/index.js.map +1 -1
- package/dist/src/entities/currency/index.js +9 -2
- package/dist/src/entities/currency/index.js.map +1 -1
- package/dist/src/entities/folder/index.js +394 -2
- package/dist/src/entities/folder/index.js.map +2 -2
- package/dist/src/entities/gamification/flashcard/index.js +26 -2
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +9 -2
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.js +36 -2
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.js +31 -2
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.js +13 -2
- package/dist/src/entities/medecine/index.js.map +1 -1
- package/dist/src/entities/payment/index.js +23 -2
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.js +30 -2
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.js +34 -2
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.js +541 -137
- package/dist/src/migrations/book/index.js.map +2 -2
- package/dist/src/migrations/common/index.js +63 -14
- package/dist/src/migrations/common/index.js.map +2 -2
- package/dist/src/migrations/country/index.js +48 -13
- package/dist/src/migrations/country/index.js.map +2 -2
- package/dist/src/migrations/currency/index.js +50 -14
- package/dist/src/migrations/currency/index.js.map +2 -2
- package/dist/src/migrations/folder/index.js +426 -104
- package/dist/src/migrations/folder/index.js.map +2 -2
- package/dist/src/migrations/gamification/flashcard/index.js +356 -96
- package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
- package/dist/src/migrations/gamification/index.js +8 -2
- package/dist/src/migrations/gamification/index.js.map +1 -1
- package/dist/src/migrations/gamification/mcq/index.js +553 -139
- package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
- package/dist/src/migrations/image/index.js +353 -85
- package/dist/src/migrations/image/index.js.map +2 -2
- package/dist/src/migrations/medecine/index.js +132 -36
- package/dist/src/migrations/medecine/index.js.map +2 -2
- package/dist/src/migrations/payment/index.js +339 -94
- package/dist/src/migrations/payment/index.js.map +2 -2
- package/dist/src/migrations/user/index.js +331 -39
- package/dist/src/migrations/user/index.js.map +2 -2
- package/dist/src/migrations/video/index.js +345 -17
- package/dist/src/migrations/video/index.js.map +2 -2
- package/dist/src/repositories/book/index.js +997 -2
- package/dist/src/repositories/book/index.js.map +2 -2
- package/dist/src/repositories/common/index.js +439 -2
- package/dist/src/repositories/common/index.js.map +2 -2
- package/dist/src/repositories/country/index.js +89 -2
- package/dist/src/repositories/country/index.js.map +2 -2
- package/dist/src/repositories/currency/index.js +89 -2
- package/dist/src/repositories/currency/index.js.map +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js +632 -2
- package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
- package/dist/src/repositories/gamification/index.js +160 -2
- package/dist/src/repositories/gamification/index.js.map +2 -2
- package/dist/src/repositories/gamification/mcq/index.js +1017 -2
- package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
- package/dist/src/repositories/image/index.js +800 -2
- package/dist/src/repositories/image/index.js.map +2 -2
- package/dist/src/repositories/medecine/index.js +243 -2
- package/dist/src/repositories/medecine/index.js.map +2 -2
- package/dist/src/repositories/payment/index.js +560 -2
- package/dist/src/repositories/payment/index.js.map +2 -2
- package/dist/src/repositories/user/index.js +999 -2
- package/dist/src/repositories/user/index.js.map +2 -2
- package/dist/src/repositories/video/index.js +975 -2
- package/dist/src/repositories/video/index.js.map +2 -2
- package/package.json +21 -21
- package/dist/shared/chunk-19qhst35.js +0 -5
- package/dist/shared/chunk-59vwmfpm.js +0 -5
- package/dist/shared/chunk-5tnqjb3n.js +0 -5
- package/dist/shared/chunk-5ybg5hda.js +0 -5
- package/dist/shared/chunk-6jnj2pfx.js +0 -5
- package/dist/shared/chunk-6kdkyjbn.js +0 -5
- package/dist/shared/chunk-e51ktjsq.js +0 -5
- package/dist/shared/chunk-kw4t1san.js +0 -5
- package/dist/shared/chunk-nfv9ce7v.js +0 -5
- package/dist/shared/chunk-p22keb3y.js +0 -5
- package/dist/shared/chunk-pbns711f.js +0 -5
- package/dist/shared/chunk-t1jad451.js +0 -5
- package/dist/shared/chunk-t5cy307m.js +0 -5
- package/dist/shared/chunk-x2d798hg.js +0 -5
- package/dist/shared/chunk-x3pmm3na.js +0 -5
- package/dist/shared/chunk-xrqhqgen.js +0 -5
- package/dist/shared/chunk-xwe8m6av.js +0 -5
- package/dist/shared/chunk-yrwsqc6r.js +0 -5
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
StatEntity
|
|
4
|
+
} from "./chunk-mssxq87m.js";
|
|
5
|
+
import {
|
|
6
|
+
ImageEntity
|
|
7
|
+
} from "./chunk-bkdccdhn.js";
|
|
8
|
+
import {
|
|
9
|
+
TagEntity
|
|
10
|
+
} from "./chunk-p12g6e7b.js";
|
|
11
|
+
import {
|
|
12
|
+
StatusEntity
|
|
13
|
+
} from "./chunk-sk8z5zmk.js";
|
|
14
|
+
import {
|
|
15
|
+
LevelEntity
|
|
16
|
+
} from "./chunk-m4mpkr4n.js";
|
|
17
|
+
import {
|
|
18
|
+
BaseEntity
|
|
19
|
+
} from "./chunk-chan1evn.js";
|
|
20
|
+
import {
|
|
21
|
+
__legacyDecorateClassTS,
|
|
22
|
+
__legacyMetadataTS
|
|
23
|
+
} from "./chunk-r9hsk9fk.js";
|
|
24
|
+
|
|
25
|
+
// src/entities/gamification/flashcard/FlashcardScheduleEntity.ts
|
|
26
|
+
import { EFlashcardState } from "@ooneex/gamification/flashcard";
|
|
27
|
+
import { Column, Entity } from "typeorm";
|
|
28
|
+
class FlashcardScheduleEntity extends BaseEntity {
|
|
29
|
+
}
|
|
30
|
+
__legacyDecorateClassTS([
|
|
31
|
+
Column({
|
|
32
|
+
name: "state",
|
|
33
|
+
type: "enum",
|
|
34
|
+
enum: EFlashcardState,
|
|
35
|
+
default: EFlashcardState.NEW
|
|
36
|
+
}),
|
|
37
|
+
__legacyMetadataTS("design:type", typeof EFlashcardState === "undefined" ? Object : EFlashcardState)
|
|
38
|
+
], FlashcardScheduleEntity.prototype, "state", undefined);
|
|
39
|
+
__legacyDecorateClassTS([
|
|
40
|
+
Column({ name: "interval", type: "int", default: 0 }),
|
|
41
|
+
__legacyMetadataTS("design:type", Number)
|
|
42
|
+
], FlashcardScheduleEntity.prototype, "interval", undefined);
|
|
43
|
+
__legacyDecorateClassTS([
|
|
44
|
+
Column({
|
|
45
|
+
name: "ease_factor",
|
|
46
|
+
type: "decimal",
|
|
47
|
+
precision: 4,
|
|
48
|
+
scale: 2,
|
|
49
|
+
default: 2.5
|
|
50
|
+
}),
|
|
51
|
+
__legacyMetadataTS("design:type", Number)
|
|
52
|
+
], FlashcardScheduleEntity.prototype, "easeFactor", undefined);
|
|
53
|
+
__legacyDecorateClassTS([
|
|
54
|
+
Column({ name: "review_count", type: "int", default: 0 }),
|
|
55
|
+
__legacyMetadataTS("design:type", Number)
|
|
56
|
+
], FlashcardScheduleEntity.prototype, "reviewCount", undefined);
|
|
57
|
+
__legacyDecorateClassTS([
|
|
58
|
+
Column({ name: "lapse_count", type: "int", default: 0 }),
|
|
59
|
+
__legacyMetadataTS("design:type", Number)
|
|
60
|
+
], FlashcardScheduleEntity.prototype, "lapseCount", undefined);
|
|
61
|
+
__legacyDecorateClassTS([
|
|
62
|
+
Column({ name: "current_step", type: "int", default: 0 }),
|
|
63
|
+
__legacyMetadataTS("design:type", Number)
|
|
64
|
+
], FlashcardScheduleEntity.prototype, "currentStep", undefined);
|
|
65
|
+
__legacyDecorateClassTS([
|
|
66
|
+
Column({ name: "due_date", type: "timestamptz" }),
|
|
67
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
68
|
+
], FlashcardScheduleEntity.prototype, "dueDate", undefined);
|
|
69
|
+
__legacyDecorateClassTS([
|
|
70
|
+
Column({ name: "last_reviewed_at", type: "timestamptz", nullable: true }),
|
|
71
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
72
|
+
], FlashcardScheduleEntity.prototype, "lastReviewedAt", undefined);
|
|
73
|
+
__legacyDecorateClassTS([
|
|
74
|
+
Column({
|
|
75
|
+
name: "difficulty",
|
|
76
|
+
type: "decimal",
|
|
77
|
+
precision: 4,
|
|
78
|
+
scale: 2,
|
|
79
|
+
nullable: true
|
|
80
|
+
}),
|
|
81
|
+
__legacyMetadataTS("design:type", Number)
|
|
82
|
+
], FlashcardScheduleEntity.prototype, "difficulty", undefined);
|
|
83
|
+
__legacyDecorateClassTS([
|
|
84
|
+
Column({
|
|
85
|
+
name: "stability",
|
|
86
|
+
type: "decimal",
|
|
87
|
+
precision: 10,
|
|
88
|
+
scale: 4,
|
|
89
|
+
nullable: true
|
|
90
|
+
}),
|
|
91
|
+
__legacyMetadataTS("design:type", Number)
|
|
92
|
+
], FlashcardScheduleEntity.prototype, "stability", undefined);
|
|
93
|
+
__legacyDecorateClassTS([
|
|
94
|
+
Column({
|
|
95
|
+
name: "retrievability",
|
|
96
|
+
type: "decimal",
|
|
97
|
+
precision: 4,
|
|
98
|
+
scale: 3,
|
|
99
|
+
nullable: true
|
|
100
|
+
}),
|
|
101
|
+
__legacyMetadataTS("design:type", Number)
|
|
102
|
+
], FlashcardScheduleEntity.prototype, "retrievability", undefined);
|
|
103
|
+
__legacyDecorateClassTS([
|
|
104
|
+
Column({ name: "learning_steps", type: "json", default: "[]" }),
|
|
105
|
+
__legacyMetadataTS("design:type", Array)
|
|
106
|
+
], FlashcardScheduleEntity.prototype, "learningSteps", undefined);
|
|
107
|
+
__legacyDecorateClassTS([
|
|
108
|
+
Column({ name: "relearning_steps", type: "json", default: "[]" }),
|
|
109
|
+
__legacyMetadataTS("design:type", Array)
|
|
110
|
+
], FlashcardScheduleEntity.prototype, "relearningSteps", undefined);
|
|
111
|
+
FlashcardScheduleEntity = __legacyDecorateClassTS([
|
|
112
|
+
Entity({
|
|
113
|
+
name: "flashcard_schedules"
|
|
114
|
+
})
|
|
115
|
+
], FlashcardScheduleEntity);
|
|
116
|
+
|
|
117
|
+
// src/entities/gamification/flashcard/FlashcardEntity.ts
|
|
118
|
+
import { Column as Column3, Entity as Entity3, JoinColumn as JoinColumn2, JoinTable, ManyToMany, ManyToOne as ManyToOne2, OneToOne } from "typeorm";
|
|
119
|
+
|
|
120
|
+
// src/entities/gamification/flashcard/FlashcardDeckEntity.ts
|
|
121
|
+
import { EFlashcardAlgorithm } from "@ooneex/gamification/flashcard";
|
|
122
|
+
import { Column as Column2, Entity as Entity2, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
|
123
|
+
class FlashcardDeckEntity extends BaseEntity {
|
|
124
|
+
}
|
|
125
|
+
__legacyDecorateClassTS([
|
|
126
|
+
Column2({ name: "name", type: "varchar", length: 500 }),
|
|
127
|
+
__legacyMetadataTS("design:type", String)
|
|
128
|
+
], FlashcardDeckEntity.prototype, "name", undefined);
|
|
129
|
+
__legacyDecorateClassTS([
|
|
130
|
+
Column2({ name: "description", type: "text", nullable: true }),
|
|
131
|
+
__legacyMetadataTS("design:type", String)
|
|
132
|
+
], FlashcardDeckEntity.prototype, "description", undefined);
|
|
133
|
+
__legacyDecorateClassTS([
|
|
134
|
+
Column2({ name: "total_cards", type: "int", default: 0 }),
|
|
135
|
+
__legacyMetadataTS("design:type", Number)
|
|
136
|
+
], FlashcardDeckEntity.prototype, "totalCards", undefined);
|
|
137
|
+
__legacyDecorateClassTS([
|
|
138
|
+
Column2({ name: "new_cards", type: "int", default: 0 }),
|
|
139
|
+
__legacyMetadataTS("design:type", Number)
|
|
140
|
+
], FlashcardDeckEntity.prototype, "newCards", undefined);
|
|
141
|
+
__legacyDecorateClassTS([
|
|
142
|
+
Column2({ name: "learning_cards", type: "int", default: 0 }),
|
|
143
|
+
__legacyMetadataTS("design:type", Number)
|
|
144
|
+
], FlashcardDeckEntity.prototype, "learningCards", undefined);
|
|
145
|
+
__legacyDecorateClassTS([
|
|
146
|
+
Column2({ name: "due_cards", type: "int", default: 0 }),
|
|
147
|
+
__legacyMetadataTS("design:type", Number)
|
|
148
|
+
], FlashcardDeckEntity.prototype, "dueCards", undefined);
|
|
149
|
+
__legacyDecorateClassTS([
|
|
150
|
+
Column2({ name: "suspended_cards", type: "int", default: 0 }),
|
|
151
|
+
__legacyMetadataTS("design:type", Number)
|
|
152
|
+
], FlashcardDeckEntity.prototype, "suspendedCards", undefined);
|
|
153
|
+
__legacyDecorateClassTS([
|
|
154
|
+
OneToMany(() => FlashcardEntity, (card) => card.deck, {
|
|
155
|
+
eager: false,
|
|
156
|
+
cascade: ["insert", "update", "remove"]
|
|
157
|
+
}),
|
|
158
|
+
__legacyMetadataTS("design:type", Array)
|
|
159
|
+
], FlashcardDeckEntity.prototype, "cards", undefined);
|
|
160
|
+
__legacyDecorateClassTS([
|
|
161
|
+
Column2({
|
|
162
|
+
name: "algorithm",
|
|
163
|
+
type: "enum",
|
|
164
|
+
enum: EFlashcardAlgorithm,
|
|
165
|
+
default: EFlashcardAlgorithm.FSRS
|
|
166
|
+
}),
|
|
167
|
+
__legacyMetadataTS("design:type", typeof EFlashcardAlgorithm === "undefined" ? Object : EFlashcardAlgorithm)
|
|
168
|
+
], FlashcardDeckEntity.prototype, "algorithm", undefined);
|
|
169
|
+
__legacyDecorateClassTS([
|
|
170
|
+
Column2({ name: "max_new_cards_per_day", type: "int", default: 20 }),
|
|
171
|
+
__legacyMetadataTS("design:type", Number)
|
|
172
|
+
], FlashcardDeckEntity.prototype, "maxNewCardsPerDay", undefined);
|
|
173
|
+
__legacyDecorateClassTS([
|
|
174
|
+
Column2({ name: "max_review_cards_per_day", type: "int", default: 200 }),
|
|
175
|
+
__legacyMetadataTS("design:type", Number)
|
|
176
|
+
], FlashcardDeckEntity.prototype, "maxReviewCardsPerDay", undefined);
|
|
177
|
+
__legacyDecorateClassTS([
|
|
178
|
+
Column2({
|
|
179
|
+
name: "desired_retention",
|
|
180
|
+
type: "decimal",
|
|
181
|
+
precision: 4,
|
|
182
|
+
scale: 3,
|
|
183
|
+
default: 0.9
|
|
184
|
+
}),
|
|
185
|
+
__legacyMetadataTS("design:type", Number)
|
|
186
|
+
], FlashcardDeckEntity.prototype, "desiredRetention", undefined);
|
|
187
|
+
__legacyDecorateClassTS([
|
|
188
|
+
Column2({ name: "learning_steps", type: "json", default: "[1, 10]" }),
|
|
189
|
+
__legacyMetadataTS("design:type", Array)
|
|
190
|
+
], FlashcardDeckEntity.prototype, "learningSteps", undefined);
|
|
191
|
+
__legacyDecorateClassTS([
|
|
192
|
+
Column2({ name: "relearning_steps", type: "json", default: "[10]" }),
|
|
193
|
+
__legacyMetadataTS("design:type", Array)
|
|
194
|
+
], FlashcardDeckEntity.prototype, "relearningSteps", undefined);
|
|
195
|
+
__legacyDecorateClassTS([
|
|
196
|
+
Column2({ name: "graduating_interval", type: "int", default: 1 }),
|
|
197
|
+
__legacyMetadataTS("design:type", Number)
|
|
198
|
+
], FlashcardDeckEntity.prototype, "graduatingInterval", undefined);
|
|
199
|
+
__legacyDecorateClassTS([
|
|
200
|
+
Column2({ name: "easy_interval", type: "int", default: 4 }),
|
|
201
|
+
__legacyMetadataTS("design:type", Number)
|
|
202
|
+
], FlashcardDeckEntity.prototype, "easyInterval", undefined);
|
|
203
|
+
__legacyDecorateClassTS([
|
|
204
|
+
Column2({ name: "max_interval", type: "int", default: 36500 }),
|
|
205
|
+
__legacyMetadataTS("design:type", Number)
|
|
206
|
+
], FlashcardDeckEntity.prototype, "maxInterval", undefined);
|
|
207
|
+
__legacyDecorateClassTS([
|
|
208
|
+
Column2({ name: "fsrs_parameters", type: "json", nullable: true }),
|
|
209
|
+
__legacyMetadataTS("design:type", Array)
|
|
210
|
+
], FlashcardDeckEntity.prototype, "fsrsParameters", undefined);
|
|
211
|
+
__legacyDecorateClassTS([
|
|
212
|
+
Column2({ name: "leech_threshold", type: "int", default: 8 }),
|
|
213
|
+
__legacyMetadataTS("design:type", Number)
|
|
214
|
+
], FlashcardDeckEntity.prototype, "leechThreshold", undefined);
|
|
215
|
+
__legacyDecorateClassTS([
|
|
216
|
+
Column2({ name: "bury_siblings", type: "boolean", default: false }),
|
|
217
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
218
|
+
], FlashcardDeckEntity.prototype, "burySiblings", undefined);
|
|
219
|
+
__legacyDecorateClassTS([
|
|
220
|
+
ManyToOne(() => StatEntity, {
|
|
221
|
+
nullable: true,
|
|
222
|
+
eager: false,
|
|
223
|
+
cascade: ["insert", "update"]
|
|
224
|
+
}),
|
|
225
|
+
JoinColumn({ name: "stat_id" }),
|
|
226
|
+
__legacyMetadataTS("design:type", typeof IStat === "undefined" ? Object : IStat)
|
|
227
|
+
], FlashcardDeckEntity.prototype, "stat", undefined);
|
|
228
|
+
__legacyDecorateClassTS([
|
|
229
|
+
ManyToOne(() => StatusEntity, {
|
|
230
|
+
nullable: true,
|
|
231
|
+
eager: false,
|
|
232
|
+
cascade: ["insert", "update"]
|
|
233
|
+
}),
|
|
234
|
+
JoinColumn({ name: "status_id" }),
|
|
235
|
+
__legacyMetadataTS("design:type", typeof IStatus === "undefined" ? Object : IStatus)
|
|
236
|
+
], FlashcardDeckEntity.prototype, "status", undefined);
|
|
237
|
+
FlashcardDeckEntity = __legacyDecorateClassTS([
|
|
238
|
+
Entity2({
|
|
239
|
+
name: "flashcard_decks"
|
|
240
|
+
})
|
|
241
|
+
], FlashcardDeckEntity);
|
|
242
|
+
|
|
243
|
+
// src/entities/gamification/flashcard/FlashcardEntity.ts
|
|
244
|
+
class FlashcardEntity extends BaseEntity {
|
|
245
|
+
}
|
|
246
|
+
__legacyDecorateClassTS([
|
|
247
|
+
Column3({ name: "front", type: "text" }),
|
|
248
|
+
__legacyMetadataTS("design:type", String)
|
|
249
|
+
], FlashcardEntity.prototype, "front", undefined);
|
|
250
|
+
__legacyDecorateClassTS([
|
|
251
|
+
Column3({ name: "back", type: "text" }),
|
|
252
|
+
__legacyMetadataTS("design:type", String)
|
|
253
|
+
], FlashcardEntity.prototype, "back", undefined);
|
|
254
|
+
__legacyDecorateClassTS([
|
|
255
|
+
Column3({ name: "hint", type: "text", nullable: true }),
|
|
256
|
+
__legacyMetadataTS("design:type", String)
|
|
257
|
+
], FlashcardEntity.prototype, "hint", undefined);
|
|
258
|
+
__legacyDecorateClassTS([
|
|
259
|
+
Column3({ name: "context", type: "varchar", length: 255, nullable: true }),
|
|
260
|
+
__legacyMetadataTS("design:type", String)
|
|
261
|
+
], FlashcardEntity.prototype, "context", undefined);
|
|
262
|
+
__legacyDecorateClassTS([
|
|
263
|
+
Column3({ name: "context_id", type: "varchar", length: 25, nullable: true }),
|
|
264
|
+
__legacyMetadataTS("design:type", String)
|
|
265
|
+
], FlashcardEntity.prototype, "contextId", undefined);
|
|
266
|
+
__legacyDecorateClassTS([
|
|
267
|
+
OneToOne(() => FlashcardScheduleEntity, {
|
|
268
|
+
nullable: false,
|
|
269
|
+
eager: false,
|
|
270
|
+
cascade: ["insert", "update", "soft-remove"]
|
|
271
|
+
}),
|
|
272
|
+
JoinColumn2({ name: "schedule_id" }),
|
|
273
|
+
__legacyMetadataTS("design:type", typeof IFlashcardSchedule === "undefined" ? Object : IFlashcardSchedule)
|
|
274
|
+
], FlashcardEntity.prototype, "schedule", undefined);
|
|
275
|
+
__legacyDecorateClassTS([
|
|
276
|
+
ManyToOne2(() => FlashcardDeckEntity, (deck) => deck.cards, {
|
|
277
|
+
nullable: true,
|
|
278
|
+
eager: false,
|
|
279
|
+
cascade: ["insert", "update"]
|
|
280
|
+
}),
|
|
281
|
+
JoinColumn2({ name: "deck_id" }),
|
|
282
|
+
__legacyMetadataTS("design:type", typeof IFlashcardDeck === "undefined" ? Object : IFlashcardDeck)
|
|
283
|
+
], FlashcardEntity.prototype, "deck", undefined);
|
|
284
|
+
__legacyDecorateClassTS([
|
|
285
|
+
ManyToOne2(() => StatEntity, {
|
|
286
|
+
nullable: true,
|
|
287
|
+
eager: false,
|
|
288
|
+
cascade: ["insert", "update"]
|
|
289
|
+
}),
|
|
290
|
+
JoinColumn2({ name: "stat_id" }),
|
|
291
|
+
__legacyMetadataTS("design:type", typeof IStat === "undefined" ? Object : IStat)
|
|
292
|
+
], FlashcardEntity.prototype, "stat", undefined);
|
|
293
|
+
__legacyDecorateClassTS([
|
|
294
|
+
ManyToOne2(() => StatusEntity, {
|
|
295
|
+
nullable: true,
|
|
296
|
+
eager: false,
|
|
297
|
+
cascade: ["insert", "update"]
|
|
298
|
+
}),
|
|
299
|
+
JoinColumn2({ name: "status_id" }),
|
|
300
|
+
__legacyMetadataTS("design:type", typeof IStatus === "undefined" ? Object : IStatus)
|
|
301
|
+
], FlashcardEntity.prototype, "status", undefined);
|
|
302
|
+
__legacyDecorateClassTS([
|
|
303
|
+
ManyToOne2(() => ImageEntity, {
|
|
304
|
+
nullable: true,
|
|
305
|
+
eager: false,
|
|
306
|
+
cascade: ["insert", "update"]
|
|
307
|
+
}),
|
|
308
|
+
JoinColumn2({ name: "image_id" }),
|
|
309
|
+
__legacyMetadataTS("design:type", typeof IImage === "undefined" ? Object : IImage)
|
|
310
|
+
], FlashcardEntity.prototype, "image", undefined);
|
|
311
|
+
__legacyDecorateClassTS([
|
|
312
|
+
ManyToMany(() => TagEntity, {
|
|
313
|
+
nullable: true,
|
|
314
|
+
eager: false,
|
|
315
|
+
cascade: ["insert", "update"]
|
|
316
|
+
}),
|
|
317
|
+
JoinTable({
|
|
318
|
+
name: "flashcards_tags",
|
|
319
|
+
joinColumn: { name: "flashcard_id", referencedColumnName: "id" },
|
|
320
|
+
inverseJoinColumn: { name: "tag_id", referencedColumnName: "id" }
|
|
321
|
+
}),
|
|
322
|
+
__legacyMetadataTS("design:type", Array)
|
|
323
|
+
], FlashcardEntity.prototype, "tags", undefined);
|
|
324
|
+
FlashcardEntity = __legacyDecorateClassTS([
|
|
325
|
+
Entity3({
|
|
326
|
+
name: "flashcards"
|
|
327
|
+
})
|
|
328
|
+
], FlashcardEntity);
|
|
329
|
+
|
|
330
|
+
// src/entities/gamification/flashcard/FlashcardPresetEntity.ts
|
|
331
|
+
import { EFlashcardAlgorithm as EFlashcardAlgorithm2 } from "@ooneex/gamification/flashcard";
|
|
332
|
+
import { Column as Column4, Entity as Entity4 } from "typeorm";
|
|
333
|
+
class FlashcardPresetEntity extends BaseEntity {
|
|
334
|
+
}
|
|
335
|
+
__legacyDecorateClassTS([
|
|
336
|
+
Column4({ name: "name", type: "varchar", length: 500 }),
|
|
337
|
+
__legacyMetadataTS("design:type", String)
|
|
338
|
+
], FlashcardPresetEntity.prototype, "name", undefined);
|
|
339
|
+
__legacyDecorateClassTS([
|
|
340
|
+
Column4({ name: "description", type: "text", nullable: true }),
|
|
341
|
+
__legacyMetadataTS("design:type", String)
|
|
342
|
+
], FlashcardPresetEntity.prototype, "description", undefined);
|
|
343
|
+
__legacyDecorateClassTS([
|
|
344
|
+
Column4({
|
|
345
|
+
name: "algorithm",
|
|
346
|
+
type: "enum",
|
|
347
|
+
enum: EFlashcardAlgorithm2,
|
|
348
|
+
default: EFlashcardAlgorithm2.FSRS
|
|
349
|
+
}),
|
|
350
|
+
__legacyMetadataTS("design:type", typeof EFlashcardAlgorithm2 === "undefined" ? Object : EFlashcardAlgorithm2)
|
|
351
|
+
], FlashcardPresetEntity.prototype, "algorithm", undefined);
|
|
352
|
+
__legacyDecorateClassTS([
|
|
353
|
+
Column4({ name: "learning_steps", type: "json", default: "[1, 10]" }),
|
|
354
|
+
__legacyMetadataTS("design:type", Array)
|
|
355
|
+
], FlashcardPresetEntity.prototype, "learningSteps", undefined);
|
|
356
|
+
__legacyDecorateClassTS([
|
|
357
|
+
Column4({ name: "relearning_steps", type: "json", default: "[10]" }),
|
|
358
|
+
__legacyMetadataTS("design:type", Array)
|
|
359
|
+
], FlashcardPresetEntity.prototype, "relearningSteps", undefined);
|
|
360
|
+
__legacyDecorateClassTS([
|
|
361
|
+
Column4({ name: "graduating_interval", type: "int", default: 1 }),
|
|
362
|
+
__legacyMetadataTS("design:type", Number)
|
|
363
|
+
], FlashcardPresetEntity.prototype, "graduatingInterval", undefined);
|
|
364
|
+
__legacyDecorateClassTS([
|
|
365
|
+
Column4({ name: "easy_interval", type: "int", default: 4 }),
|
|
366
|
+
__legacyMetadataTS("design:type", Number)
|
|
367
|
+
], FlashcardPresetEntity.prototype, "easyInterval", undefined);
|
|
368
|
+
__legacyDecorateClassTS([
|
|
369
|
+
Column4({ name: "max_interval", type: "int", default: 36500 }),
|
|
370
|
+
__legacyMetadataTS("design:type", Number)
|
|
371
|
+
], FlashcardPresetEntity.prototype, "maxInterval", undefined);
|
|
372
|
+
__legacyDecorateClassTS([
|
|
373
|
+
Column4({ name: "max_new_cards_per_day", type: "int", default: 20 }),
|
|
374
|
+
__legacyMetadataTS("design:type", Number)
|
|
375
|
+
], FlashcardPresetEntity.prototype, "maxNewCardsPerDay", undefined);
|
|
376
|
+
__legacyDecorateClassTS([
|
|
377
|
+
Column4({ name: "max_review_cards_per_day", type: "int", default: 200 }),
|
|
378
|
+
__legacyMetadataTS("design:type", Number)
|
|
379
|
+
], FlashcardPresetEntity.prototype, "maxReviewCardsPerDay", undefined);
|
|
380
|
+
__legacyDecorateClassTS([
|
|
381
|
+
Column4({
|
|
382
|
+
name: "desired_retention",
|
|
383
|
+
type: "decimal",
|
|
384
|
+
precision: 4,
|
|
385
|
+
scale: 3,
|
|
386
|
+
default: 0.9
|
|
387
|
+
}),
|
|
388
|
+
__legacyMetadataTS("design:type", Number)
|
|
389
|
+
], FlashcardPresetEntity.prototype, "desiredRetention", undefined);
|
|
390
|
+
__legacyDecorateClassTS([
|
|
391
|
+
Column4({ name: "fsrs_parameters", type: "json", nullable: true }),
|
|
392
|
+
__legacyMetadataTS("design:type", Array)
|
|
393
|
+
], FlashcardPresetEntity.prototype, "fsrsParameters", undefined);
|
|
394
|
+
__legacyDecorateClassTS([
|
|
395
|
+
Column4({
|
|
396
|
+
name: "starting_ease_factor",
|
|
397
|
+
type: "decimal",
|
|
398
|
+
precision: 4,
|
|
399
|
+
scale: 2,
|
|
400
|
+
default: 2.5
|
|
401
|
+
}),
|
|
402
|
+
__legacyMetadataTS("design:type", Number)
|
|
403
|
+
], FlashcardPresetEntity.prototype, "startingEaseFactor", undefined);
|
|
404
|
+
__legacyDecorateClassTS([
|
|
405
|
+
Column4({
|
|
406
|
+
name: "easy_bonus",
|
|
407
|
+
type: "decimal",
|
|
408
|
+
precision: 4,
|
|
409
|
+
scale: 2,
|
|
410
|
+
default: 1.3
|
|
411
|
+
}),
|
|
412
|
+
__legacyMetadataTS("design:type", Number)
|
|
413
|
+
], FlashcardPresetEntity.prototype, "easyBonus", undefined);
|
|
414
|
+
__legacyDecorateClassTS([
|
|
415
|
+
Column4({
|
|
416
|
+
name: "interval_modifier",
|
|
417
|
+
type: "decimal",
|
|
418
|
+
precision: 4,
|
|
419
|
+
scale: 2,
|
|
420
|
+
default: 1
|
|
421
|
+
}),
|
|
422
|
+
__legacyMetadataTS("design:type", Number)
|
|
423
|
+
], FlashcardPresetEntity.prototype, "intervalModifier", undefined);
|
|
424
|
+
__legacyDecorateClassTS([
|
|
425
|
+
Column4({
|
|
426
|
+
name: "hard_interval",
|
|
427
|
+
type: "decimal",
|
|
428
|
+
precision: 4,
|
|
429
|
+
scale: 2,
|
|
430
|
+
default: 1.2
|
|
431
|
+
}),
|
|
432
|
+
__legacyMetadataTS("design:type", Number)
|
|
433
|
+
], FlashcardPresetEntity.prototype, "hardInterval", undefined);
|
|
434
|
+
__legacyDecorateClassTS([
|
|
435
|
+
Column4({
|
|
436
|
+
name: "new_interval",
|
|
437
|
+
type: "decimal",
|
|
438
|
+
precision: 4,
|
|
439
|
+
scale: 2,
|
|
440
|
+
default: 0
|
|
441
|
+
}),
|
|
442
|
+
__legacyMetadataTS("design:type", Number)
|
|
443
|
+
], FlashcardPresetEntity.prototype, "newInterval", undefined);
|
|
444
|
+
__legacyDecorateClassTS([
|
|
445
|
+
Column4({ name: "minimum_interval", type: "int", default: 1 }),
|
|
446
|
+
__legacyMetadataTS("design:type", Number)
|
|
447
|
+
], FlashcardPresetEntity.prototype, "minimumInterval", undefined);
|
|
448
|
+
__legacyDecorateClassTS([
|
|
449
|
+
Column4({ name: "leech_threshold", type: "int", default: 8 }),
|
|
450
|
+
__legacyMetadataTS("design:type", Number)
|
|
451
|
+
], FlashcardPresetEntity.prototype, "leechThreshold", undefined);
|
|
452
|
+
__legacyDecorateClassTS([
|
|
453
|
+
Column4({ name: "bury_siblings", type: "boolean", default: false }),
|
|
454
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
455
|
+
], FlashcardPresetEntity.prototype, "burySiblings", undefined);
|
|
456
|
+
__legacyDecorateClassTS([
|
|
457
|
+
Column4({ name: "show_timer", type: "boolean", default: false }),
|
|
458
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
459
|
+
], FlashcardPresetEntity.prototype, "showTimer", undefined);
|
|
460
|
+
__legacyDecorateClassTS([
|
|
461
|
+
Column4({ name: "auto_play_audio", type: "boolean", default: true }),
|
|
462
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
463
|
+
], FlashcardPresetEntity.prototype, "autoPlayAudio", undefined);
|
|
464
|
+
FlashcardPresetEntity = __legacyDecorateClassTS([
|
|
465
|
+
Entity4({
|
|
466
|
+
name: "flashcard_presets"
|
|
467
|
+
})
|
|
468
|
+
], FlashcardPresetEntity);
|
|
469
|
+
|
|
470
|
+
// src/entities/gamification/flashcard/FlashcardSessionEntity.ts
|
|
471
|
+
import { ESessionType } from "@ooneex/gamification";
|
|
472
|
+
import { EFlashcardAlgorithm as EFlashcardAlgorithm4, EFlashcardSessionStatus } from "@ooneex/gamification/flashcard";
|
|
473
|
+
import { Column as Column6, Entity as Entity6, JoinColumn as JoinColumn4, JoinTable as JoinTable2, ManyToMany as ManyToMany2, ManyToOne as ManyToOne4, OneToMany as OneToMany2 } from "typeorm";
|
|
474
|
+
|
|
475
|
+
// src/entities/gamification/flashcard/FlashcardReviewEntity.ts
|
|
476
|
+
import { EFlashcardAlgorithm as EFlashcardAlgorithm3, EFlashcardRating, EFlashcardState as EFlashcardState2 } from "@ooneex/gamification/flashcard";
|
|
477
|
+
import { Column as Column5, Entity as Entity5, JoinColumn as JoinColumn3, ManyToOne as ManyToOne3 } from "typeorm";
|
|
478
|
+
class FlashcardReviewEntity extends BaseEntity {
|
|
479
|
+
}
|
|
480
|
+
__legacyDecorateClassTS([
|
|
481
|
+
ManyToOne3(() => FlashcardEntity, {
|
|
482
|
+
nullable: false,
|
|
483
|
+
eager: false,
|
|
484
|
+
cascade: ["insert", "update"]
|
|
485
|
+
}),
|
|
486
|
+
JoinColumn3({ name: "card_id" }),
|
|
487
|
+
__legacyMetadataTS("design:type", typeof IFlashcard === "undefined" ? Object : IFlashcard)
|
|
488
|
+
], FlashcardReviewEntity.prototype, "card", undefined);
|
|
489
|
+
__legacyDecorateClassTS([
|
|
490
|
+
ManyToOne3(() => FlashcardSessionEntity, {
|
|
491
|
+
nullable: false,
|
|
492
|
+
eager: false,
|
|
493
|
+
cascade: ["insert", "update"]
|
|
494
|
+
}),
|
|
495
|
+
JoinColumn3({ name: "session_id" }),
|
|
496
|
+
__legacyMetadataTS("design:type", typeof IFlashcardSession === "undefined" ? Object : IFlashcardSession)
|
|
497
|
+
], FlashcardReviewEntity.prototype, "session", undefined);
|
|
498
|
+
__legacyDecorateClassTS([
|
|
499
|
+
Column5({
|
|
500
|
+
name: "rating",
|
|
501
|
+
type: "enum",
|
|
502
|
+
enum: EFlashcardRating
|
|
503
|
+
}),
|
|
504
|
+
__legacyMetadataTS("design:type", typeof EFlashcardRating === "undefined" ? Object : EFlashcardRating)
|
|
505
|
+
], FlashcardReviewEntity.prototype, "rating", undefined);
|
|
506
|
+
__legacyDecorateClassTS([
|
|
507
|
+
Column5({ name: "response_time", type: "int" }),
|
|
508
|
+
__legacyMetadataTS("design:type", Number)
|
|
509
|
+
], FlashcardReviewEntity.prototype, "responseTime", undefined);
|
|
510
|
+
__legacyDecorateClassTS([
|
|
511
|
+
Column5({ name: "previous_interval", type: "int" }),
|
|
512
|
+
__legacyMetadataTS("design:type", Number)
|
|
513
|
+
], FlashcardReviewEntity.prototype, "previousInterval", undefined);
|
|
514
|
+
__legacyDecorateClassTS([
|
|
515
|
+
Column5({ name: "new_interval", type: "int" }),
|
|
516
|
+
__legacyMetadataTS("design:type", Number)
|
|
517
|
+
], FlashcardReviewEntity.prototype, "newInterval", undefined);
|
|
518
|
+
__legacyDecorateClassTS([
|
|
519
|
+
Column5({
|
|
520
|
+
name: "previous_ease_factor",
|
|
521
|
+
type: "decimal",
|
|
522
|
+
precision: 4,
|
|
523
|
+
scale: 2
|
|
524
|
+
}),
|
|
525
|
+
__legacyMetadataTS("design:type", Number)
|
|
526
|
+
], FlashcardReviewEntity.prototype, "previousEaseFactor", undefined);
|
|
527
|
+
__legacyDecorateClassTS([
|
|
528
|
+
Column5({
|
|
529
|
+
name: "new_ease_factor",
|
|
530
|
+
type: "decimal",
|
|
531
|
+
precision: 4,
|
|
532
|
+
scale: 2
|
|
533
|
+
}),
|
|
534
|
+
__legacyMetadataTS("design:type", Number)
|
|
535
|
+
], FlashcardReviewEntity.prototype, "newEaseFactor", undefined);
|
|
536
|
+
__legacyDecorateClassTS([
|
|
537
|
+
Column5({ name: "previous_due_date", type: "timestamptz" }),
|
|
538
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
539
|
+
], FlashcardReviewEntity.prototype, "previousDueDate", undefined);
|
|
540
|
+
__legacyDecorateClassTS([
|
|
541
|
+
Column5({ name: "new_due_date", type: "timestamptz" }),
|
|
542
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
543
|
+
], FlashcardReviewEntity.prototype, "newDueDate", undefined);
|
|
544
|
+
__legacyDecorateClassTS([
|
|
545
|
+
Column5({
|
|
546
|
+
name: "previous_state",
|
|
547
|
+
type: "enum",
|
|
548
|
+
enum: EFlashcardState2
|
|
549
|
+
}),
|
|
550
|
+
__legacyMetadataTS("design:type", typeof EFlashcardState2 === "undefined" ? Object : EFlashcardState2)
|
|
551
|
+
], FlashcardReviewEntity.prototype, "previousState", undefined);
|
|
552
|
+
__legacyDecorateClassTS([
|
|
553
|
+
Column5({
|
|
554
|
+
name: "new_state",
|
|
555
|
+
type: "enum",
|
|
556
|
+
enum: EFlashcardState2
|
|
557
|
+
}),
|
|
558
|
+
__legacyMetadataTS("design:type", typeof EFlashcardState2 === "undefined" ? Object : EFlashcardState2)
|
|
559
|
+
], FlashcardReviewEntity.prototype, "newState", undefined);
|
|
560
|
+
__legacyDecorateClassTS([
|
|
561
|
+
Column5({ name: "was_lapse", type: "boolean", default: false }),
|
|
562
|
+
__legacyMetadataTS("design:type", Boolean)
|
|
563
|
+
], FlashcardReviewEntity.prototype, "wasLapse", undefined);
|
|
564
|
+
__legacyDecorateClassTS([
|
|
565
|
+
Column5({
|
|
566
|
+
name: "algorithm",
|
|
567
|
+
type: "enum",
|
|
568
|
+
enum: EFlashcardAlgorithm3
|
|
569
|
+
}),
|
|
570
|
+
__legacyMetadataTS("design:type", typeof EFlashcardAlgorithm3 === "undefined" ? Object : EFlashcardAlgorithm3)
|
|
571
|
+
], FlashcardReviewEntity.prototype, "algorithm", undefined);
|
|
572
|
+
__legacyDecorateClassTS([
|
|
573
|
+
Column5({ name: "reviewed_at", type: "timestamptz" }),
|
|
574
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
575
|
+
], FlashcardReviewEntity.prototype, "reviewedAt", undefined);
|
|
576
|
+
FlashcardReviewEntity = __legacyDecorateClassTS([
|
|
577
|
+
Entity5({
|
|
578
|
+
name: "flashcard_reviews"
|
|
579
|
+
})
|
|
580
|
+
], FlashcardReviewEntity);
|
|
581
|
+
|
|
582
|
+
// src/entities/gamification/flashcard/FlashcardSessionEntity.ts
|
|
583
|
+
class FlashcardSessionEntity extends BaseEntity {
|
|
584
|
+
}
|
|
585
|
+
__legacyDecorateClassTS([
|
|
586
|
+
Column6({ name: "name", type: "varchar", length: 500 }),
|
|
587
|
+
__legacyMetadataTS("design:type", String)
|
|
588
|
+
], FlashcardSessionEntity.prototype, "name", undefined);
|
|
589
|
+
__legacyDecorateClassTS([
|
|
590
|
+
Column6({ name: "total_cards", type: "int", default: 0 }),
|
|
591
|
+
__legacyMetadataTS("design:type", Number)
|
|
592
|
+
], FlashcardSessionEntity.prototype, "totalCards", undefined);
|
|
593
|
+
__legacyDecorateClassTS([
|
|
594
|
+
Column6({ name: "new_cards_count", type: "int", default: 0 }),
|
|
595
|
+
__legacyMetadataTS("design:type", Number)
|
|
596
|
+
], FlashcardSessionEntity.prototype, "newCardsCount", undefined);
|
|
597
|
+
__legacyDecorateClassTS([
|
|
598
|
+
Column6({ name: "learning_cards_count", type: "int", default: 0 }),
|
|
599
|
+
__legacyMetadataTS("design:type", Number)
|
|
600
|
+
], FlashcardSessionEntity.prototype, "learningCardsCount", undefined);
|
|
601
|
+
__legacyDecorateClassTS([
|
|
602
|
+
Column6({ name: "review_cards_count", type: "int", default: 0 }),
|
|
603
|
+
__legacyMetadataTS("design:type", Number)
|
|
604
|
+
], FlashcardSessionEntity.prototype, "reviewCardsCount", undefined);
|
|
605
|
+
__legacyDecorateClassTS([
|
|
606
|
+
Column6({ name: "studied_count", type: "int", default: 0 }),
|
|
607
|
+
__legacyMetadataTS("design:type", Number)
|
|
608
|
+
], FlashcardSessionEntity.prototype, "studiedCount", undefined);
|
|
609
|
+
__legacyDecorateClassTS([
|
|
610
|
+
Column6({ name: "correct_count", type: "int", default: 0 }),
|
|
611
|
+
__legacyMetadataTS("design:type", Number)
|
|
612
|
+
], FlashcardSessionEntity.prototype, "correctCount", undefined);
|
|
613
|
+
__legacyDecorateClassTS([
|
|
614
|
+
Column6({ name: "incorrect_count", type: "int", default: 0 }),
|
|
615
|
+
__legacyMetadataTS("design:type", Number)
|
|
616
|
+
], FlashcardSessionEntity.prototype, "incorrectCount", undefined);
|
|
617
|
+
__legacyDecorateClassTS([
|
|
618
|
+
Column6({ name: "study_time", type: "int", default: 0 }),
|
|
619
|
+
__legacyMetadataTS("design:type", Number)
|
|
620
|
+
], FlashcardSessionEntity.prototype, "studyTime", undefined);
|
|
621
|
+
__legacyDecorateClassTS([
|
|
622
|
+
ManyToMany2(() => FlashcardEntity, {
|
|
623
|
+
eager: false,
|
|
624
|
+
cascade: ["insert", "update"]
|
|
625
|
+
}),
|
|
626
|
+
JoinTable2({
|
|
627
|
+
name: "flashcard_sessions_cards",
|
|
628
|
+
joinColumn: { name: "session_id", referencedColumnName: "id" },
|
|
629
|
+
inverseJoinColumn: { name: "flashcard_id", referencedColumnName: "id" }
|
|
630
|
+
}),
|
|
631
|
+
__legacyMetadataTS("design:type", Array)
|
|
632
|
+
], FlashcardSessionEntity.prototype, "cards", undefined);
|
|
633
|
+
__legacyDecorateClassTS([
|
|
634
|
+
OneToMany2(() => FlashcardReviewEntity, "session", {
|
|
635
|
+
eager: false,
|
|
636
|
+
cascade: ["insert", "update", "remove"]
|
|
637
|
+
}),
|
|
638
|
+
__legacyMetadataTS("design:type", Array)
|
|
639
|
+
], FlashcardSessionEntity.prototype, "reviews", undefined);
|
|
640
|
+
__legacyDecorateClassTS([
|
|
641
|
+
Column6({
|
|
642
|
+
name: "status",
|
|
643
|
+
type: "enum",
|
|
644
|
+
enum: EFlashcardSessionStatus,
|
|
645
|
+
default: EFlashcardSessionStatus.DRAFT
|
|
646
|
+
}),
|
|
647
|
+
__legacyMetadataTS("design:type", typeof EFlashcardSessionStatus === "undefined" ? Object : EFlashcardSessionStatus)
|
|
648
|
+
], FlashcardSessionEntity.prototype, "status", undefined);
|
|
649
|
+
__legacyDecorateClassTS([
|
|
650
|
+
Column6({
|
|
651
|
+
name: "score",
|
|
652
|
+
type: "decimal",
|
|
653
|
+
precision: 5,
|
|
654
|
+
scale: 2,
|
|
655
|
+
default: 0
|
|
656
|
+
}),
|
|
657
|
+
__legacyMetadataTS("design:type", Number)
|
|
658
|
+
], FlashcardSessionEntity.prototype, "score", undefined);
|
|
659
|
+
__legacyDecorateClassTS([
|
|
660
|
+
Column6({ name: "started_at", type: "timestamptz", nullable: true }),
|
|
661
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
662
|
+
], FlashcardSessionEntity.prototype, "startedAt", undefined);
|
|
663
|
+
__legacyDecorateClassTS([
|
|
664
|
+
Column6({ name: "paused_at", type: "timestamptz", nullable: true }),
|
|
665
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
666
|
+
], FlashcardSessionEntity.prototype, "pausedAt", undefined);
|
|
667
|
+
__legacyDecorateClassTS([
|
|
668
|
+
Column6({ name: "resumed_at", type: "timestamptz", nullable: true }),
|
|
669
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
670
|
+
], FlashcardSessionEntity.prototype, "resumedAt", undefined);
|
|
671
|
+
__legacyDecorateClassTS([
|
|
672
|
+
Column6({ name: "completed_at", type: "timestamptz", nullable: true }),
|
|
673
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
674
|
+
], FlashcardSessionEntity.prototype, "completedAt", undefined);
|
|
675
|
+
__legacyDecorateClassTS([
|
|
676
|
+
Column6({
|
|
677
|
+
name: "type",
|
|
678
|
+
type: "enum",
|
|
679
|
+
enum: ESessionType
|
|
680
|
+
}),
|
|
681
|
+
__legacyMetadataTS("design:type", typeof ESessionType === "undefined" ? Object : ESessionType)
|
|
682
|
+
], FlashcardSessionEntity.prototype, "type", undefined);
|
|
683
|
+
__legacyDecorateClassTS([
|
|
684
|
+
ManyToOne4(() => LevelEntity, {
|
|
685
|
+
nullable: false,
|
|
686
|
+
eager: false,
|
|
687
|
+
cascade: ["insert", "update"]
|
|
688
|
+
}),
|
|
689
|
+
JoinColumn4({ name: "level_id" }),
|
|
690
|
+
__legacyMetadataTS("design:type", typeof ILevel === "undefined" ? Object : ILevel)
|
|
691
|
+
], FlashcardSessionEntity.prototype, "level", undefined);
|
|
692
|
+
__legacyDecorateClassTS([
|
|
693
|
+
Column6({
|
|
694
|
+
name: "algorithm",
|
|
695
|
+
type: "enum",
|
|
696
|
+
enum: EFlashcardAlgorithm4,
|
|
697
|
+
default: EFlashcardAlgorithm4.FSRS
|
|
698
|
+
}),
|
|
699
|
+
__legacyMetadataTS("design:type", typeof EFlashcardAlgorithm4 === "undefined" ? Object : EFlashcardAlgorithm4)
|
|
700
|
+
], FlashcardSessionEntity.prototype, "algorithm", undefined);
|
|
701
|
+
__legacyDecorateClassTS([
|
|
702
|
+
Column6({ name: "max_new_cards", type: "int", default: 20 }),
|
|
703
|
+
__legacyMetadataTS("design:type", Number)
|
|
704
|
+
], FlashcardSessionEntity.prototype, "maxNewCards", undefined);
|
|
705
|
+
__legacyDecorateClassTS([
|
|
706
|
+
Column6({ name: "max_review_cards", type: "int", default: 200 }),
|
|
707
|
+
__legacyMetadataTS("design:type", Number)
|
|
708
|
+
], FlashcardSessionEntity.prototype, "maxReviewCards", undefined);
|
|
709
|
+
__legacyDecorateClassTS([
|
|
710
|
+
Column6({
|
|
711
|
+
name: "desired_retention",
|
|
712
|
+
type: "decimal",
|
|
713
|
+
precision: 4,
|
|
714
|
+
scale: 3,
|
|
715
|
+
default: 0.9
|
|
716
|
+
}),
|
|
717
|
+
__legacyMetadataTS("design:type", Number)
|
|
718
|
+
], FlashcardSessionEntity.prototype, "desiredRetention", undefined);
|
|
719
|
+
__legacyDecorateClassTS([
|
|
720
|
+
Column6({ name: "learning_steps", type: "json", default: "[1, 10]" }),
|
|
721
|
+
__legacyMetadataTS("design:type", Array)
|
|
722
|
+
], FlashcardSessionEntity.prototype, "learningSteps", undefined);
|
|
723
|
+
__legacyDecorateClassTS([
|
|
724
|
+
Column6({ name: "graduating_interval", type: "int", default: 1 }),
|
|
725
|
+
__legacyMetadataTS("design:type", Number)
|
|
726
|
+
], FlashcardSessionEntity.prototype, "graduatingInterval", undefined);
|
|
727
|
+
__legacyDecorateClassTS([
|
|
728
|
+
Column6({ name: "easy_interval", type: "int", default: 4 }),
|
|
729
|
+
__legacyMetadataTS("design:type", Number)
|
|
730
|
+
], FlashcardSessionEntity.prototype, "easyInterval", undefined);
|
|
731
|
+
__legacyDecorateClassTS([
|
|
732
|
+
Column6({ name: "max_interval", type: "int", default: 36500 }),
|
|
733
|
+
__legacyMetadataTS("design:type", Number)
|
|
734
|
+
], FlashcardSessionEntity.prototype, "maxInterval", undefined);
|
|
735
|
+
FlashcardSessionEntity = __legacyDecorateClassTS([
|
|
736
|
+
Entity6({
|
|
737
|
+
name: "flashcard_sessions"
|
|
738
|
+
})
|
|
739
|
+
], FlashcardSessionEntity);
|
|
740
|
+
|
|
741
|
+
// src/entities/gamification/flashcard/FlashcardStatsEntity.ts
|
|
742
|
+
import { Column as Column7, Entity as Entity7 } from "typeorm";
|
|
743
|
+
class FlashcardStatsEntity extends BaseEntity {
|
|
744
|
+
}
|
|
745
|
+
__legacyDecorateClassTS([
|
|
746
|
+
Column7({ name: "cards_studied_today", type: "int", default: 0 }),
|
|
747
|
+
__legacyMetadataTS("design:type", Number)
|
|
748
|
+
], FlashcardStatsEntity.prototype, "cardsStudiedToday", undefined);
|
|
749
|
+
__legacyDecorateClassTS([
|
|
750
|
+
Column7({ name: "time_spent_today", type: "int", default: 0 }),
|
|
751
|
+
__legacyMetadataTS("design:type", Number)
|
|
752
|
+
], FlashcardStatsEntity.prototype, "timeSpentToday", undefined);
|
|
753
|
+
__legacyDecorateClassTS([
|
|
754
|
+
Column7({ name: "current_streak", type: "int", default: 0 }),
|
|
755
|
+
__legacyMetadataTS("design:type", Number)
|
|
756
|
+
], FlashcardStatsEntity.prototype, "currentStreak", undefined);
|
|
757
|
+
__legacyDecorateClassTS([
|
|
758
|
+
Column7({ name: "longest_streak", type: "int", default: 0 }),
|
|
759
|
+
__legacyMetadataTS("design:type", Number)
|
|
760
|
+
], FlashcardStatsEntity.prototype, "longestStreak", undefined);
|
|
761
|
+
__legacyDecorateClassTS([
|
|
762
|
+
Column7({ name: "total_reviews", type: "int", default: 0 }),
|
|
763
|
+
__legacyMetadataTS("design:type", Number)
|
|
764
|
+
], FlashcardStatsEntity.prototype, "totalReviews", undefined);
|
|
765
|
+
__legacyDecorateClassTS([
|
|
766
|
+
Column7({ name: "total_study_time", type: "int", default: 0 }),
|
|
767
|
+
__legacyMetadataTS("design:type", Number)
|
|
768
|
+
], FlashcardStatsEntity.prototype, "totalStudyTime", undefined);
|
|
769
|
+
__legacyDecorateClassTS([
|
|
770
|
+
Column7({
|
|
771
|
+
name: "retention_rate",
|
|
772
|
+
type: "decimal",
|
|
773
|
+
precision: 5,
|
|
774
|
+
scale: 4,
|
|
775
|
+
default: 0
|
|
776
|
+
}),
|
|
777
|
+
__legacyMetadataTS("design:type", Number)
|
|
778
|
+
], FlashcardStatsEntity.prototype, "retentionRate", undefined);
|
|
779
|
+
__legacyDecorateClassTS([
|
|
780
|
+
Column7({ name: "new_cards_count", type: "int", default: 0 }),
|
|
781
|
+
__legacyMetadataTS("design:type", Number)
|
|
782
|
+
], FlashcardStatsEntity.prototype, "newCardsCount", undefined);
|
|
783
|
+
__legacyDecorateClassTS([
|
|
784
|
+
Column7({ name: "learning_cards_count", type: "int", default: 0 }),
|
|
785
|
+
__legacyMetadataTS("design:type", Number)
|
|
786
|
+
], FlashcardStatsEntity.prototype, "learningCardsCount", undefined);
|
|
787
|
+
__legacyDecorateClassTS([
|
|
788
|
+
Column7({ name: "review_cards_count", type: "int", default: 0 }),
|
|
789
|
+
__legacyMetadataTS("design:type", Number)
|
|
790
|
+
], FlashcardStatsEntity.prototype, "reviewCardsCount", undefined);
|
|
791
|
+
__legacyDecorateClassTS([
|
|
792
|
+
Column7({ name: "suspended_cards_count", type: "int", default: 0 }),
|
|
793
|
+
__legacyMetadataTS("design:type", Number)
|
|
794
|
+
], FlashcardStatsEntity.prototype, "suspendedCardsCount", undefined);
|
|
795
|
+
__legacyDecorateClassTS([
|
|
796
|
+
Column7({ name: "mature_cards_count", type: "int", default: 0 }),
|
|
797
|
+
__legacyMetadataTS("design:type", Number)
|
|
798
|
+
], FlashcardStatsEntity.prototype, "matureCardsCount", undefined);
|
|
799
|
+
__legacyDecorateClassTS([
|
|
800
|
+
Column7({ name: "young_cards_count", type: "int", default: 0 }),
|
|
801
|
+
__legacyMetadataTS("design:type", Number)
|
|
802
|
+
], FlashcardStatsEntity.prototype, "youngCardsCount", undefined);
|
|
803
|
+
__legacyDecorateClassTS([
|
|
804
|
+
Column7({ name: "again_count", type: "int", default: 0 }),
|
|
805
|
+
__legacyMetadataTS("design:type", Number)
|
|
806
|
+
], FlashcardStatsEntity.prototype, "againCount", undefined);
|
|
807
|
+
__legacyDecorateClassTS([
|
|
808
|
+
Column7({ name: "hard_count", type: "int", default: 0 }),
|
|
809
|
+
__legacyMetadataTS("design:type", Number)
|
|
810
|
+
], FlashcardStatsEntity.prototype, "hardCount", undefined);
|
|
811
|
+
__legacyDecorateClassTS([
|
|
812
|
+
Column7({ name: "good_count", type: "int", default: 0 }),
|
|
813
|
+
__legacyMetadataTS("design:type", Number)
|
|
814
|
+
], FlashcardStatsEntity.prototype, "goodCount", undefined);
|
|
815
|
+
__legacyDecorateClassTS([
|
|
816
|
+
Column7({ name: "easy_count", type: "int", default: 0 }),
|
|
817
|
+
__legacyMetadataTS("design:type", Number)
|
|
818
|
+
], FlashcardStatsEntity.prototype, "easyCount", undefined);
|
|
819
|
+
__legacyDecorateClassTS([
|
|
820
|
+
Column7({ name: "start_date", type: "timestamptz" }),
|
|
821
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
822
|
+
], FlashcardStatsEntity.prototype, "startDate", undefined);
|
|
823
|
+
__legacyDecorateClassTS([
|
|
824
|
+
Column7({ name: "end_date", type: "timestamptz" }),
|
|
825
|
+
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
826
|
+
], FlashcardStatsEntity.prototype, "endDate", undefined);
|
|
827
|
+
FlashcardStatsEntity = __legacyDecorateClassTS([
|
|
828
|
+
Entity7({
|
|
829
|
+
name: "flashcard_stats"
|
|
830
|
+
})
|
|
831
|
+
], FlashcardStatsEntity);
|
|
832
|
+
|
|
833
|
+
export { FlashcardScheduleEntity, FlashcardEntity, FlashcardDeckEntity, FlashcardPresetEntity, FlashcardSessionEntity, FlashcardReviewEntity, FlashcardStatsEntity };
|
|
834
|
+
|
|
835
|
+
//# debugId=1441BF4B66A9CD4664756E2164756E21
|