@ooneex/typeorm 0.12.0 → 0.14.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-19qhst35.js +5 -0
- package/dist/shared/{chunk-tqd6ek7s.js.map → chunk-19qhst35.js.map} +2 -2
- package/dist/shared/{chunk-trhrh4e1.js → chunk-31y260d6.js} +24 -89
- package/dist/shared/{chunk-trhrh4e1.js.map → chunk-31y260d6.js.map} +2 -2
- package/dist/shared/chunk-59vwmfpm.js +5 -0
- package/dist/shared/{chunk-r9hsk9fk.js.map → chunk-59vwmfpm.js.map} +1 -1
- package/dist/shared/chunk-5tnqjb3n.js +5 -0
- package/dist/shared/{chunk-2wdazj26.js.map → chunk-5tnqjb3n.js.map} +2 -2
- package/dist/shared/chunk-5ybg5hda.js +5 -0
- package/dist/shared/{chunk-m4mpkr4n.js.map → chunk-5ybg5hda.js.map} +2 -2
- package/dist/shared/chunk-6jnj2pfx.js +5 -0
- package/dist/shared/{chunk-p12g6e7b.js.map → chunk-6jnj2pfx.js.map} +2 -2
- package/dist/shared/chunk-6kdkyjbn.js +5 -0
- package/dist/shared/{chunk-mssxq87m.js.map → chunk-6kdkyjbn.js.map} +2 -2
- package/dist/shared/{chunk-jap9t59k.js → chunk-aj0aak90.js} +14 -52
- package/dist/shared/{chunk-jap9t59k.js.map → chunk-aj0aak90.js.map} +2 -2
- package/dist/shared/chunk-e51ktjsq.js +5 -0
- package/dist/shared/{chunk-efmap3y3.js.map → chunk-e51ktjsq.js.map} +2 -2
- package/dist/shared/{chunk-yszvxhf3.js → chunk-jr0xys18.js} +11 -41
- package/dist/shared/{chunk-yszvxhf3.js.map → chunk-jr0xys18.js.map} +2 -2
- package/dist/shared/chunk-kw4t1san.js +5 -0
- package/dist/shared/{chunk-m9wkjs7v.js.map → chunk-kw4t1san.js.map} +2 -2
- package/dist/shared/chunk-nfv9ce7v.js +5 -0
- package/dist/shared/{chunk-qbn9p4vj.js.map → chunk-nfv9ce7v.js.map} +2 -2
- package/dist/shared/chunk-p22keb3y.js +5 -0
- package/dist/shared/{chunk-bkdccdhn.js.map → chunk-p22keb3y.js.map} +2 -2
- package/dist/shared/chunk-pbns711f.js +5 -0
- package/dist/shared/{chunk-hkfj9j6w.js.map → chunk-pbns711f.js.map} +2 -2
- package/dist/shared/{chunk-6vmvyg0q.js → chunk-qrs0g3m9.js} +17 -58
- package/dist/shared/{chunk-6vmvyg0q.js.map → chunk-qrs0g3m9.js.map} +2 -2
- package/dist/shared/{chunk-eets3mef.js → chunk-qyf32qsz.js} +22 -75
- package/dist/shared/{chunk-eets3mef.js.map → chunk-qyf32qsz.js.map} +2 -2
- package/dist/shared/chunk-t1jad451.js +5 -0
- package/dist/shared/{chunk-cv6xa6qy.js.map → chunk-t1jad451.js.map} +2 -2
- package/dist/shared/chunk-t5cy307m.js +5 -0
- package/dist/shared/{chunk-wg7xcq50.js.map → chunk-t5cy307m.js.map} +2 -2
- package/dist/shared/chunk-x2d798hg.js +5 -0
- package/dist/shared/{chunk-sk8z5zmk.js.map → chunk-x2d798hg.js.map} +2 -2
- package/dist/shared/chunk-x3pmm3na.js +5 -0
- package/dist/shared/{chunk-cwxhwya1.js.map → chunk-x3pmm3na.js.map} +2 -2
- package/dist/shared/chunk-xrqhqgen.js +5 -0
- package/dist/shared/{chunk-chan1evn.js.map → chunk-xrqhqgen.js.map} +2 -2
- package/dist/shared/chunk-xwe8m6av.js +5 -0
- package/dist/shared/{chunk-0swb1h0m.js.map → chunk-xwe8m6av.js.map} +2 -2
- package/dist/shared/chunk-yrwsqc6r.js +5 -0
- package/dist/shared/{chunk-6m3p1ht9.js.map → chunk-yrwsqc6r.js.map} +2 -2
- package/dist/src/entities/book/index.js +2 -34
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.js +2 -26
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.js +2 -9
- package/dist/src/entities/country/index.js.map +1 -1
- package/dist/src/entities/currency/index.js +2 -9
- package/dist/src/entities/currency/index.js.map +1 -1
- package/dist/src/entities/folder/index.js +2 -394
- package/dist/src/entities/folder/index.js.map +2 -2
- package/dist/src/entities/gamification/flashcard/index.js +2 -26
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +2 -9
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.js +2 -36
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.js +2 -31
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.js +2 -13
- package/dist/src/entities/medecine/index.js.map +1 -1
- package/dist/src/entities/payment/index.js +2 -23
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.js +2 -30
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.js +2 -34
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.js +137 -541
- package/dist/src/migrations/book/index.js.map +2 -2
- package/dist/src/migrations/common/index.js +14 -63
- package/dist/src/migrations/common/index.js.map +2 -2
- package/dist/src/migrations/country/index.js +13 -48
- package/dist/src/migrations/country/index.js.map +2 -2
- package/dist/src/migrations/currency/index.js +14 -50
- package/dist/src/migrations/currency/index.js.map +2 -2
- package/dist/src/migrations/folder/index.js +104 -426
- package/dist/src/migrations/folder/index.js.map +2 -2
- package/dist/src/migrations/gamification/flashcard/index.js +96 -356
- package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
- package/dist/src/migrations/gamification/index.js +2 -8
- package/dist/src/migrations/gamification/index.js.map +1 -1
- package/dist/src/migrations/gamification/mcq/index.js +139 -553
- package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
- package/dist/src/migrations/image/index.js +85 -353
- package/dist/src/migrations/image/index.js.map +2 -2
- package/dist/src/migrations/medecine/index.js +36 -132
- package/dist/src/migrations/medecine/index.js.map +2 -2
- package/dist/src/migrations/payment/index.js +94 -339
- package/dist/src/migrations/payment/index.js.map +2 -2
- package/dist/src/migrations/user/index.js +39 -331
- package/dist/src/migrations/user/index.js.map +2 -2
- package/dist/src/migrations/video/index.js +17 -345
- package/dist/src/migrations/video/index.js.map +2 -2
- package/dist/src/repositories/book/index.js +2 -997
- package/dist/src/repositories/book/index.js.map +2 -2
- package/dist/src/repositories/common/index.js +2 -439
- package/dist/src/repositories/common/index.js.map +2 -2
- package/dist/src/repositories/country/index.js +2 -89
- package/dist/src/repositories/country/index.js.map +2 -2
- package/dist/src/repositories/currency/index.js +2 -89
- package/dist/src/repositories/currency/index.js.map +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js +2 -632
- package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
- package/dist/src/repositories/gamification/index.js +2 -160
- package/dist/src/repositories/gamification/index.js.map +2 -2
- package/dist/src/repositories/gamification/mcq/index.js +2 -1017
- package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
- package/dist/src/repositories/image/index.js +2 -800
- package/dist/src/repositories/image/index.js.map +2 -2
- package/dist/src/repositories/medecine/index.js +2 -243
- package/dist/src/repositories/medecine/index.js.map +2 -2
- package/dist/src/repositories/payment/index.js +2 -560
- package/dist/src/repositories/payment/index.js.map +2 -2
- package/dist/src/repositories/user/index.js +2 -999
- package/dist/src/repositories/user/index.js.map +2 -2
- package/dist/src/repositories/video/index.js +2 -975
- package/dist/src/repositories/video/index.js.map +2 -2
- package/package.json +21 -21
- package/dist/shared/chunk-0swb1h0m.js +0 -51
- package/dist/shared/chunk-2wdazj26.js +0 -371
- package/dist/shared/chunk-6m3p1ht9.js +0 -606
- package/dist/shared/chunk-bkdccdhn.js +0 -105
- package/dist/shared/chunk-chan1evn.js +0 -72
- package/dist/shared/chunk-cv6xa6qy.js +0 -621
- package/dist/shared/chunk-cwxhwya1.js +0 -548
- package/dist/shared/chunk-efmap3y3.js +0 -345
- package/dist/shared/chunk-hkfj9j6w.js +0 -30
- package/dist/shared/chunk-m4mpkr4n.js +0 -34
- package/dist/shared/chunk-m9wkjs7v.js +0 -639
- package/dist/shared/chunk-mssxq87m.js +0 -195
- package/dist/shared/chunk-p12g6e7b.js +0 -38
- package/dist/shared/chunk-qbn9p4vj.js +0 -835
- package/dist/shared/chunk-r9hsk9fk.js +0 -20
- package/dist/shared/chunk-sk8z5zmk.js +0 -112
- package/dist/shared/chunk-tqd6ek7s.js +0 -86
- package/dist/shared/chunk-wg7xcq50.js +0 -38
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
TagEntity
|
|
4
|
-
} from "./chunk-p12g6e7b.js";
|
|
5
|
-
import {
|
|
6
|
-
StatusEntity
|
|
7
|
-
} from "./chunk-sk8z5zmk.js";
|
|
8
|
-
import {
|
|
9
|
-
BaseEntity
|
|
10
|
-
} from "./chunk-chan1evn.js";
|
|
11
|
-
import {
|
|
12
|
-
__legacyDecorateClassTS,
|
|
13
|
-
__legacyMetadataTS
|
|
14
|
-
} from "./chunk-r9hsk9fk.js";
|
|
15
|
-
|
|
16
|
-
// src/entities/image/ImageEntity.ts
|
|
17
|
-
import { IMAGE_FORMATS, IMAGE_MIMES } from "@ooneex/image";
|
|
18
|
-
import { Column, Entity, JoinColumn, JoinTable, ManyToMany, ManyToOne } from "typeorm";
|
|
19
|
-
class ImageEntity extends BaseEntity {
|
|
20
|
-
}
|
|
21
|
-
__legacyDecorateClassTS([
|
|
22
|
-
Column({ name: "url", type: "varchar", length: 500 }),
|
|
23
|
-
__legacyMetadataTS("design:type", String)
|
|
24
|
-
], ImageEntity.prototype, "url", undefined);
|
|
25
|
-
__legacyDecorateClassTS([
|
|
26
|
-
Column({ name: "width", type: "int", nullable: true }),
|
|
27
|
-
__legacyMetadataTS("design:type", Number)
|
|
28
|
-
], ImageEntity.prototype, "width", undefined);
|
|
29
|
-
__legacyDecorateClassTS([
|
|
30
|
-
Column({ name: "height", type: "int", nullable: true }),
|
|
31
|
-
__legacyMetadataTS("design:type", Number)
|
|
32
|
-
], ImageEntity.prototype, "height", undefined);
|
|
33
|
-
__legacyDecorateClassTS([
|
|
34
|
-
Column({ name: "alt", type: "varchar", length: 255, nullable: true }),
|
|
35
|
-
__legacyMetadataTS("design:type", String)
|
|
36
|
-
], ImageEntity.prototype, "alt", undefined);
|
|
37
|
-
__legacyDecorateClassTS([
|
|
38
|
-
Column({ name: "title", type: "varchar", length: 255, nullable: true }),
|
|
39
|
-
__legacyMetadataTS("design:type", String)
|
|
40
|
-
], ImageEntity.prototype, "title", undefined);
|
|
41
|
-
__legacyDecorateClassTS([
|
|
42
|
-
Column({
|
|
43
|
-
name: "format",
|
|
44
|
-
type: "enum",
|
|
45
|
-
enum: IMAGE_FORMATS,
|
|
46
|
-
nullable: true
|
|
47
|
-
}),
|
|
48
|
-
__legacyMetadataTS("design:type", typeof ImageFormatType === "undefined" ? Object : ImageFormatType)
|
|
49
|
-
], ImageEntity.prototype, "format", undefined);
|
|
50
|
-
__legacyDecorateClassTS([
|
|
51
|
-
Column({
|
|
52
|
-
name: "mime_type",
|
|
53
|
-
type: "enum",
|
|
54
|
-
enum: IMAGE_MIMES,
|
|
55
|
-
nullable: true
|
|
56
|
-
}),
|
|
57
|
-
__legacyMetadataTS("design:type", typeof ImageMimeType === "undefined" ? Object : ImageMimeType)
|
|
58
|
-
], ImageEntity.prototype, "mimeType", undefined);
|
|
59
|
-
__legacyDecorateClassTS([
|
|
60
|
-
Column({ name: "size", type: "bigint", nullable: true }),
|
|
61
|
-
__legacyMetadataTS("design:type", Number)
|
|
62
|
-
], ImageEntity.prototype, "size", undefined);
|
|
63
|
-
__legacyDecorateClassTS([
|
|
64
|
-
Column({ name: "metadata", type: "jsonb", nullable: true }),
|
|
65
|
-
__legacyMetadataTS("design:type", typeof Record === "undefined" ? Object : Record)
|
|
66
|
-
], ImageEntity.prototype, "metadata", undefined);
|
|
67
|
-
__legacyDecorateClassTS([
|
|
68
|
-
Column({ name: "context", type: "varchar", length: 255, nullable: true }),
|
|
69
|
-
__legacyMetadataTS("design:type", String)
|
|
70
|
-
], ImageEntity.prototype, "context", undefined);
|
|
71
|
-
__legacyDecorateClassTS([
|
|
72
|
-
Column({ name: "context_id", type: "varchar", length: 25, nullable: true }),
|
|
73
|
-
__legacyMetadataTS("design:type", String)
|
|
74
|
-
], ImageEntity.prototype, "contextId", undefined);
|
|
75
|
-
__legacyDecorateClassTS([
|
|
76
|
-
ManyToOne(() => StatusEntity, {
|
|
77
|
-
nullable: true,
|
|
78
|
-
eager: false,
|
|
79
|
-
cascade: ["insert", "update"]
|
|
80
|
-
}),
|
|
81
|
-
JoinColumn({ name: "status_id" }),
|
|
82
|
-
__legacyMetadataTS("design:type", typeof IStatus === "undefined" ? Object : IStatus)
|
|
83
|
-
], ImageEntity.prototype, "status", undefined);
|
|
84
|
-
__legacyDecorateClassTS([
|
|
85
|
-
ManyToMany(() => TagEntity, {
|
|
86
|
-
nullable: true,
|
|
87
|
-
eager: false,
|
|
88
|
-
cascade: ["insert", "update"]
|
|
89
|
-
}),
|
|
90
|
-
JoinTable({
|
|
91
|
-
name: "images_tags",
|
|
92
|
-
joinColumn: { name: "image_id", referencedColumnName: "id" },
|
|
93
|
-
inverseJoinColumn: { name: "tag_id", referencedColumnName: "id" }
|
|
94
|
-
}),
|
|
95
|
-
__legacyMetadataTS("design:type", Array)
|
|
96
|
-
], ImageEntity.prototype, "tags", undefined);
|
|
97
|
-
ImageEntity = __legacyDecorateClassTS([
|
|
98
|
-
Entity({
|
|
99
|
-
name: "images"
|
|
100
|
-
})
|
|
101
|
-
], ImageEntity);
|
|
102
|
-
|
|
103
|
-
export { ImageEntity };
|
|
104
|
-
|
|
105
|
-
//# debugId=49762F2459817D9864756E2164756E21
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__legacyDecorateClassTS,
|
|
4
|
-
__legacyMetadataTS
|
|
5
|
-
} from "./chunk-r9hsk9fk.js";
|
|
6
|
-
|
|
7
|
-
// src/entities/common/BaseEntity.ts
|
|
8
|
-
import { random } from "@ooneex/utils";
|
|
9
|
-
import { Column, CreateDateColumn, DeleteDateColumn, PrimaryColumn, UpdateDateColumn } from "typeorm";
|
|
10
|
-
class BaseEntity {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.id = random.nanoid(25);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
__legacyDecorateClassTS([
|
|
16
|
-
PrimaryColumn({ name: "id", type: "varchar", length: 25 }),
|
|
17
|
-
__legacyMetadataTS("design:type", String)
|
|
18
|
-
], BaseEntity.prototype, "id", undefined);
|
|
19
|
-
__legacyDecorateClassTS([
|
|
20
|
-
Column({
|
|
21
|
-
name: "is_locked",
|
|
22
|
-
type: "boolean",
|
|
23
|
-
default: false,
|
|
24
|
-
nullable: true
|
|
25
|
-
}),
|
|
26
|
-
__legacyMetadataTS("design:type", Boolean)
|
|
27
|
-
], BaseEntity.prototype, "isLocked", undefined);
|
|
28
|
-
__legacyDecorateClassTS([
|
|
29
|
-
Column({ name: "locked_at", type: "timestamptz", nullable: true }),
|
|
30
|
-
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
31
|
-
], BaseEntity.prototype, "lockedAt", undefined);
|
|
32
|
-
__legacyDecorateClassTS([
|
|
33
|
-
Column({
|
|
34
|
-
name: "is_blocked",
|
|
35
|
-
type: "boolean",
|
|
36
|
-
default: false,
|
|
37
|
-
nullable: true
|
|
38
|
-
}),
|
|
39
|
-
__legacyMetadataTS("design:type", Boolean)
|
|
40
|
-
], BaseEntity.prototype, "isBlocked", undefined);
|
|
41
|
-
__legacyDecorateClassTS([
|
|
42
|
-
Column({ name: "blocked_at", type: "timestamptz", nullable: true }),
|
|
43
|
-
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
44
|
-
], BaseEntity.prototype, "blockedAt", undefined);
|
|
45
|
-
__legacyDecorateClassTS([
|
|
46
|
-
Column({ name: "block_reason", type: "text", nullable: true }),
|
|
47
|
-
__legacyMetadataTS("design:type", String)
|
|
48
|
-
], BaseEntity.prototype, "blockReason", undefined);
|
|
49
|
-
__legacyDecorateClassTS([
|
|
50
|
-
Column({ name: "is_public", type: "boolean", default: true, nullable: true }),
|
|
51
|
-
__legacyMetadataTS("design:type", Boolean)
|
|
52
|
-
], BaseEntity.prototype, "isPublic", undefined);
|
|
53
|
-
__legacyDecorateClassTS([
|
|
54
|
-
Column({ name: "language", type: "varchar", length: 10, nullable: true }),
|
|
55
|
-
__legacyMetadataTS("design:type", typeof LocaleType === "undefined" ? Object : LocaleType)
|
|
56
|
-
], BaseEntity.prototype, "language", undefined);
|
|
57
|
-
__legacyDecorateClassTS([
|
|
58
|
-
CreateDateColumn({ name: "created_at" }),
|
|
59
|
-
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
60
|
-
], BaseEntity.prototype, "createdAt", undefined);
|
|
61
|
-
__legacyDecorateClassTS([
|
|
62
|
-
UpdateDateColumn({ name: "updated_at" }),
|
|
63
|
-
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
64
|
-
], BaseEntity.prototype, "updatedAt", undefined);
|
|
65
|
-
__legacyDecorateClassTS([
|
|
66
|
-
DeleteDateColumn({ name: "deleted_at" }),
|
|
67
|
-
__legacyMetadataTS("design:type", typeof Date === "undefined" ? Object : Date)
|
|
68
|
-
], BaseEntity.prototype, "deletedAt", undefined);
|
|
69
|
-
|
|
70
|
-
export { BaseEntity };
|
|
71
|
-
|
|
72
|
-
//# debugId=C0DC0EDAA08D8C1B64756E2164756E21
|