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 });