diff --git a/mocks/mock-data.tsv b/mocks/mock-data.tsv new file mode 100644 index 0000000..3f14e71 --- /dev/null +++ b/mocks/mock-data.tsv @@ -0,0 +1,2 @@ +Beautiful & luxurious studio at great location. A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. 2024-09-10T10:30:30.000Z Paris paris-preview.jpg paris-photo1.jpg,paris-photo2.jpg true true 4 apartment 2 3 2655 Breakfast;Washer;Fridge Jonh jonh_cool911@gmail.com user-jonh.jpg 123qwe Pro +Waterfront with extraordinary view. I am happy to welcome you to my apartment in the city center! Three words: location, cosy and chic! 2024-09-11T11:30:45.000Z Cologne cologne-preview.jpg cologne-photo1.jpg,cologne-photo2.jpg false false 3 house 3 4 3540 Baby seat;Washer;Towels;Fridge Royce royce_email@gmail.com user-royce.jpg poi331 Pro diff --git a/src/shared/types/index.ts b/src/shared/types/index.ts new file mode 100644 index 0000000..04cde9f --- /dev/null +++ b/src/shared/types/index.ts @@ -0,0 +1,2 @@ +export { Offer } from './offer-type.js'; +export { TypeUser, User} from './user-type.js'; diff --git a/src/shared/types/offer-type.ts b/src/shared/types/offer-type.ts new file mode 100644 index 0000000..932e7e0 --- /dev/null +++ b/src/shared/types/offer-type.ts @@ -0,0 +1,26 @@ +import { User } from './user-type.js'; + +export type Images = { + img: string; +} +export type Goods = { + good: string; +} + +export type Offer = { + title: string; + description: string; + postDate: Date; + city: string; + previewImage: string; + images: Images[]; + isFavorite: boolean; + isPremium: boolean; + rating: number; + type: string; + bedrooms: number; + maxAdults: number; + price: number; + goods: Goods[]; + host: User; +} diff --git a/src/shared/types/user-type.ts b/src/shared/types/user-type.ts new file mode 100644 index 0000000..22aeee4 --- /dev/null +++ b/src/shared/types/user-type.ts @@ -0,0 +1,12 @@ +export enum TypeUser { + Pro = 'Pro', + Usual = 'Usual' +} + +export type User = { + name: string; + email: string; + avatarUser?: string; + password: string; + typeUser: TypeUser; +}