Manuel Bustillo d25622d764
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 19s
Check usage of free licenses / build-static-assets (pull_request) Successful in 24s
Merge remote-tracking branch 'origin/main' into edit-guest-status
2024-12-01 20:46:48 +01:00

67 lines
1.4 KiB
TypeScript

/* Copyright (C) 2024 Manuel Bustillo*/
// This file contains type definitions for your data.
// It describes the shape of the data, and what data type each property should accept.
// For simplicity of teaching, we're manually defining these types.
// However, these types are generated automatically if you're using an ORM such as Prisma.
export const guestStatuses = ['considered', 'invited', 'confirmed', 'declined', 'tentative'] as const;
export type GuestStatus = typeof guestStatuses[number];
export type Guest = {
id?: string;
name?: string;
group_name?: string;
groupId?: string;
color?: string;
status?: GuestStatus
}
export type Expense = {
id: string;
name: string;
amount: number;
pricingType: 'fixed' | 'per person';
};
export type TableArrangement = {
id: string;
number: number;
name: string;
guests?: Guest[];
discomfort?: number
}
export type Group = {
id: string;
name: string;
guest_count: number;
icon: string;
children: Group[];
color?: string;
attendance?: AttendanceSummary
};
export type AttendanceSummary = {
considered: number;
invited: number;
confirmed: number;
declined: number;
tentative: number;
total: number;
}
export type guestsTable = {
id: string;
customer_id: string;
name: string;
email: string;
image_url: string;
date: string;
amount: number;
status: 'pending' | 'paid';
};
export type User = {
id: string;
email: string;
}