version/0.1.4 #9
@@ -135,6 +135,25 @@ export class Event implements TEventEntity {
|
|||||||
this.notification = notification;
|
this.notification = notification;
|
||||||
this.deleteDate = deleteDate;
|
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 ) {
|
syncWithDb ( db: Database ) {
|
||||||
const query = db.prepare( `SELECT * FROM events WHERE event_uid = $event_uid;`).as(Event);
|
const query = db.prepare( `SELECT * FROM events WHERE event_uid = $event_uid;`).as(Event);
|
||||||
const entity = query.get({$event_uid: this.event_uid });
|
const entity = query.get({$event_uid: this.event_uid });
|
||||||
|
|||||||
Reference in New Issue
Block a user