Skip to content

Commit

Permalink
Создаст mocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
RnizereB committed Sep 22, 2024
1 parent 2ad6082 commit 9ce8c96
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mocks/mock-data.tsv
Original file line number Diff line number Diff line change
@@ -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 [email protected] 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 [email protected] user-royce.jpg poi331 Pro
2 changes: 2 additions & 0 deletions src/shared/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Offer } from './offer-type.js';
export { TypeUser, User} from './user-type.js';
26 changes: 26 additions & 0 deletions src/shared/types/offer-type.ts
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 12 additions & 0 deletions src/shared/types/user-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export enum TypeUser {
Pro = 'Pro',
Usual = 'Usual'
}

export type User = {
name: string;
email: string;
avatarUser?: string;
password: string;
typeUser: TypeUser;
}

0 comments on commit 9ce8c96

Please sign in to comment.