138 lines
2.6 KiB
TypeScript
138 lines
2.6 KiB
TypeScript
// See https://kit.svelte.dev/docs/types#app
|
|
|
|
interface Subscription {
|
|
id: number | -1;
|
|
name: string | '';
|
|
details: string | '';
|
|
conditions: string | '';
|
|
monthly_fee: number | 0;
|
|
hourly_rate: number | 0;
|
|
included_hours_per_year: number | 0;
|
|
included_hours_per_month: number | 0;
|
|
}
|
|
|
|
interface Membership {
|
|
id: number | -1;
|
|
status: number | -1;
|
|
start_date: string | '';
|
|
end_date: string | '';
|
|
parent_member_id: number | -1;
|
|
subscription_model: Subscription;
|
|
}
|
|
|
|
interface BankAccount {
|
|
id: number | -1;
|
|
mandate_date_signed: string | '';
|
|
bank: string | '';
|
|
account_holder_name: string | '';
|
|
iban: string | '';
|
|
bic: string | '';
|
|
mandate_reference: string | '';
|
|
}
|
|
|
|
interface Licence {
|
|
id: number | -1;
|
|
status: number | -1;
|
|
number: string | '';
|
|
issued_date: string | '';
|
|
expiration_date: string | '';
|
|
country: string | '';
|
|
categories: LicenceCategory[];
|
|
}
|
|
|
|
interface LicenceCategory {
|
|
id: number | -1;
|
|
category: string | '';
|
|
}
|
|
|
|
interface User {
|
|
email: string | '';
|
|
first_name: string | '';
|
|
last_name: string | '';
|
|
password: string | '';
|
|
phone: string | '';
|
|
notes: string | '';
|
|
address: string | '';
|
|
zip_code: string | '';
|
|
city: string | '';
|
|
status: number | -1;
|
|
id: number | -1;
|
|
role_id: number | -1;
|
|
dateofbirth: string | '';
|
|
company: string | '';
|
|
profile_picture: string | '';
|
|
payment_status: number | -1;
|
|
membership: Membership;
|
|
bank_account: BankAccount;
|
|
licence: Licence;
|
|
notes: string | '';
|
|
}
|
|
|
|
interface Car {
|
|
id: number | -1;
|
|
name: string | '';
|
|
status: number | 0;
|
|
brand: string | '';
|
|
model: string | '';
|
|
price: number | 0;
|
|
rate: number | 0;
|
|
start_date: string | '';
|
|
end_date: string | '';
|
|
color: string | '';
|
|
licence_plate: string | '';
|
|
location: Location;
|
|
damages: Damage[] | [];
|
|
insurances: Insurance[] | [];
|
|
notes: string | '';
|
|
}
|
|
|
|
interface Location {
|
|
latitude: number | 0;
|
|
longitude: number | 0;
|
|
}
|
|
|
|
interface Damage {
|
|
id: number | -1;
|
|
opponent: User;
|
|
insurance: Insurance | null;
|
|
notes: string | '';
|
|
}
|
|
|
|
interface Insurance {
|
|
id: number | -1;
|
|
company: string | '';
|
|
reference: string | '';
|
|
start_date: string | '';
|
|
end_date: string | '';
|
|
notes: string | '';
|
|
}
|
|
|
|
declare global {
|
|
namespace App {
|
|
// interface Error {}
|
|
interface Locals {
|
|
user: User;
|
|
users: User[];
|
|
cars: Cars[];
|
|
subscriptions: Subscription[];
|
|
licence_categories: LicenceCategory[];
|
|
}
|
|
interface Types {
|
|
licenceCategory: LicenceCategory;
|
|
subscription: Subscription;
|
|
membership: Membership;
|
|
licence: Licence;
|
|
licenceCategory: LicenceCategory;
|
|
bankAccount: BankAccount;
|
|
car: Car;
|
|
insurance: Insurance;
|
|
location: Location;
|
|
damage: Damage;
|
|
}
|
|
// interface PageData {}
|
|
// interface Platform {}
|
|
}
|
|
}
|
|
|
|
export {};
|