diff --git a/dist/Notary/Notification.d.ts b/dist/Notary/Notification.d.ts index 6fa5f0d..f580d58 100644 --- a/dist/Notary/Notification.d.ts +++ b/dist/Notary/Notification.d.ts @@ -1,10 +1,12 @@ import Resource from "../Resource"; import UserNotification from "./UserNotification"; +import User from "./User"; export default class Notification extends Resource { uid?: string; message: string; redirection_url: string; created_at: Date | null; updated_at: Date | null; + user?: User[]; userNotification?: UserNotification; } diff --git a/dist/Notary/Notification.js b/dist/Notary/Notification.js index 7ccfb02..771a917 100644 --- a/dist/Notary/Notification.js +++ b/dist/Notary/Notification.js @@ -16,6 +16,7 @@ const class_validator_1 = require("class-validator"); const Resource_1 = __importDefault(require("../Resource")); const class_transformer_1 = require("class-transformer"); const UserNotification_1 = __importDefault(require("./UserNotification")); +const User_1 = __importDefault(require("./User")); class Notification extends Resource_1.default { constructor() { super(...arguments); @@ -46,6 +47,11 @@ __decorate([ (0, class_validator_1.IsDate)(), __metadata("design:type", Object) ], Notification.prototype, "updated_at", void 0); +__decorate([ + (0, class_transformer_1.Expose)(), + (0, class_transformer_1.Type)(() => User_1.default), + __metadata("design:type", Array) +], Notification.prototype, "user", void 0); __decorate([ (0, class_transformer_1.Expose)(), (0, class_transformer_1.Type)(() => UserNotification_1.default), diff --git a/src/Notary/Notification.ts b/src/Notary/Notification.ts index ec816f5..4479ced 100644 --- a/src/Notary/Notification.ts +++ b/src/Notary/Notification.ts @@ -2,6 +2,7 @@ import { IsDate, IsUrl } from "class-validator"; import Resource from "../Resource"; import { Expose, Type } from "class-transformer"; import UserNotification from "./UserNotification"; +import User from "./User"; export default class Notification extends Resource { @Expose() @@ -22,6 +23,10 @@ export default class Notification extends Resource { @IsDate() public updated_at: Date | null = null; + @Expose() + @Type(() => User) + public user?: User[]; + @Expose() @Type(() => UserNotification) public userNotification?: UserNotification;