dev to main - v0.1.2 #4
@@ -26,6 +26,21 @@ export type TEventEntityNew = Omit<TEventEntity, "event_uid">
|
|||||||
|
|
||||||
export class Event implements TEventEntity {
|
export class Event implements TEventEntity {
|
||||||
static table_name: "events"
|
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 {
|
static createTable (db: Database): void {
|
||||||
const query = db.query(`CREATE TABLE IF NOT EXISTS "events" (
|
const query = db.query(`CREATE TABLE IF NOT EXISTS "events" (
|
||||||
"event_uid" INTEGER NOT NULL,
|
"event_uid" INTEGER NOT NULL,
|
||||||
@@ -104,21 +119,6 @@ export class Event implements TEventEntity {
|
|||||||
return query.all();
|
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"]) {
|
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.event_uid = event_uid;
|
||||||
this.uid = uid;
|
this.uid = uid;
|
||||||
|
|||||||
Reference in New Issue
Block a user