90dc-core 1.5.12 → 1.5.13
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 +1 -1
- package/dist/lib/dbmodels/Badge.js.map +1 -1
- package/dist/lib/dbmodels/UserBadges.d.ts +1 -0
- package/dist/lib/dbmodels/UserBadges.js +7 -0
- package/dist/lib/dbmodels/UserBadges.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/dbmodels/Badge.ts +1 -1
- package/src/lib/dbmodels/UserBadges.ts +3 -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.TEXT, allowNull: false })\n declare
|
|
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.TEXT, allowNull: false })\n declare imageURL: string;\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"],"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;AAqB3B,EAAC;;IApBID,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,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAbvCL;;IAgBRP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBvCL;;IAmBRR,cAAc,IAAMO,eAAe,IAAMD;GAnBjCE;AAAAA;IADZH;GACYG"}
|
|
@@ -30,6 +30,13 @@ __decorate([
|
|
|
30
30
|
defaultValue: 1
|
|
31
31
|
})
|
|
32
32
|
], UserBadges.prototype, "timesEarned", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column({
|
|
35
|
+
type: DataType.BOOLEAN,
|
|
36
|
+
allowNull: false,
|
|
37
|
+
defaultValue: false
|
|
38
|
+
})
|
|
39
|
+
], UserBadges.prototype, "hasBeenShown", void 0);
|
|
33
40
|
__decorate([
|
|
34
41
|
BelongsTo(()=>PersistedUser)
|
|
35
42
|
], UserBadges.prototype, "user", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/dbmodels/UserBadges.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from \"sequelize-typescript\";\nimport { Badge } from \"./Badge\";\nimport { PersistedUser } from \"./PersistedUser\";\n\n@Table({\n timestamps: true,\n})export class UserBadges extends Model {\n @ForeignKey(() => PersistedUser)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare userUuid: string;\n\n @ForeignKey(() => Badge)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare badgeUuid: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 1})\n declare timesEarned: number;\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n}\n"],"names":["BelongsTo","Column","DataType","ForeignKey","Model","Table","Badge","PersistedUser","UserBadges","type","UUID","allowNull","INTEGER","defaultValue","timestamps"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC7F,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAI9C,WAAaC,aAAN,yBAAyBJ;
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/dbmodels/UserBadges.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from \"sequelize-typescript\";\nimport { Badge } from \"./Badge\";\nimport { PersistedUser } from \"./PersistedUser\";\n\n@Table({\n timestamps: true,\n})export class UserBadges extends Model {\n @ForeignKey(() => PersistedUser)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare userUuid: string;\n\n @ForeignKey(() => Badge)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare badgeUuid: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 1})\n declare timesEarned: number;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false})\n declare hasBeenShown: boolean;\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n}\n"],"names":["BelongsTo","Column","DataType","ForeignKey","Model","Table","Badge","PersistedUser","UserBadges","type","UUID","allowNull","INTEGER","defaultValue","BOOLEAN","timestamps"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC7F,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAI9C,WAAaC,aAAN,yBAAyBJ;AA0BlC,EAAC;;IAzBID,WAAW,IAAMI;IACjBN,OAAO;QACJQ,MAAMP,SAASQ,IAAI;QACnBC,WAAW,KAAK;IACpB;GALWH;;IAQVL,WAAW,IAAMG;IACjBL,OAAO;QACJQ,MAAMP,SAASQ,IAAI;QACnBC,WAAW,KAAK;IACpB;GAZWH;;IAeVP,OAAO;QAAEQ,MAAMP,SAASU,OAAO;QAAED,WAAW,KAAK;QAAEE,cAAc;IAAC;GAfxDL;;IAkBVP,OAAO;QAAEQ,MAAMP,SAASY,OAAO;QAAEH,WAAW,KAAK;QAAEE,cAAc,KAAK;IAAA;GAlB5DL;;IAqBVR,UAAU,IAAMO;GArBNC;;IAwBVR,UAAU,IAAMM;GAxBNE;AAAAA;IAFdH,MAAM;QACHU,YAAY,IAAI;IACpB;GAAeP"}
|
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.TEXT, allowNull: false })
|
|
20
|
-
declare
|
|
20
|
+
declare imageURL: string;
|
|
21
21
|
|
|
22
22
|
@Column({ type: DataType.TEXT, allowNull: false })
|
|
23
23
|
declare description: string;
|
|
@@ -22,6 +22,9 @@ import { PersistedUser } from "./PersistedUser";
|
|
|
22
22
|
@Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 1})
|
|
23
23
|
declare timesEarned: number;
|
|
24
24
|
|
|
25
|
+
@Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false})
|
|
26
|
+
declare hasBeenShown: boolean;
|
|
27
|
+
|
|
25
28
|
@BelongsTo(() => PersistedUser)
|
|
26
29
|
declare user: PersistedUser;
|
|
27
30
|
|