Compare commits

...

8 Commits

Author SHA1 Message Date
1f984f4392
fix(services): 🐛 CredentialService missing namespace 2024-04-23 16:39:03 +02:00
3fe395cccf
feat(interfaces): Db - Vehicle 2024-04-23 16:38:13 +02:00
fb493db236
feat(interfaces): Db - User 2024-04-23 16:37:38 +02:00
9cc6ce1275
feat(interfaces): Db - Rent 2024-04-23 16:37:12 +02:00
032ecc764a
feat(interfaces): Db - Model 2024-04-23 16:36:10 +02:00
88113f1035
refactor(interfaces): ♻️ Db - Category 2024-04-23 16:35:40 +02:00
0697e330b4
feat(interfaces): Db - Brand 2024-04-23 16:34:58 +02:00
88d57f3b4c
feat(interfaces): Db - Category 2024-04-23 16:18:26 +02:00
7 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,8 @@
export interface IDbBrand {
id?: string;
slug_name: string;
display_name: string;
image_blob: BinaryType;
}
export default IDbBrand;

View File

@ -0,0 +1,7 @@
export interface IDbCategory {
id?: string;
slug_name: string;
display_name: string
}
export default IDbCategory;

View File

@ -0,0 +1,12 @@
export interface IDbModel {
id?: string;
slug_name: string;
display_name: string;
brand_id: string;
category_id: string;
image_bfile: BinaryType;
is_trending: boolean;
base_price: number;
}
export default IDbModel;

View File

@ -0,0 +1,11 @@
export interface IDbRent {
vehicle_id: string;
user_id: string;
active: boolean;
iat: Date;
eat: Date;
need_survey: boolean;
km_at_start: number
}
export default IDbRent;

View File

@ -0,0 +1,12 @@
export interface IDbUser {
id?: string;
username: string;
firstname: string;
lastname: string;
dob: Date;
email: string;
is_mail_verified: boolean;
is_admin: boolean;
gdpr: Date;
hash: string
}

View File

View File

@ -13,4 +13,11 @@ export async function comparePassword(password: string, hash: string) {
secret: Buffer.from(`${process.env["HASH_SECRET"]}`),
algorithm: 2
});
}
}
const CredentialService = {
compare: comparePassword,
hash: getHashFromPassword,
}
export default CredentialService;