90dc-core 1.5.18 → 1.5.19
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/lib/dbmodels/Badge.d.ts +1 -1
- package/dist/lib/dbmodels/Badge.js.map +1 -1
- package/dist/lib/dbmodels/TranslatedBadge.d.ts +11 -0
- package/dist/lib/dbmodels/TranslatedBadge.js +51 -0
- package/dist/lib/dbmodels/TranslatedBadge.js.map +1 -0
- package/package.json +1 -1
- package/src/lib/dbmodels/Badge.ts +1 -1
- package/src/lib/dbmodels/TranslatedBadge.ts +38 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/dbmodels/Badge.ts"],"sourcesContent":["import { BelongsToMany, Column, DataType, Default, Model, Table } from \"sequelize-typescript\";\nimport { UserBadges } from \"./UserBadges\";\nimport { PersistedUser } from \"./PersistedUser\";\n\n@Table\nexport class Badge extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.ARRAY(DataType.TEXT), allowNull: false })\n declare tags: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare imageURL: string;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare order: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @BelongsToMany(() => PersistedUser, () => UserBadges)\n declare users: PersistedUser[];\n}\n"],"names":["BelongsToMany","Column","DataType","Default","Model","Table","UserBadges","PersistedUser","Badge","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","ARRAY","INTEGER"],"mappings":";;;;;;AAAA,SAASA,aAAa,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC9F,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,WAAaC,QAAN,oBAAoBJ;AA2B3B,EAAC;;IA1BID,QAAQD,SAASO,MAAM;IACvBR,OAAO;QACJS,MAAMR,SAASS,IAAI;QACnBC,cAAcV,SAASS,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAVvCL;;IAaRP,OAAO;QAAES,MAAMR,SAASc,KAAK,CAACd,SAASa,IAAI;QAAGF,WAAW,KAAK;IAAC;GAbvDL;;IAgBRP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBvCL;;IAmBRP,OAAO;QAAES,MAAMR,SAASe,OAAO;QAAEJ,WAAW,IAAI;IAAC;GAnBzCL;;IAsBRP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAtBvCL;;IAyBRR,cAAc,IAAMO,eAAe,IAAMD;GAzBjCE;AAAAA;IADZH;GACYG"}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/dbmodels/Badge.ts"],"sourcesContent":["import { BelongsToMany, Column, DataType, Default, Model, Table } from \"sequelize-typescript\";\nimport { UserBadges } from \"./UserBadges\";\nimport { PersistedUser } from \"./PersistedUser\";\n\n@Table\nexport class Badge extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.ARRAY(DataType.TEXT), allowNull: false })\n declare tags: string[];\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare imageURL: string;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare order: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @BelongsToMany(() => PersistedUser, () => UserBadges)\n declare users: PersistedUser[];\n}\n"],"names":["BelongsToMany","Column","DataType","Default","Model","Table","UserBadges","PersistedUser","Badge","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","ARRAY","INTEGER"],"mappings":";;;;;;AAAA,SAASA,aAAa,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC9F,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,aAAa,QAAQ,kBAAkB;AAGhD,WAAaC,QAAN,oBAAoBJ;AA2B3B,EAAC;;IA1BID,QAAQD,SAASO,MAAM;IACvBR,OAAO;QACJS,MAAMR,SAASS,IAAI;QACnBC,cAAcV,SAASS,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAVvCL;;IAaRP,OAAO;QAAES,MAAMR,SAASc,KAAK,CAACd,SAASa,IAAI;QAAGF,WAAW,KAAK;IAAC;GAbvDL;;IAgBRP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBvCL;;IAmBRP,OAAO;QAAES,MAAMR,SAASe,OAAO;QAAEJ,WAAW,IAAI;IAAC;GAnBzCL;;IAsBRP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAtBvCL;;IAyBRR,cAAc,IAAMO,eAAe,IAAMD;GAzBjCE;AAAAA;IADZH;GACYG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { Badge } from "./Badge";
|
|
3
|
+
export declare class TranslatedBadge extends Model<TranslatedBadge> {
|
|
4
|
+
uuid: string;
|
|
5
|
+
badgeUuid: string;
|
|
6
|
+
title: string;
|
|
7
|
+
language: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
description: string;
|
|
10
|
+
badge: Badge;
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BelongsTo, Column, DataType, Default, ForeignKey, Model, PrimaryKey, Table } from "sequelize-typescript";
|
|
8
|
+
import { Badge } from "./Badge";
|
|
9
|
+
export let TranslatedBadge = class TranslatedBadge extends Model {
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
PrimaryKey,
|
|
13
|
+
Default(DataType.UUIDV4),
|
|
14
|
+
Column(DataType.UUID)
|
|
15
|
+
], TranslatedBadge.prototype, "uuid", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
ForeignKey(()=>Badge),
|
|
18
|
+
Column(DataType.UUID)
|
|
19
|
+
], TranslatedBadge.prototype, "badgeUuid", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.TEXT,
|
|
23
|
+
allowNull: false
|
|
24
|
+
})
|
|
25
|
+
], TranslatedBadge.prototype, "title", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Column({
|
|
28
|
+
type: DataType.TEXT,
|
|
29
|
+
allowNull: false
|
|
30
|
+
})
|
|
31
|
+
], TranslatedBadge.prototype, "language", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
Column({
|
|
34
|
+
type: DataType.ARRAY(DataType.TEXT),
|
|
35
|
+
allowNull: false
|
|
36
|
+
})
|
|
37
|
+
], TranslatedBadge.prototype, "tags", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Column({
|
|
40
|
+
type: DataType.TEXT,
|
|
41
|
+
allowNull: false
|
|
42
|
+
})
|
|
43
|
+
], TranslatedBadge.prototype, "description", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
BelongsTo(()=>Badge)
|
|
46
|
+
], TranslatedBadge.prototype, "badge", void 0);
|
|
47
|
+
TranslatedBadge = __decorate([
|
|
48
|
+
Table
|
|
49
|
+
], TranslatedBadge);
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=TranslatedBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/dbmodels/TranslatedBadge.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport {Badge} from \"./Badge\";\n\n@Table\nexport class TranslatedBadge extends Model<TranslatedBadge> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @ForeignKey(() => Badge)\n @Column(DataType.UUID)\n declare badgeUuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare language: string;\n\n @Column({ type: DataType.ARRAY(DataType.TEXT), allowNull: false })\n declare tags: string[];\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","Model","PrimaryKey","Table","Badge","TranslatedBadge","UUIDV4","UUID","type","TEXT","allowNull","ARRAY"],"mappings":";;;;;;AAAA,SACIA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,KAAK,QAAO,UAAU;AAG9B,WAAaC,kBAAN,8BAA8BJ;AAwBrC,EAAC;;IAvBIC;IACAH,QAAQD,SAASQ,MAAM;IACvBT,OAAOC,SAASS,IAAI;GAHZF;;IAMRL,WAAW,IAAMI;IACjBP,OAAOC,SAASS,IAAI;GAPZF;;IAURR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAVvCL;;IAaRR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAbvCL;;IAgBRR,OAAO;QAAEW,MAAMV,SAASa,KAAK,CAACb,SAASW,IAAI;QAAGC,WAAW,KAAK;IAAC;GAhBvDL;;IAmBRR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAnBvCL;;IAsBRT,UAAU,IAAMQ;GAtBRC;AAAAA;IADZF;GACYE"}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export class Badge extends Model {
|
|
|
17
17
|
declare title: string;
|
|
18
18
|
|
|
19
19
|
@Column({ type: DataType.ARRAY(DataType.TEXT), allowNull: false })
|
|
20
|
-
declare tags: string;
|
|
20
|
+
declare tags: string[];
|
|
21
21
|
|
|
22
22
|
@Column({ type: DataType.TEXT, allowNull: false })
|
|
23
23
|
declare imageURL: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BelongsTo,
|
|
3
|
+
Column,
|
|
4
|
+
DataType,
|
|
5
|
+
Default,
|
|
6
|
+
ForeignKey,
|
|
7
|
+
Model,
|
|
8
|
+
PrimaryKey,
|
|
9
|
+
Table,
|
|
10
|
+
} from "sequelize-typescript";
|
|
11
|
+
import {Badge} from "./Badge";
|
|
12
|
+
|
|
13
|
+
@Table
|
|
14
|
+
export class TranslatedBadge extends Model<TranslatedBadge> {
|
|
15
|
+
@PrimaryKey
|
|
16
|
+
@Default(DataType.UUIDV4)
|
|
17
|
+
@Column(DataType.UUID)
|
|
18
|
+
declare uuid: string;
|
|
19
|
+
|
|
20
|
+
@ForeignKey(() => Badge)
|
|
21
|
+
@Column(DataType.UUID)
|
|
22
|
+
declare badgeUuid: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: DataType.TEXT, allowNull: false })
|
|
25
|
+
declare title: string;
|
|
26
|
+
|
|
27
|
+
@Column({ type: DataType.TEXT, allowNull: false })
|
|
28
|
+
declare language: string;
|
|
29
|
+
|
|
30
|
+
@Column({ type: DataType.ARRAY(DataType.TEXT), allowNull: false })
|
|
31
|
+
declare tags: string[];
|
|
32
|
+
|
|
33
|
+
@Column({ type: DataType.TEXT, allowNull: false })
|
|
34
|
+
declare description: string;
|
|
35
|
+
|
|
36
|
+
@BelongsTo(() => Badge)
|
|
37
|
+
declare badge: Badge;
|
|
38
|
+
}
|