29 lines
661 B
TypeScript
29 lines
661 B
TypeScript
import type { Models } from 'appwrite';
|
|
|
|
export type StatusTypes = 'tentative' | 'confirmed' | 'pending' | undefined;
|
|
export type Reservation = Interval & {
|
|
user: string;
|
|
status?: StatusTypes;
|
|
reason: string;
|
|
comment: string;
|
|
members?: string[];
|
|
guests?: string[];
|
|
};
|
|
|
|
// 24 hrs in advance only 2 weekday, and 1 weekend slot
|
|
// Within 24 hrs, any available slot
|
|
|
|
export type TimeTuple = [start: string, end: string];
|
|
|
|
export type Interval = Partial<Models.Document> & {
|
|
resource: string;
|
|
start: string;
|
|
end: string;
|
|
user?: string;
|
|
};
|
|
|
|
export type IntervalTemplate = Partial<Models.Document> & {
|
|
name: string;
|
|
timeTuples: TimeTuple[];
|
|
};
|