format codebase with prettier

This commit is contained in:
2026-01-04 16:17:36 +01:00
parent 77f15b6dd1
commit e3f7a778c7
63 changed files with 786 additions and 542 deletions

View File

@@ -1,12 +1,18 @@
import mongoose, { Schema, Document, Model } from 'mongoose';
import { CalendarEvent } from '@caldav/shared';
import { IdVirtual } from './types';
import mongoose, { Schema, Document, Model } from "mongoose";
import { CalendarEvent } from "@caldav/shared";
import { IdVirtual } from "./types";
export interface EventDocument extends Omit<CalendarEvent, 'id'>, Document {
export interface EventDocument extends Omit<CalendarEvent, "id">, Document {
toJSON(): CalendarEvent;
}
const EventSchema = new Schema<EventDocument, Model<EventDocument, {}, {}, IdVirtual>, {}, {}, IdVirtual>(
const EventSchema = new Schema<
EventDocument,
Model<EventDocument, {}, {}, IdVirtual>,
{},
{},
IdVirtual
>(
{
userId: {
type: String,
@@ -58,9 +64,9 @@ const EventSchema = new Schema<EventDocument, Model<EventDocument, {}, {}, IdVir
return ret;
},
},
}
},
);
EventSchema.index({ userId: 1, startTime: 1, endTime: 1 });
export const EventModel = mongoose.model<EventDocument>('Event', EventSchema);
export const EventModel = mongoose.model<EventDocument>("Event", EventSchema);