2024-10-27 21:27:41 +00:00
|
|
|
/* Copyright (C) 2024 Manuel Bustillo*/
|
|
|
|
|
2024-08-11 12:03:11 +02:00
|
|
|
// 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.
|
|
|
|
|
2024-11-17 19:49:39 +01:00
|
|
|
export const guestStatuses = ['considered', 'invited', 'confirmed', 'declined', 'tentative'] as const;
|
|
|
|
export type GuestStatus = typeof guestStatuses[number];
|
2024-08-11 13:12:03 +02:00
|
|
|
export type Guest = {
|
2024-11-17 19:18:20 +01:00
|
|
|
id?: string;
|
|
|
|
name?: string;
|
2024-11-02 11:24:48 +01:00
|
|
|
group_name?: string;
|
2024-11-17 19:18:20 +01:00
|
|
|
groupId?: string;
|
2024-11-03 14:42:06 +01:00
|
|
|
color?: string;
|
2024-11-17 16:59:16 +01:00
|
|
|
status?: GuestStatus
|
2024-11-02 11:24:48 +01:00
|
|
|
}
|
|
|
|
|
2024-11-10 21:08:03 +01:00
|
|
|
export type Expense = {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
amount: number;
|
|
|
|
pricingType: 'fixed' | 'per person';
|
|
|
|
};
|
|
|
|
|
2024-11-02 11:24:48 +01:00
|
|
|
export type TableArrangement = {
|
2024-11-02 12:52:12 +01:00
|
|
|
id: string;
|
2024-11-02 11:24:48 +01:00
|
|
|
number: number;
|
2024-11-03 08:41:51 +01:00
|
|
|
name: string;
|
2024-11-02 12:52:12 +01:00
|
|
|
guests?: Guest[];
|
2024-11-02 11:24:48 +01:00
|
|
|
discomfort?: number
|
|
|
|
}
|
|
|
|
|
2024-08-11 18:52:24 +02:00
|
|
|
export type Group = {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
guest_count: number;
|
|
|
|
icon: string;
|
|
|
|
children: Group[];
|
2024-11-13 08:58:55 +01:00
|
|
|
color?: string;
|
2024-11-13 08:16:10 +01:00
|
|
|
attendance?: AttendanceSummary
|
2024-08-11 18:52:24 +02:00
|
|
|
};
|
|
|
|
|
2024-11-13 08:16:10 +01:00
|
|
|
export type AttendanceSummary = {
|
|
|
|
considered: number;
|
|
|
|
invited: number;
|
|
|
|
confirmed: number;
|
|
|
|
declined: number;
|
|
|
|
tentative: number;
|
|
|
|
total: number;
|
|
|
|
}
|
|
|
|
|
2024-08-11 12:34:16 +02:00
|
|
|
export type guestsTable = {
|
2024-08-11 12:03:11 +02:00
|
|
|
id: string;
|
|
|
|
customer_id: string;
|
|
|
|
name: string;
|
|
|
|
email: string;
|
|
|
|
image_url: string;
|
|
|
|
date: string;
|
|
|
|
amount: number;
|
|
|
|
status: 'pending' | 'paid';
|
|
|
|
};
|
|
|
|
|
2024-12-01 17:29:57 +01:00
|
|
|
export type User = {
|
2024-08-11 12:03:11 +02:00
|
|
|
id: string;
|
|
|
|
email: string;
|
2024-12-07 13:06:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Captcha = {
|
|
|
|
id: string;
|
|
|
|
answer: string;
|
2024-12-07 13:32:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export type StructuredErrors = {
|
|
|
|
[key: string]: string[]|string;
|
|
|
|
};
|