Compare commits
8 Commits
2a33f45257
...
1f984f4392
Author | SHA1 | Date | |
---|---|---|---|
1f984f4392 | |||
3fe395cccf | |||
fb493db236 | |||
9cc6ce1275 | |||
032ecc764a | |||
88113f1035 | |||
0697e330b4 | |||
88d57f3b4c |
8
src/interfaces/database/IDbBrand.ts
Normal file
8
src/interfaces/database/IDbBrand.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export interface IDbBrand {
|
||||||
|
id?: string;
|
||||||
|
slug_name: string;
|
||||||
|
display_name: string;
|
||||||
|
image_blob: BinaryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IDbBrand;
|
7
src/interfaces/database/IDbCategory.ts
Normal file
7
src/interfaces/database/IDbCategory.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export interface IDbCategory {
|
||||||
|
id?: string;
|
||||||
|
slug_name: string;
|
||||||
|
display_name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IDbCategory;
|
12
src/interfaces/database/IDbModel.ts
Normal file
12
src/interfaces/database/IDbModel.ts
Normal 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;
|
11
src/interfaces/database/IDbRent.ts
Normal file
11
src/interfaces/database/IDbRent.ts
Normal 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;
|
12
src/interfaces/database/IDbUser.ts
Normal file
12
src/interfaces/database/IDbUser.ts
Normal 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
|
||||||
|
}
|
0
src/interfaces/database/IDbVehicle.ts
Normal file
0
src/interfaces/database/IDbVehicle.ts
Normal file
@ -13,4 +13,11 @@ export async function comparePassword(password: string, hash: string) {
|
|||||||
secret: Buffer.from(`${process.env["HASH_SECRET"]}`),
|
secret: Buffer.from(`${process.env["HASH_SECRET"]}`),
|
||||||
algorithm: 2
|
algorithm: 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CredentialService = {
|
||||||
|
compare: comparePassword,
|
||||||
|
hash: getHashFromPassword,
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CredentialService;
|
Loading…
x
Reference in New Issue
Block a user