diff --git a/src/component/event/events.ts b/src/component/event/events.ts index 2954946..c3ce724 100644 --- a/src/component/event/events.ts +++ b/src/component/event/events.ts @@ -26,6 +26,21 @@ export type TEventEntityNew = Omit export class Event implements TEventEntity { static table_name: "events" + event_uid: number; + uid: string; + title: string; + description: string; + date_at: string; + time_start: string; + time_end: string; + posted_by: string; + location: string; + event_type: TEventEntity["event_type"]; + timezone: string; + link: string; + notification: TEventEntity["notification"]; + deleteDate: TEventEntity["deleteDate"]; + static createTable (db: Database): void { const query = db.query(`CREATE TABLE IF NOT EXISTS "events" ( "event_uid" INTEGER NOT NULL, @@ -104,21 +119,6 @@ export class Event implements TEventEntity { return query.all(); } - event_uid: number; - uid: string; - title: string; - description: string; - date_at: string; - time_start: string; - time_end: string; - posted_by: string; - location: string; - event_type: TEventEntity["event_type"]; - timezone: string; - link: string; - notification: TEventEntity["notification"]; - deleteDate: TEventEntity["deleteDate"]; - constructor(event_uid: number, uid: string, title: string, description: string, date_at: string, time_start: string, time_end: string, posted_by: string, location: string, event_type: TEventEntity["event_type"], timezone: string, link: string, notification: TEventEntity["notification"], deleteDate: TEventEntity["deleteDate"]) { this.event_uid = event_uid; this.uid = uid;