From c5c5d872d7b35066ef96f6abaa6190fe3a1fc7cb Mon Sep 17 00:00:00 2001 From: chiko Date: Mon, 27 Oct 2025 20:01:29 +0100 Subject: [PATCH] Added Event.toString() --- src/component/event/events.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/component/event/events.ts b/src/component/event/events.ts index d02b6ec..84b84fb 100644 --- a/src/component/event/events.ts +++ b/src/component/event/events.ts @@ -135,6 +135,25 @@ export class Event implements TEventEntity { this.notification = notification; this.deleteDate = deleteDate; } + toString() { + return { + event_uid: this.event_uid, + uid: this.uid, + title: this.title, + description: this.description, + date_at: this.date_at, + time_start: this.time_start, + time_end: this.time_end, + posted_by: this.posted_by, + location: this.location, + event_type: this.event_type, + timezone: this.timezone, + link: this.link, + notification: this.notification, + deleteDate: this.deleteDate + } + } + syncWithDb ( db: Database ) { const query = db.prepare( `SELECT * FROM events WHERE event_uid = $event_uid;`).as(Event); const entity = query.get({$event_uid: this.event_uid });