From 239f2327ac2451d3d4578ef09d24a81c8cda01ec Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 27 Jul 2023 10:44:42 +0200 Subject: [PATCH] :sparkles: Adding votes and appointments to users --- dist/SuperAdmin/User.d.ts | 4 +++- dist/SuperAdmin/User.js | 11 ++++++++--- src/SuperAdmin/User.ts | 13 +++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dist/SuperAdmin/User.d.ts b/dist/SuperAdmin/User.d.ts index 4714353..e1bb50f 100644 --- a/dist/SuperAdmin/User.d.ts +++ b/dist/SuperAdmin/User.d.ts @@ -1,6 +1,8 @@ export * from "../Admin/User"; import UserAdmin from "../Admin/User"; import Vote from "./Vote"; +import Appointment from "./Appointment"; export default class User extends UserAdmin { - vote?: Vote; + votes?: Vote[]; + appointment?: Appointment[]; } diff --git a/dist/SuperAdmin/User.js b/dist/SuperAdmin/User.js index 336233f..dea75fc 100644 --- a/dist/SuperAdmin/User.js +++ b/dist/SuperAdmin/User.js @@ -30,12 +30,17 @@ __exportStar(require("../Admin/User"), exports); const class_transformer_1 = require("class-transformer"); const User_1 = __importDefault(require("../Admin/User")); const Vote_1 = __importDefault(require("./Vote")); +const Appointment_1 = __importDefault(require("./Appointment")); class User extends User_1.default { } __decorate([ (0, class_transformer_1.Expose)(), (0, class_transformer_1.Type)(() => Vote_1.default), - __metadata("design:type", Vote_1.default) -], User.prototype, "vote", void 0); + __metadata("design:type", Array) +], User.prototype, "votes", void 0); +__decorate([ + (0, class_transformer_1.Expose)(), + (0, class_transformer_1.Type)(() => Appointment_1.default), + __metadata("design:type", Array) +], User.prototype, "appointment", void 0); exports.default = User; -; diff --git a/src/SuperAdmin/User.ts b/src/SuperAdmin/User.ts index 79b8416..9ca9c93 100644 --- a/src/SuperAdmin/User.ts +++ b/src/SuperAdmin/User.ts @@ -2,9 +2,14 @@ export * from "../Admin/User"; import { Expose, Type } from "class-transformer"; import UserAdmin from "../Admin/User"; import Vote from "./Vote"; +import Appointment from "./Appointment"; export default class User extends UserAdmin { - @Expose() - @Type(() => Vote) - public vote?: Vote; -}; \ No newline at end of file + @Expose() + @Type(() => Vote) + public votes?: Vote[]; + + @Expose() + @Type(() => Appointment) + public appointment?: Appointment[]; +}