changed defaults for app.d.ts interfaces

This commit is contained in:
Alex
2024-09-29 21:23:05 +02:00
parent db84918cb1
commit 8e9eb22cb0

90
frontend/src/app.d.ts vendored
View File

@@ -1,53 +1,70 @@
// See https://kit.svelte.dev/docs/types#app // See https://kit.svelte.dev/docs/types#app
interface Subscription { interface Subscription {
id: string; id: number | -1;
name: string; name: string | "";
details: string; details?: string | "";
conditions: string | null; conditions?: string | "";
monthly_fee: number; monthly_fee?: number | -1;
hourly_rate: number; hourly_rate?: number | -1;
included_hours_per_year: number | null; included_hours_per_year?: number | 0;
included_hours_per_month: number | null; included_hours_per_month?: number | 0;
} }
interface Membership { interface Membership {
id: string; id: number | -1;
status: string; status: number | -1;
start_date: string; start_date: string | "";
end_date: string; end_date: string | "";
parent_member_id: number | null; parent_member_id: number | -1;
subscription_model: Subscription | null; subscription_model: Subscription;
} }
interface BankAccount { interface BankAccount {
id: string; id: number | -1;
mandate_date_signed: string; mandate_date_signed: string | "";
bank: string; bank: string | "";
account_holder_name: string; account_holder_name: string | "";
iban: string; iban: string | "";
bic: string; bic: string | "";
mandate_reference: string; mandate_reference: string | "";
}
interface DriversLicence {
id: number | -1;
status: number | -1;
licence_number: string | "";
issued_date: string | "";
expiration_date: string | "";
issuing_country: string | "";
licence_categories: LicenceCategory[];
}
interface LicenceCategory {
id: number | -1;
category: string | "";
} }
interface User { interface User {
email: string; email: string | "";
first_name: string; first_name: string | "";
last_name: string; last_name: string | "";
phone: string | null; phone: string | "";
notes: string; notes: string | "";
address: string; address: string | "";
zip_code: string; zip_code: string | "";
city: string; city: string | "";
status: number; status: number | -1;
id: string; id: number | -1;
role_id: number; role_id: number | -1;
date_of_birth: string; date_of_birth: string | "";
company: string | "";
profile_picture: string | "";
payment_status: number | -1;
membership: Membership; membership: Membership;
bank_account: BankAccount; bank_account: BankAccount;
company: string | null; drivers_licence: DriversLicence;
profile_picture: string | null; notes: string | "";
payment_status: number;
} }
declare global { declare global {
@@ -55,6 +72,7 @@ declare global {
// interface Error {} // interface Error {}
interface Locals { interface Locals {
user: User; user: User;
subscriptions: Subscription[];
} }
// interface PageData {} // interface PageData {}
// interface Platform {} // interface Platform {}