started backend conversion to typescript

This commit is contained in:
2025-10-17 12:01:38 -04:00
parent f7a0884fb3
commit cbe2cef565
20 changed files with 221 additions and 33 deletions

View File

@@ -0,0 +1,36 @@
// const pool = require('../db');
import pool from '../db';
export interface CalendarEvent {
id: number;
name: string;
start: Date; // DATETIME → Date
end: Date; // DATETIME → Date
location: string;
color: string; // CHAR(7) like "#3b82f6"
description?: string | null;
creator?: number | null; // foreign key to members.id, nullable
cancelled: boolean; // TINYINT(1) → boolean
created_at: Date; // TIMESTAMP → Date
updated_at: Date; // TIMESTAMP → Date
}
export async function createEvent(eventObject) {
}
export async function updateEvent(eventObject) {
}
export async function cancelEvent(eventID) {
}
export async function getShortEventsInRange(startDate, endDate) {
}
export async function getEventDetailed(eventID) {
}