From 64cac6ead8c5ffbcf29c46959531255499e471e3 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Mon, 25 Oct 2021 11:59:04 +0300 Subject: [PATCH 01/47] create file sturcture --- .eslintrc.json | 16 ++++++ .gitignore | 4 ++ client/.eslintrc.json | 26 +++++++++ client/.gitignore | 23 ++++++++ client/README.md | 70 +++++++++++++++++++++++++ client/package.json | 55 +++++++++++++++++++ client/public/favicon.ico | Bin 0 -> 3870 bytes client/public/index.html | 43 +++++++++++++++ client/public/logo192.png | Bin 0 -> 5347 bytes client/public/logo512.png | Bin 0 -> 9664 bytes client/public/manifest.json | 25 +++++++++ client/public/robots.txt | 3 ++ client/src/App.js | 8 +++ client/src/components/index.js | 0 client/src/index.css | 5 ++ client/src/index.js | 12 +++++ client/src/pages/index.js | 0 package.json | 42 +++++++++++++++ server/app.js | 0 server/controllers/admins/index.js | 0 server/controllers/estates/index.js | 0 server/controllers/index.js | 0 server/controllers/middleware/index.js | 1 + server/controllers/users/index.js | 0 server/database/config/bulid.sql | 0 server/database/config/fakeData.sql | 0 server/database/connection.js | 0 server/database/quieres/index.js | 0 server/index.js | 0 server/routes/index.js | 0 server/utils/index.js | 0 31 files changed, 333 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 client/.eslintrc.json create mode 100644 client/.gitignore create mode 100644 client/README.md create mode 100644 client/package.json create mode 100644 client/public/favicon.ico create mode 100644 client/public/index.html create mode 100644 client/public/logo192.png create mode 100644 client/public/logo512.png create mode 100644 client/public/manifest.json create mode 100644 client/public/robots.txt create mode 100644 client/src/App.js create mode 100644 client/src/components/index.js create mode 100644 client/src/index.css create mode 100644 client/src/index.js create mode 100644 client/src/pages/index.js create mode 100644 package.json create mode 100644 server/app.js create mode 100644 server/controllers/admins/index.js create mode 100644 server/controllers/estates/index.js create mode 100644 server/controllers/index.js create mode 100644 server/controllers/middleware/index.js create mode 100644 server/controllers/users/index.js create mode 100644 server/database/config/bulid.sql create mode 100644 server/database/config/fakeData.sql create mode 100644 server/database/connection.js create mode 100644 server/database/quieres/index.js create mode 100644 server/index.js create mode 100644 server/routes/index.js create mode 100644 server/utils/index.js diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..df3955a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es2021": true, + "node": true + }, + "extends": [ + "airbnb-base" + ], + "parserOptions": { + "ecmaVersion": 13 + }, + "rules": { + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2127072 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +.env +.vscode +package-lock.json \ No newline at end of file diff --git a/client/.eslintrc.json b/client/.eslintrc.json new file mode 100644 index 0000000..19d7e67 --- /dev/null +++ b/client/.eslintrc.json @@ -0,0 +1,26 @@ +{ + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "root": true, + "extends": [ + "plugin:react/recommended", + "airbnb", + "plugin:react/jsx-runtime" + ], + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules": { + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] + } +} diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..4d29575 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..0c83cde --- /dev/null +++ b/client/README.md @@ -0,0 +1,70 @@ +# Getting Started with Create React App + +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.\ +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.\ +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). + +### Code Splitting + +This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) + +### Analyzing the Bundle Size + +This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) + +### Making a Progressive Web App + +This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) + +### Advanced Configuration + +This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) + +### Deployment + +This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) + +### `npm run build` fails to minify + +This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/client/package.json b/client/package.json new file mode 100644 index 0000000..aa8d067 --- /dev/null +++ b/client/package.json @@ -0,0 +1,55 @@ +{ + "name": "client", + "version": "0.1.0", + "private": true, + "dependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material": "^5.0.4", + "@testing-library/jest-dom": "^5.14.1", + "@testing-library/react": "^11.2.7", + "@testing-library/user-event": "^12.8.3", + "axios": "^0.23.0", + "eslint-config-react-app": "^6.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-router-dom": "^5.3.0", + "react-scripts": "4.0.3", + "web-vitals": "^1.1.2" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "devDependencies": { + "eslint": "^7.32.0", + "eslint-config-airbnb": "^18.2.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-react": "^7.26.1", + "eslint-plugin-react-hooks": "^4.2.0", + "prettier": "^2.4.1" + } +} diff --git a/client/public/favicon.ico b/client/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 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 baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/client/public/index.html b/client/public/index.html new file mode 100644 index 0000000..aa069f2 --- /dev/null +++ b/client/public/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + React App + + + +
+ + + diff --git a/client/public/logo192.png b/client/public/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..fc44b0a3796c0e0a64c3d858ca038bd4570465d9 GIT binary patch literal 5347 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 b{|{}U^kRn2wo}j7|0ATu<;8xA7zX}7|B6mN literal 0 HcmV?d00001 diff --git a/client/public/manifest.json b/client/public/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/client/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/client/public/robots.txt b/client/public/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/client/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/client/src/App.js b/client/src/App.js new file mode 100644 index 0000000..2a4bc88 --- /dev/null +++ b/client/src/App.js @@ -0,0 +1,8 @@ +function App() { + return ( +
+ + ); +} + +export default App; diff --git a/client/src/components/index.js b/client/src/components/index.js new file mode 100644 index 0000000..e69de29 diff --git a/client/src/index.css b/client/src/index.css new file mode 100644 index 0000000..803987e --- /dev/null +++ b/client/src/index.css @@ -0,0 +1,5 @@ +*{ + padding: 0; + margin: 0; + box-sizing: border-box; +} diff --git a/client/src/index.js b/client/src/index.js new file mode 100644 index 0000000..62adcf3 --- /dev/null +++ b/client/src/index.js @@ -0,0 +1,12 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; + +ReactDOM.render( + + + , + document.getElementById('root') +); + diff --git a/client/src/pages/index.js b/client/src/pages/index.js new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..cf9cacc --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "Housy", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "node server", + "dev": "nodemon server", + "test": "jest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/GSG-G10/Housy.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/GSG-G10/Housy/issues" + }, + "homepage": "https://github.com/GSG-G10/Housy#readme", + "dependencies": { + "bcrypt": "^5.0.1", + "compression": "^1.7.4", + "cookie-parser": "^1.4.5", + "cross": "^1.0.0", + "env": "0.0.2", + "env2": "^2.2.2", + "express": "^4.17.1", + "joi": "^17.4.2", + "jsonwebtoken": "^8.5.1", + "pg": "^8.7.1" + }, + "devDependencies": { + "eslint": "^7.32.0", + "eslint-config-airbnb-base": "^14.2.1", + "eslint-plugin-import": "^2.25.2", + "nodemon": "^2.0.14", + "pre-commit": "^1.2.2", + "supertest": "^6.1.6" + } +} diff --git a/server/app.js b/server/app.js new file mode 100644 index 0000000..e69de29 diff --git a/server/controllers/admins/index.js b/server/controllers/admins/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/controllers/estates/index.js b/server/controllers/estates/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/controllers/index.js b/server/controllers/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/controllers/middleware/index.js b/server/controllers/middleware/index.js new file mode 100644 index 0000000..faf041d --- /dev/null +++ b/server/controllers/middleware/index.js @@ -0,0 +1 @@ +console.log('ss') \ No newline at end of file diff --git a/server/controllers/users/index.js b/server/controllers/users/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/database/config/bulid.sql b/server/database/config/bulid.sql new file mode 100644 index 0000000..e69de29 diff --git a/server/database/config/fakeData.sql b/server/database/config/fakeData.sql new file mode 100644 index 0000000..e69de29 diff --git a/server/database/connection.js b/server/database/connection.js new file mode 100644 index 0000000..e69de29 diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/index.js b/server/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/routes/index.js b/server/routes/index.js new file mode 100644 index 0000000..e69de29 diff --git a/server/utils/index.js b/server/utils/index.js new file mode 100644 index 0000000..e69de29 From f39aa410f00531ee98fc5a4d5cf90a92d29819ed Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Mon, 25 Oct 2021 12:59:13 +0300 Subject: [PATCH 02/47] remove env2 module & unnecessary comments & change title & remove README.md in client & package-lock.json to gitignore --- client/.gitignore | 2 +- client/README.md | 70 -------------------------- client/public/index.html | 24 +-------- package.json | 1 - server/controllers/middleware/index.js | 1 - 5 files changed, 2 insertions(+), 96 deletions(-) delete mode 100644 client/README.md diff --git a/client/.gitignore b/client/.gitignore index 4d29575..9779ad4 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -4,7 +4,7 @@ /node_modules /.pnp .pnp.js - +package-lock.json # testing /coverage diff --git a/client/README.md b/client/README.md deleted file mode 100644 index 0c83cde..0000000 --- a/client/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/client/public/index.html b/client/public/index.html index aa069f2..be0faa9 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -10,34 +10,12 @@ content="Web site created using create-react-app" /> - - - React App + Housy
- diff --git a/package.json b/package.json index cf9cacc..4afaa96 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "compression": "^1.7.4", "cookie-parser": "^1.4.5", "cross": "^1.0.0", - "env": "0.0.2", "env2": "^2.2.2", "express": "^4.17.1", "joi": "^17.4.2", diff --git a/server/controllers/middleware/index.js b/server/controllers/middleware/index.js index faf041d..e69de29 100644 --- a/server/controllers/middleware/index.js +++ b/server/controllers/middleware/index.js @@ -1 +0,0 @@ -console.log('ss') \ No newline at end of file From 6dbff3a311173ec07cc1c8a387ae0f454e180743 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Mon, 25 Oct 2021 13:35:59 +0300 Subject: [PATCH 03/47] create server express and remove .vscode from env #5 --- .eslintrc.json | 2 +- .gitignore | 1 - server/app.js | 17 +++++++++++++++++ server/index.js | 9 +++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index df3955a..41fee36 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "airbnb-base" ], "parserOptions": { - "ecmaVersion": 13 + "ecmaVersion": 12 }, "rules": { } diff --git a/.gitignore b/.gitignore index 2127072..6fe20f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules .env -.vscode package-lock.json \ No newline at end of file diff --git a/server/app.js b/server/app.js index e69de29..7d0c531 100644 --- a/server/app.js +++ b/server/app.js @@ -0,0 +1,17 @@ +const express = require('express'); +const compression = require('compression'); +const cookieParser = require('cookie-parser'); + +const { env: { PORT } } = process; + +const app = express(); + +app.set('port', PORT || 5000); + +app.use(express.urlencoded({ extended: false })); +app.use(express.json()); +app.use(compression()); +app.use(cookieParser()); +app.disable('x-powered-by'); + +module.exports = app; diff --git a/server/index.js b/server/index.js index e69de29..6bbc826 100644 --- a/server/index.js +++ b/server/index.js @@ -0,0 +1,9 @@ +require('env2')('.env'); +const app = require('./app'); + +const PORT = app.get('port'); + +app.listen(PORT, () => { + // eslint-disable-next-line no-console + console.log(`server is running at http://localhost:${PORT}`); +}); From 053aedd1fccde3e8bf63d7a60ff38f9bbae81988 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 14:07:05 +0300 Subject: [PATCH 04/47] create tables housy database #4 --- server/database/config/bulid.sql | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/server/database/config/bulid.sql b/server/database/config/bulid.sql index e69de29..2c9c989 100644 --- a/server/database/config/bulid.sql +++ b/server/database/config/bulid.sql @@ -0,0 +1,43 @@ +BEGIN; +DROP TABLE IF EXISTS admins,estates,agents,images; +CREATE TABLE admins( + id SERIAL PRIMARY KEY, + username VARCHAR(255) NOT NULL, + password VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL UNIQUE +); +CREATE TABLE agents( + id SERIAL PRIMARY KEY, + name VARCHAR(255) NOT NULL, + email VARCHAR(255) UNIQUE, + phone VARCHAR(255) NOT NULL UNIQUE, + image TEXT, + location VARCHAR(255) NOT NULL, + password VARCHAR(255) NOT NULL +); +CREATE TABLE estates( + id SERIAL PRIMARY KEY, + agent_id INTEGER REFERENCES agents(id) ON DELETE CASCADE, + title VARCHAR(255) NOT NULL, + price DECIMAL NOT NULL, + description TEXT NOT NULL, + type VARCHAR(255) NOT NULL, + category VARCHAR(255) NOT NULL, + street VARCHAR(255) NOT NULL, + city VARCHAR(255) NOT NULL, + region VARCHAR(255) NOT NULL, + bathrooms INTEGER DEFAULT 0, + bedrooms INTEGER DEFAULT 0, + rooms INTEGER DEFAULT 0, + space DECIMAL NOT NULL , + approved BOOLEAN DEFAULT FALSE, + rate INTEGER DEFAULT 0, + available BOOLEAN DEFAULT TRUE +); + +CREATE TABLE images( + id SERIAL PRIMARY KEY, + estate_id INTEGER REFERENCES estates(id) ON DELETE CASCADE, + image TEXT +); +COMMIT; From 4f047113a62065deeb914b7628da01de55205040 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 14:23:33 +0300 Subject: [PATCH 05/47] connection database & change scripts in pakage json #4 --- package.json | 6 +++--- server/database/connection.js | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4afaa96..b7d5949 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "", "main": "index.js", "scripts": { - "start": "node server", - "dev": "nodemon server", - "test": "jest" + "start": "cross-env NODE_ENV=production node server", + "dev": "cross-env NODE_ENV=development nodemon server", + "test": "cross-env NODE_ENV=test jest" }, "repository": { "type": "git", diff --git a/server/database/connection.js b/server/database/connection.js index e69de29..b26aafd 100644 --- a/server/database/connection.js +++ b/server/database/connection.js @@ -0,0 +1,25 @@ +require('env2')('.env'); +const {Pool} = require('pg'); + +const { + NODE_ENV, DATABASE_URL_DEV, DATABASE_URL, DATABASE_URL_TEST, +} = process.env; +let dbUrl = ''; +switch (NODE_ENV) { + case 'development': + dbUrl = DATABASE_URL_DEV; + break; + case 'production': + dbUrl = DATABASE_URL; + break; + case 'test': + dbUrl = DATABASE_URL_TEST; + break; + default: + throw new Error('There\'s no environment'); +} +const options = { + connectionString: dbUrl, + ssl: { rejectUnauthorized: false }, +}; +module.exports = new Pool(options); \ No newline at end of file From 9aabdc54e6cdd1b2444c505c40a9955451079c57 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 14:26:21 +0300 Subject: [PATCH 06/47] build file for test proccess #8 --- server/database/config/build.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 server/database/config/build.js diff --git a/server/database/config/build.js b/server/database/config/build.js new file mode 100644 index 0000000..e69de29 From 6f740174504d460cc1f9ec216ebeb22dd0f87ab5 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 14:31:47 +0300 Subject: [PATCH 07/47] prepare build file #4 --- server/database/config/build.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/database/config/build.js b/server/database/config/build.js index e69de29..a02b604 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -0,0 +1,13 @@ +const { readFileSync } = require('fs'); +const { join } = require('path'); + +const connection = require('../connection'); +const {NODE_ENV} = process.env; +const dbBuild = () => { + let sql = readFileSync(join(__dirname, 'build.sql')).toString(); + if (NODE_ENV === 'test') { + sql+= readFileSync(join(__dirname, 'fakeData.sql')).toString(); + } + return connection.query(sql); +}; +module.exports = dbBuild; \ No newline at end of file From ffb62ec65703e97cde47085f1c0539d21af2dad7 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Mon, 25 Oct 2021 15:13:06 +0300 Subject: [PATCH 08/47] create readme --- README.md | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12c096c..7ade5c8 100644 --- a/README.md +++ b/README.md @@ -1 +1,90 @@ -# Housy \ No newline at end of file +# Real Estate +Real Estate is an App that facilitates to access and rent or buy available homes. + +## Team Members :busts_in_silhouette::- +1. Mohammed haroon +2. MOhammed salah +3. ameera +4. Elham Fadel + + + +# Main problem 🌚: +The problem is that in popular areas a person should go to the site and see the house or the real estate that he want to buy and he should employ a broker to find him a house and this process costs a lot of time and effort. + +# Solution 💡: +A site that is a real estate broker to facilitate communication and negotiation between the seller and the buyer, saving them time and effort on the buyer by providing images, real price and more details, place, so he will know which place will select. + +# User stories 📖: + +* ##### AS a USER I can : + 1. see a group of houses or real estate with more details (Home page). + 2. Sign up for the app. + 3. login in to the app. + 4. see specific information about any house. + 5. add houses to my favorite list. + 6. AS a USER want to search by different locations, prices, and the number of rooms in the house + +* #### AS a Host I can : + 1. able to hosting the house or room. + 2. need control panel to manage my houses. + +* #### AS a admin I can : + 1. approve estate + 2. delete any estate + 3. delete user + 4. add anouter admin + + + +# User Journey ✈️: + +* As a user, I can see all available houses that can rent, search to find houses, appointment booking and I can add any liked house to my favorite list from my favorite list, inside my profile I have my information and control panel for my own houses available to rent. + + +* As a host ,I can see all my houses and add new house to renting ,i can edit my profile and my houses information . + + + + +# Prototype +![](https://i.imgur.com/8FiBXmn.png) + + +# DB schema + +![](https://i.imgur.com/sF5ZjzT.png) + +## Technologies 💻:- +**BackEnd**: Node JS & Express JS. +**FrontEnd**: React JS,Material Ui. +**Database**: PostgreSQL. + +## How to Launch App Locally : + * clone repo: + ```git clone https://github.com/GSG-G10/Housy.git && cd Housy``` +* Run `npm i` to install the packages for the app as general. +* Run `cd client` and `npm i` to install the packages for the client. + + +### Database Setup 📋 +* Make sure you have installed PostgreSQL and psql +``` +CREATE DATABASE {database name}; +CREATE USER {user name} WITH superuser password {password} +ALTER DATABASE {database name} OWNER TO {user name}; +``` +* Run the following command in the database pgcli terminal +`\i server/database/config/build.sql` . + + +### Start the App :- + + +To run Server, In your terminal Type: + +* `npm run dev` then you should be able to go to [localhost](http://localhost:5000/) + To run client-side, In your terminal Type: +* `cd client` => `npm start` then you will be able to run [localhost](http://localhost:3000/) +Now you can view the app live in the Browser! + From 6e95003ec1a6d221426c7bd5bcb382a2d93cdaa9 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Mon, 25 Oct 2021 15:46:52 +0300 Subject: [PATCH 09/47] change user stories --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7ade5c8..b0579fa 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,15 @@ A site that is a real estate broker to facilitate communication and negotiation * ##### AS a USER I can : 1. see a group of houses or real estate with more details (Home page). - 2. Sign up for the app. - 3. login in to the app. 4. see specific information about any house. 5. add houses to my favorite list. 6. AS a USER want to search by different locations, prices, and the number of rooms in the house -* #### AS a Host I can : - 1. able to hosting the house or room. - 2. need control panel to manage my houses. +* #### AS a agent I can : + 1. Sign up for the app. + 2. login in to the app. + 3. able to hosting the house or room. + 4. need control panel to manage my houses. * #### AS a admin I can : 1. approve estate From 1b5cda95e20f2a3704d0f40bae3ce24a3ff16c21 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 15:49:53 +0300 Subject: [PATCH 10/47] remove unnessary code --- server/database/config/build.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/database/config/build.js b/server/database/config/build.js index a02b604..152437f 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -2,12 +2,9 @@ const { readFileSync } = require('fs'); const { join } = require('path'); const connection = require('../connection'); -const {NODE_ENV} = process.env; const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - if (NODE_ENV === 'test') { sql+= readFileSync(join(__dirname, 'fakeData.sql')).toString(); - } return connection.query(sql); }; module.exports = dbBuild; \ No newline at end of file From 916d6df636ae7a30d245d18d7e70792a36404c60 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 18:39:47 +0300 Subject: [PATCH 11/47] authentication tokent & create it #9 --- .../middleware/auth/authenticateToken.js | 13 +++++++++++++ server/controllers/middleware/auth/createToken.js | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 server/controllers/middleware/auth/authenticateToken.js create mode 100644 server/controllers/middleware/auth/createToken.js diff --git a/server/controllers/middleware/auth/authenticateToken.js b/server/controllers/middleware/auth/authenticateToken.js new file mode 100644 index 0000000..75c6960 --- /dev/null +++ b/server/controllers/middleware/auth/authenticateToken.js @@ -0,0 +1,13 @@ +const { verify } = require('jsonwebtoken'); + +module.exports = (req, res, next) => { + if (req.cookies && req.cookies.token) { + verify(req.cookies.token, process.env.ACCESS_TOKEN_SECRET, (err, payload) => { + if (err) return res.status(403).json({ message: 'Invalid token' }); + req.user = payload; + next(); + }); + } else { + res.status(401).json({ message: 'No token provided' }); + } +}; \ No newline at end of file diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js new file mode 100644 index 0000000..4112e09 --- /dev/null +++ b/server/controllers/middleware/auth/createToken.js @@ -0,0 +1,7 @@ +const {sign} = require('jsonwebtoken'); +module.exports = (req, res, next) => { + //user => object (name, email, phone) + const payload = req.body.user; + const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); + res.cookie('token', accessToken); +} \ No newline at end of file From 836cda185f568aece4e0ed4d41f23c7b002e6102 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 18:52:26 +0300 Subject: [PATCH 12/47] get info user from req object #9 --- server/controllers/middleware/auth/createToken.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js index 4112e09..6d3830b 100644 --- a/server/controllers/middleware/auth/createToken.js +++ b/server/controllers/middleware/auth/createToken.js @@ -1,7 +1,7 @@ const {sign} = require('jsonwebtoken'); module.exports = (req, res, next) => { //user => object (name, email, phone) - const payload = req.body.user; + const payload = req.user; const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); res.cookie('token', accessToken); } \ No newline at end of file From dc4e28a5d249addf1b5d0a256df8497b73286f6d Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Mon, 25 Oct 2021 21:05:06 +0300 Subject: [PATCH 13/47] remove location from agent with rename entites --- server/database/config/bulid.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/database/config/bulid.sql b/server/database/config/bulid.sql index 2c9c989..3aaa5f2 100644 --- a/server/database/config/bulid.sql +++ b/server/database/config/bulid.sql @@ -9,11 +9,11 @@ CREATE TABLE admins( CREATE TABLE agents( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, - email VARCHAR(255) UNIQUE, + email VARCHAR(255) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL UNIQUE, - image TEXT, - location VARCHAR(255) NOT NULL, - password VARCHAR(255) NOT NULL + avater TEXT + ); CREATE TABLE estates( id SERIAL PRIMARY KEY, From c01fe18e451b8180044598eaa3c9837a1bd0f730 Mon Sep 17 00:00:00 2001 From: ameera abedalnaser Date: Mon, 25 Oct 2021 23:19:18 +0300 Subject: [PATCH 14/47] creat-fack-data related #6 --- server/database/config/adminsFack Data.sql | 150 +++++++++++++++++++ server/database/config/agentsFackData.sql | 150 +++++++++++++++++++ server/database/config/imagesFackData.sql | 150 +++++++++++++++++++ server/database/config/realStateFackData.sql | 150 +++++++++++++++++++ 4 files changed, 600 insertions(+) create mode 100644 server/database/config/adminsFack Data.sql create mode 100644 server/database/config/agentsFackData.sql create mode 100644 server/database/config/imagesFackData.sql create mode 100644 server/database/config/realStateFackData.sql diff --git a/server/database/config/adminsFack Data.sql b/server/database/config/adminsFack Data.sql new file mode 100644 index 0000000..3dfafae --- /dev/null +++ b/server/database/config/adminsFack Data.sql @@ -0,0 +1,150 @@ +insert into admins (username, password , email) values ('Bobbie Fendt', 'PpIaalr9H', 'bfendt0@blogspot.com'); +insert into admins (username, password , email) values ('Noni Djurdjevic', 'rm8TDCjVl0W', 'ndjurdjevic1@icq.com'); +insert into admins (username, password , email) values ('Kizzie Maliphant', 'J4D9p9', 'kmaliphant2@php.net'); +insert into admins (username, password , email) values ('Janenna Muncer', 'zalXyYdHf6rj', 'jmuncer3@usgs.gov'); +insert into admins (username, password , email) values ('Stormie Tupman', 'RFlj1q', 'stupman4@ucsd.edu'); +insert into admins (username, password , email) values ('Iolande Hannon', 'MJxajHSl2rAc', null); +insert into admins (username, password , email) values ('Jarrod Pichmann', '0fhvHkw3RH', 'jpichmann6@marriott.com'); +insert into admins (username, password , email) values ('Rodney Silmon', '92LzsyZ', 'rsilmon7@cdc.gov'); +insert into admins (username, password , email) values ('Colin Meco', 'tfJJ98XtHvt', 'cmeco8@state.gov'); +insert into admins (username, password , email) values ('Emylee Tremblet', 'JBuEFGDSk', 'etremblet9@google.com.br'); +insert into admins (username, password , email) values ('Fionnula Carn', 'IbtdNj8u', null); +insert into admins (username, password , email) values ('Netty O''Ferris', 'x7SBX6u3', 'noferrisb@discuz.net'); +insert into admins (username, password , email) values ('Davon Batkin', 'FESFc9vb', 'dbatkinc@nsw.gov.au'); +insert into admins (username, password , email) values ('Lilian Newall', 'Atpa42S7kU', 'lnewalld@google.co.jp'); +insert into admins (username, password , email) values ('Tabby ducarme', 'up2tGLZZ5', 'tducarmee@diigo.com'); +insert into admins (username, password , email) values ('Kari Dron', 'V26b2nSW', 'kdronf@china.com.cn'); +insert into admins (username, password , email) values ('Harmony Littrik', 'GdxrpA4', 'hlittrikg@dion.ne.jp'); +insert into admins (username, password , email) values ('Irwin Thieme', 'cxiD1Q8C1', 'ithiemeh@aol.com'); +insert into admins (username, password , email) values ('Eolande Hattersley', 'ZLWk75Q7ops', 'ehattersleyi@wordpress.org'); +insert into admins (username, password , email) values ('Whitman Flarity', 'uSm5m1Vs', 'wflarityj@oaic.gov.au'); +insert into admins (username, password , email) values ('Andrei Marion', 'FCpcxaZ9DM', 'amarionk@google.co.uk'); +insert into admins (username, password , email) values ('Crissie Peer', 'XzEek1edn79', 'cpeerl@pagesperso-orange.fr'); +insert into admins (username, password , email) values ('Cathlene Osbourn', 'uOaKt4a', 'cosbournm@hp.com'); +insert into admins (username, password , email) values ('Jojo Marques', 'mHWH2iC', 'jmarquesn@nyu.edu'); +insert into admins (username, password , email) values ('Berget Hathwood', 'pbtMeoSUBq', 'bhathwoodo@so-net.ne.jp'); +insert into admins (username, password , email) values ('Hal Tschirasche', 'BNP5J4I', 'htschiraschep@fc2.com'); +insert into admins (username, password , email) values ('Tatiania Fleetwood', 'dVxq1OP3J', null); +insert into admins (username, password , email) values ('Jacquenetta Camilli', 'i7IjxSRMX', null); +insert into admins (username, password , email) values ('Waite Steynor', 'd8ed6a', null); +insert into admins (username, password , email) values ('Sascha Daunter', '5AqxXoh', 'sdauntert@biblegateway.com'); +insert into admins (username, password , email) values ('Garrard Eskriett', 'fzgAhE2', 'geskriettu@samsung.com'); +insert into admins (username, password , email) values ('Tresa Cankett', 'R4lFXY', 'tcankettv@springer.com'); +insert into admins (username, password , email) values ('Eduard Van Driel', '8B3GZDb9z', null); +insert into admins (username, password , email) values ('Theresita Jolin', 'LGFQ212', 'tjolinx@webs.com'); +insert into admins (username, password , email) values ('Dita Khilkov', 'Bo075o6A', null); +insert into admins (username, password , email) values ('Gorden Townrow', 'icExSxt', 'gtownrowz@purevolume.com'); +insert into admins (username, password , email) values ('Maisie Pawlicki', 'w8oZEKMQ', 'mpawlicki10@nyu.edu'); +insert into admins (username, password , email) values ('Fayre Dolan', 'q9nXnnSNtx', 'fdolan11@goodreads.com'); +insert into admins (username, password , email) values ('Issi Summerson', '3RLSIk', 'isummerson12@amazonaws.com'); +insert into admins (username, password , email) values ('Layla Doiley', 'Tp4ARn', 'ldoiley13@oracle.com'); +insert into admins (username, password , email) values ('Danila Nott', 'qLksmHybtS', null); +insert into admins (username, password , email) values ('Margaretha Abela', 'kmt7EJ5oSIp', 'mabela15@google.it'); +insert into admins (username, password , email) values ('Alexandra Nancekivell', 'PwON4A', 'anancekivell16@w3.org'); +insert into admins (username, password , email) values ('Venita Hulles', 'DeRq2Xg', 'vhulles17@drupal.org'); +insert into admins (username, password , email) values ('Marcos Smethurst', 'R79WWN', 'msmethurst18@nature.com'); +insert into admins (username, password , email) values ('Ruby Wellbeloved', 'hZm7H92mW', 'rwellbeloved19@yellowbook.com'); +insert into admins (username, password , email) values ('Vassily Kilbourne', 'ed5lAfBJK', 'vkilbourne1a@ebay.com'); +insert into admins (username, password , email) values ('Sigfried Finker', 'ER5ISdRBk', 'sfinker1b@geocities.jp'); +insert into admins (username, password , email) values ('Johan Dunton', 'Hokjm7TJt', 'jdunton1c@mac.com'); +insert into admins (username, password , email) values ('Ewart Holywell', 'kWmUiP3Oa', 'eholywell1d@storify.com'); +insert into admins (username, password , email) values ('Guglielma Nore', 'JnJpUDHND97w', 'gnore1e@rambler.ru'); +insert into admins (username, password , email) values ('Shena Balthasar', 'Ttzt4O', 'sbalthasar1f@goo.gl'); +insert into admins (username, password , email) values ('Ollie Cuffe', 'jP3i5i', 'ocuffe1g@netlog.com'); +insert into admins (username, password , email) values ('Dixie Cock', '5Ff3U61dE', 'dcock1h@hc360.com'); +insert into admins (username, password , email) values ('Katherina Whitticks', 'yLasmgO', 'kwhitticks1i@netvibes.com'); +insert into admins (username, password , email) values ('Diarmid Chaikovski', 'NGON43VWec', 'dchaikovski1j@ucoz.com'); +insert into admins (username, password , email) values ('Friedrick Fenner', 'wJjDiKDt', null); +insert into admins (username, password , email) values ('Bette Cluely', 'DPwQ2FUzc60', 'bcluely1l@nature.com'); +insert into admins (username, password , email) values ('Sheila Perllman', 'shQ4Net', 'sperllman1m@amazonaws.com'); +insert into admins (username, password , email) values ('Isa Brackenbury', 'aIAIQO', 'ibrackenbury1n@list-manage.com'); +insert into admins (username, password , email) values ('Jacquenette Swain', 'aE7zcpB', 'jswain1o@odnoklassniki.ru'); +insert into admins (username, password , email) values ('Helen-elizabeth Joderli', '2SQ3ao97BqTK', 'hjoderli1p@e-recht24.de'); +insert into admins (username, password , email) values ('Clari Sunshine', 'xq9rIrIRzdt9', 'csunshine1q@shareasale.com'); +insert into admins (username, password , email) values ('Lorrie Lapsley', 'YYOBzT0oXW', 'llapsley1r@epa.gov'); +insert into admins (username, password , email) values ('Stormy Edgcombe', 'LOLqpzg', 'sedgcombe1s@ebay.co.uk'); +insert into admins (username, password , email) values ('Rodolph Chese', 'IkLhqPm', 'rchese1t@addtoany.com'); +insert into admins (username, password , email) values ('Merle Bridywater', 'bQFIzJtS', null); +insert into admins (username, password , email) values ('Kin Phil', 'cjzcOVgjVI', 'kphil1v@slideshare.net'); +insert into admins (username, password , email) values ('Leigha Birmingham', 'vDlYCrcBJL', 'lbirmingham1w@phoca.cz'); +insert into admins (username, password , email) values ('Scarlett Spurman', 'bfLiyuKWN5uQ', 'sspurman1x@washington.edu'); +insert into admins (username, password , email) values ('Booth D''Hooge', 'ParEPy', 'bdhooge1y@engadget.com'); +insert into admins (username, password , email) values ('Loree Wiffler', 'sN1WsgGbqUS', 'lwiffler1z@irs.gov'); +insert into admins (username, password , email) values ('Stefan Kirsch', 'q1hMjvMeP6', 'skirsch20@t-online.de'); +insert into admins (username, password , email) values ('Free Bevar', 'hTufEEXymoy', 'fbevar21@ibm.com'); +insert into admins (username, password , email) values ('Cathyleen Tubbles', 'MgW4Jwb5VK', 'ctubbles22@slate.com'); +insert into admins (username, password , email) values ('Rabbi Josephson', 'xrFvD4wj', 'rjosephson23@foxnews.com'); +insert into admins (username, password , email) values ('Isabeau Antonsson', 'zAPgYjO1vD', 'iantonsson24@wisc.edu'); +insert into admins (username, password , email) values ('Giustino Sperrett', 'Qx7DTzIfTS', 'gsperrett25@gizmodo.com'); +insert into admins (username, password , email) values ('Philip Gillean', '7E4CwgxY', 'pgillean26@tripod.com'); +insert into admins (username, password , email) values ('Hi Chilcott', 'iYJovT1SER', 'hchilcott27@msn.com'); +insert into admins (username, password , email) values ('Lianne Van der Velde', 'MYtWlfErxUA', 'lvan28@google.cn'); +insert into admins (username, password , email) values ('Marco O'' Faherty', 'KeNbshFv', 'mo29@boston.com'); +insert into admins (username, password , email) values ('Killie de Verson', 'vOnamaBDM', 'kde2a@icq.com'); +insert into admins (username, password , email) values ('Alejandro Brigham', '9stwvkrRHRMN', 'abrigham2b@mysql.com'); +insert into admins (username, password , email) values ('Goldi Lyle', 'aArEiQe21J', null); +insert into admins (username, password , email) values ('Maxi Hambelton', 'AH5aMrtG', null); +insert into admins (username, password , email) values ('Arabela Frankema', 'SOcw2AfC', 'afrankema2e@last.fm'); +insert into admins (username, password , email) values ('Jarret Eggins', 'z1eEBSQV', 'jeggins2f@bravesites.com'); +insert into admins (username, password , email) values ('Clea Wainscoat', 'VYGMwfpGkvjR', null); +insert into admins (username, password , email) values ('Wiatt Phizakarley', 'ZHG81KEv', 'wphizakarley2h@list-manage.com'); +insert into admins (username, password , email) values ('Matthiew Meachem', 'IA7mUrAiUXB', 'mmeachem2i@reference.com'); +insert into admins (username, password , email) values ('Denise Gerred', '87wJF8aIiZhN', 'dgerred2j@blogtalkradio.com'); +insert into admins (username, password , email) values ('Bonni LAbbet', 'dKNgiUKp', 'blabbet2k@irs.gov'); +insert into admins (username, password , email) values ('Isak Sams', 'JXLmhNTqLQn', null); +insert into admins (username, password , email) values ('Zorine Gavrielli', '3Rn6P9', 'zgavrielli2m@umich.edu'); +insert into admins (username, password , email) values ('Stanislaw Fidelli', 'X0rxvori0pB', 'sfidelli2n@msu.edu'); +insert into admins (username, password , email) values ('Hanna Durak', 'WIMBCLH6FaC', 'hdurak2o@cam.ac.uk'); +insert into admins (username, password , email) values ('Merill Sellman', 'wcUxHYPYl0', 'msellman2p@woothemes.com'); +insert into admins (username, password , email) values ('Nefen Culpan', 'SEgEHq4DciY', null); +insert into admins (username, password , email) values ('Bernarr MacNucator', 'a1EZSqRlL3', 'bmacnucator2r@businessweek.com'); +insert into admins (username, password , email) values ('Stefano Lembrick', '8ENOXC5', 'slembrick2s@npr.org'); +insert into admins (username, password , email) values ('Wendy Lembcke', 'caXU2D', 'wlembcke2t@rediff.com'); +insert into admins (username, password , email) values ('Allene Dillet', 'wmNLLH5zBR', 'adillet2u@fastcompany.com'); +insert into admins (username, password , email) values ('Evelyn Reavey', 'xqA1T5ZMKd7q', 'ereavey2v@vimeo.com'); +insert into admins (username, password , email) values ('Rosanna Rosengart', 'O50QvoVq', 'rrosengart2w@topsy.com'); +insert into admins (username, password , email) values ('Matthew Kleinhausen', '6vroZQu4l5C', null); +insert into admins (username, password , email) values ('Codee Lintill', '783mVNeiZ', 'clintill2y@cpanel.net'); +insert into admins (username, password , email) values ('Clarita McFaell', 'nV2RAwaEy4', 'cmcfaell2z@networksolutions.com'); +insert into admins (username, password , email) values ('Sumner Everwin', '6dVje6g', 'severwin30@scientificamerican.com'); +insert into admins (username, password , email) values ('Chico Frick', 'VjdlNjZSQytE', null); +insert into admins (username, password , email) values ('Rhianon Ginsie', 'hn5goatiV', 'rginsie32@mail.ru'); +insert into admins (username, password , email) values ('Devy Lyttle', 'QM36TSG', 'dlyttle33@irs.gov'); +insert into admins (username, password , email) values ('Erma Raggett', 'CDlPpzY6V6jr', 'eraggett34@icq.com'); +insert into admins (username, password , email) values ('Windham Seally', '7m66YdV0OJ', 'wseally35@amazon.co.uk'); +insert into admins (username, password , email) values ('Candi Saffe', 'ksDNIinRTcH', 'csaffe36@paypal.com'); +insert into admins (username, password , email) values ('Georgeta Coale', 'GWv64vjLj', 'gcoale37@surveymonkey.com'); +insert into admins (username, password , email) values ('Celestyn Jakucewicz', 'mK4ZxJFV', 'cjakucewicz38@cdbaby.com'); +insert into admins (username, password , email) values ('Zak Wetter', 'EdLfpOzGqVCu', 'zwetter39@twitter.com'); +insert into admins (username, password , email) values ('Cherilynn Kiddell', 'LU8PiI', 'ckiddell3a@umn.edu'); +insert into admins (username, password , email) values ('Otto Drakard', 'vbeITyUyjVM', 'odrakard3b@wordpress.com'); +insert into admins (username, password , email) values ('Elsie Tarburn', '3t3cKJ', 'etarburn3c@msn.com'); +insert into admins (username, password , email) values ('Brandy Larrie', 'd2G0LirY4M38', 'blarrie3d@com.com'); +insert into admins (username, password , email) values ('Carmine Fowley', 'QrXZzpztElZ', 'cfowley3e@last.fm'); +insert into admins (username, password , email) values ('Gilemette Shattock', '8txNfqYM', 'gshattock3f@ovh.net'); +insert into admins (username, password , email) values ('Andonis Creber', 'HPUPF2ym', 'acreber3g@cbc.ca'); +insert into admins (username, password , email) values ('Gordan Talby', 'GQhJY6zf', 'gtalby3h@google.cn'); +insert into admins (username, password , email) values ('Curry Charrisson', 'Wwei71OuwR', null); +insert into admins (username, password , email) values ('Liz Geerling', 'V4MBmhd4zK', 'lgeerling3j@indiatimes.com'); +insert into admins (username, password , email) values ('Dotti Fendt', 'Cn9P5bgR', 'dfendt3k@webs.com'); +insert into admins (username, password , email) values ('Gael Zaczek', '62tNQVi3a', 'gzaczek3l@infoseek.co.jp'); +insert into admins (username, password , email) values ('Desirae Reilly', 'DaAw1Btn2EGx', 'dreilly3m@sciencedirect.com'); +insert into admins (username, password , email) values ('Ann-marie Goodbarr', 'jq6Ompdr', 'agoodbarr3n@stumbleupon.com'); +insert into admins (username, password , email) values ('Ezechiel Husby', 'adKZUA4B', 'ehusby3o@zdnet.com'); +insert into admins (username, password , email) values ('Carline Twiggins', 'SrST8eOQPWF', 'ctwiggins3p@dailymail.co.uk'); +insert into admins (username, password , email) values ('Nessy Guly', '5pPsXhA0Z67y', 'nguly3q@mtv.com'); +insert into admins (username, password , email) values ('Celestina Brayfield', 'fr2uXmW5', 'cbrayfield3r@tinypic.com'); +insert into admins (username, password , email) values ('Jenni Wildblood', 'S70b7cUltWtP', 'jwildblood3s@yale.edu'); +insert into admins (username, password , email) values ('Georgianne Quittonden', 'RDHZ4l', 'gquittonden3t@photobucket.com'); +insert into admins (username, password , email) values ('Durant Gurg', 'tLWEvXIsVwfK', 'dgurg3u@discovery.com'); +insert into admins (username, password , email) values ('Pavel Hambrick', 'mo4Quzrq9msv', 'phambrick3v@ustream.tv'); +insert into admins (username, password , email) values ('Wilone Schops', 'dHhUYp3', 'wschops3w@illinois.edu'); +insert into admins (username, password , email) values ('Paxon Benadette', '5BilF8nrOis5', 'pbenadette3x@slashdot.org'); +insert into admins (username, password , email) values ('Lorne Jeffes', 'LDw2DCFh', 'ljeffes3y@unblog.fr'); +insert into admins (username, password , email) values ('Gregoire De la Harpe', '8pfQe8', 'gde3z@cnbc.com'); +insert into admins (username, password , email) values ('Cornall Raeburn', 'sax6m2lM5N', null); +insert into admins (username, password , email) values ('Pierette Pionter', 'y5sUrtvulrdL', 'ppionter41@stumbleupon.com'); +insert into admins (username, password , email) values ('Ansley Sacher', 'a07XI0o3unys', 'asacher42@youtu.be'); +insert into admins (username, password , email) values ('Blondelle Gownge', 'VYcRktxAd6Yh', 'bgownge43@mozilla.org'); +insert into admins (username, password , email) values ('Bevon Shory', 'WbdjKuEAXOQ', 'bshory44@gov.uk'); +insert into admins (username, password , email) values ('Christabel Luffman', 'lDUWJwM', null); diff --git a/server/database/config/agentsFackData.sql b/server/database/config/agentsFackData.sql new file mode 100644 index 0000000..c13cfb9 --- /dev/null +++ b/server/database/config/agentsFackData.sql @@ -0,0 +1,150 @@ +insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', 'zPaSLffNNHt', '481-649-8020', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', 'HjmlmFbqJrzj', '663-871-7450', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', 'NmB91dU', '630-385-8312', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', 'nYa5Ibw', '210-886-2847', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Lillian', null, 'dRCLpEwy', '270-209-1221', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', 'ppgDMnGe82Ci', '426-753-9984', 'application/mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Kimberlee', 'kscamp6@washingtonpost.com', 'OpvcvwsA', '728-690-3987', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Vicki', 'vallred7@cam.ac.uk', 'YN1CkEqx', '504-768-2377', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Sioux', 'sbank8@cafepress.com', 'eyB98M', '609-148-4383', 'application/vnd.ms-powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Heidie', 'hpaulet9@skype.com', 'qyIFnw4M5Ahe', '640-885-2675', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Nertie', 'ntrahmela@epa.gov', 'HVVqU7D0', '587-822-1209', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Steffie', 'sevansonb@tinypic.com', '15Ivgt69', '744-526-0201', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Imogen', 'icorsellesc@europa.eu', 'VqR64wrD', '961-568-7728', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Kirby', 'kstooked@canalblog.com', 's9bqrekn', '838-437-0166', 'application/mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Aura', 'amapstone@sourceforge.net', 'VT5Iy8MQhFo', '405-977-3855', 'application/x-mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Ellynn', 'ehelmf@fotki.com', 'iUhvvbYm', '975-260-7379', 'audio/x-mpeg-3'); +insert into agents (name, email, password , phone, avater) values ('Katharyn', 'klalondeg@cornell.edu', 'mD5ECSg3', '406-588-5092', 'video/x-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Margaretha', 'mmcclymondh@homestead.com', 'pWOpIk', '472-483-3149', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Stormie', 'shallwoodi@scribd.com', 'CkB5qro4UVbn', '828-957-3626', 'image/x-tiff'); +insert into agents (name, email, password , phone, avater) values ('Ethelin', 'edohertyj@squarespace.com', '2k8nel', '215-461-2833', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Chloe', 'crickmank@craigslist.org', 'l7DWQu0NR8R7', '797-573-4068', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Brandise', 'braitiel@typepad.com', 'xrssojD4PGEM', '918-647-1129', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Shandy', 'skrabbem@spiegel.de', 'uExQ5raf', '186-513-0155', 'image/x-tiff'); +insert into agents (name, email, password , phone, avater) values ('Gwenny', 'gspyvyen@foxnews.com', 'NPNTVM', '936-955-0985', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Joeann', 'jmarsterso@tripod.com', 'IMbUOzvLjw', '238-407-3787', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Pauli', 'ppotzoldp@harvard.edu', 'gv1HFthQDRw', '955-887-9084', 'application/x-msexcel'); +insert into agents (name, email, password , phone, avater) values ('Kessia', 'krapseyq@independent.co.uk', 'p5XPnS', '868-237-3249', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Rosette', 'rorpinr@google.com', '9BBJW1CJM', '613-394-3594', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Candida', 'cparchments@mapy.cz', 'CS0KL3fMB', '316-829-0334', 'video/x-mpeg'); +insert into agents (name, email, password , phone, avater) values ('Adel', 'ahaffardt@fastcompany.com', 'M3M9zumL', '234-941-3027', 'image/x-tiff'); +insert into agents (name, email, password , phone, avater) values ('Carola', 'caughtonu@uiuc.edu', 'UlhjaGq', '742-675-3652', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Geri', 'gsoppethv@hc360.com', 'Wj3vu0', '536-403-5044', 'video/x-mpeg'); +insert into agents (name, email, password , phone, avater) values ('Dannye', null, 'wtB2VWU7u', '348-901-4048', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Rae', null, 'WTCXE3', '790-407-3530', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Kalina', 'kmethy@facebook.com', '8k5iG3', '126-919-0870', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Milli', null, 'yxniep7', '746-683-3875', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Arlene', 'aattenbarrow10@weebly.com', 'HfKxYSQ', '538-163-6790', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Charissa', 'cesmond11@cisco.com', 'KG1SpL', '832-893-6625', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Alis', 'ajell12@google.com.hk', 'QzFAWBrWeb', '265-394-9051', 'application/x-mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Marilin', 'mbleything13@vkontakte.ru', 'UhY125yWPk', '344-308-3983', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Alberta', 'acollcutt14@goodreads.com', 'NYJhGXQflYv', '213-565-2866', 'image/x-tiff'); +insert into agents (name, email, password , phone, avater) values ('Guenevere', 'gdesouza15@live.com', 'dqit1jMU0VT', '399-604-9213', 'application/x-excel'); +insert into agents (name, email, password , phone, avater) values ('Nanni', 'nbrussell16@umich.edu', '8vsHUCfaRf47', '635-195-5206', 'text/plain'); +insert into agents (name, email, password , phone, avater) values ('Shel', 'szeale17@mozilla.com', 'MPTXUT', '255-815-3103', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Sherline', 'swoolaghan18@goo.ne.jp', 'sapDmnp', '563-350-5658', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Dyan', 'dohanessian19@artisteer.com', '9q6Yo3Vf', '919-237-5617', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Hertha', 'hhayden1a@mapy.cz', 'Zqit86MJb7v', '993-210-1375', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Drusie', 'dmarjanovic1b@seattletimes.com', '6Cgnvp14AKJh', '492-911-9416', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Dale', 'dbeamond1c@gravatar.com', 'RoA5lI', '547-125-1386', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Ara', null, 'pZszGeqHF', '170-150-2665', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Roslyn', 'rburfield1e@nhs.uk', 'Key2GYR', '226-629-5499', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Consuela', 'cdron1f@posterous.com', 'kiE5lC8g', '356-396-8442', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Debera', 'dsansam1g@ft.com', 'sl5kDaDfQ7', '510-391-5197', 'audio/x-mpeg-3'); +insert into agents (name, email, password , phone, avater) values ('Kizzee', 'knoel1h@linkedin.com', 'IBuJFoufA', '647-355-4033', 'application/powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Kaylee', 'kgregoire1i@domainmarket.com', 'D4DJLzpfKp3', '336-311-8987', 'video/msvideo'); +insert into agents (name, email, password , phone, avater) values ('Sheeree', 'sdorbin1j@amazon.co.uk', 'PFO1ERnuDuA', '775-340-3072', 'application/x-excel'); +insert into agents (name, email, password , phone, avater) values ('Gerty', null, 'jiEI2mI', '674-707-7754', 'application/vnd.ms-powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Harrie', 'hganiclef1l@4shared.com', 'Wcs5ghZ', '717-252-2739', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Pen', 'praitt1m@cbslocal.com', 'dW1yINUh', '431-175-2665', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Inna', null, '77hEidP9tD', '371-471-4596', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Rosene', 'rdunklee1o@csmonitor.com', 'o8BHEWGYjy9', '432-537-4837', 'text/plain'); +insert into agents (name, email, password , phone, avater) values ('Dacey', 'djoselevitz1p@imdb.com', 'OBU4G3O9J', '855-453-7496', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Kathlin', 'kpickavant1q@weather.com', 'cIi12et5ji', '742-926-2609', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Joli', 'jfleckness1r@t.co', 'YfTJW9E5ty0', '656-582-3313', 'application/mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Ladonna', 'lswanborough1s@godaddy.com', 'ml4otnDAgFB', '760-656-9481', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Shaylah', 'smoroney1t@toplist.cz', 'Z5p4j7', '163-758-7247', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Merline', 'mgrund1u@imageshack.us', 'zAoneQoJ', '973-991-9356', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Rosa', 'rfairy1v@nps.gov', 'xsxOCXPcIXQV', '162-899-0081', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Tracie', 'tmcaster1w@freewebs.com', 'r4FWmYkZfT', '159-489-4239', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Felecia', 'fpietzker1x@mysql.com', 'LhUVqfQ', '765-621-8433', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Kalina', null, 'VM0u5TxZU3h', '411-869-3673', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Shandra', 'snewborn1z@wikimedia.org', 'QxyeGAF', '339-252-0138', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Odelinda', 'oblindermann20@theglobeandmail.com', 'nfEkIEAzSP4', '478-200-0820', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Shir', 'seasom21@spotify.com', '42sXdqJEoM', '637-533-5026', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Chiquia', 'crushworth22@nytimes.com', 'Fmc0IN0Rn', '674-527-9240', 'application/x-excel'); +insert into agents (name, email, password , phone, avater) values ('Donny', 'dwalch23@who.int', 'byH4Pb2xplUd', '672-396-8319', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Lydia', 'llegging24@goo.ne.jp', 'U05AJ6z1t', '798-319-7125', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Eddi', null, 'dxyRAGu', '969-435-2400', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Kissie', 'ksymones26@instagram.com', 'J41Ktb', '333-601-9150', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Afton', 'amapother27@phoca.cz', 'JPJV64p40YFk', '291-584-5019', 'video/x-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Shandy', 'sdales28@uiuc.edu', 'uUfwtCgUPY', '472-341-9889', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Janean', 'jvasovic29@rakuten.co.jp', '15meAi9jj3', '422-480-2846', 'application/vnd.ms-powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Emmaline', 'emennell2a@npr.org', '6PKLVVpTCXm', '928-553-3387', 'application/x-msexcel'); +insert into agents (name, email, password , phone, avater) values ('Teddie', 'twessing2b@multiply.com', 'B12zqxHBjZ', '529-988-9106', 'application/x-excel'); +insert into agents (name, email, password , phone, avater) values ('Gayla', 'gpfaffe2c@house.gov', 'Go3uQF', '769-830-0553', 'application/mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Mamie', 'mjay2d@parallels.com', 'dSyYpagBOkz', '223-165-6495', 'image/tiff'); +insert into agents (name, email, password , phone, avater) values ('Courtenay', 'cmcdunlevy2e@deviantart.com', 'aHt0rsWRmuNc', '701-821-9105', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Orella', 'ocandey2f@examiner.com', 'KquQupfWL', '853-247-2656', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Krystalle', null, '1FuThn', '627-959-7961', 'audio/x-mpeg-3'); +insert into agents (name, email, password , phone, avater) values ('Orelle', 'oaskam2h@independent.co.uk', 'hm78AShqrw', '720-792-9410', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Teressa', 'tleatherland2i@census.gov', 'Rdi9BdgAO64D', '105-947-9923', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Caryl', 'chobgen2j@eepurl.com', 'Uprw3wuZ', '302-611-8373', 'text/plain'); +insert into agents (name, email, password , phone, avater) values ('Marj', 'mmaliffe2k@homestead.com', 'TY5HqNvmTX', '791-316-1532', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Seline', 'ssouthorn2l@prweb.com', 'BTIT6Y', '535-388-2601', 'audio/x-mpeg-3'); +insert into agents (name, email, password , phone, avater) values ('Lula', 'lfrancisco2m@yahoo.com', 'nJeahk1f1E', '910-798-0299', 'video/msvideo'); +insert into agents (name, email, password , phone, avater) values ('Nathalie', 'nwhettleton2n@nbcnews.com', 'qo8AF8NG', '466-534-5286', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Marketa', 'mputnam2o@guardian.co.uk', 'u3N1neOW03pk', '318-272-3741', 'video/x-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Starla', 'smcphilip2p@umn.edu', '9FkyYf5', '287-500-8574', 'video/x-mpeg'); +insert into agents (name, email, password , phone, avater) values ('Elysee', 'ereay2q@cam.ac.uk', 'xDjtJy30', '882-536-4419', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Cassandre', 'cpeche2r@yahoo.co.jp', '0kHoz2v', '490-378-3036', 'video/x-mpeg'); +insert into agents (name, email, password , phone, avater) values ('Poppy', 'pfaivre2s@utexas.edu', 'k0l4DvnOrzi', '904-471-1574', 'video/x-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Maryanne', 'mtiptaft2t@marketwatch.com', 'Gve73afgn', '859-476-9884', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Valry', 'venglish2u@upenn.edu', 'TyfiyV7Bi', '574-554-8907', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Genna', 'gpash2v@dropbox.com', '1XDOJM', '689-758-1257', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Lorain', 'lpossell2w@tinyurl.com', '1mwP02JArJiL', '381-200-3759', 'application/excel'); +insert into agents (name, email, password , phone, avater) values ('Winonah', 'wrowthorn2x@bigcartel.com', 'rR46TL', '325-430-0792', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Babara', null, '9HBGXSvgxWL', '982-309-8885', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Margarette', 'mmaseres2z@rakuten.co.jp', 'GPu9fL0S1W', '980-316-8933', 'image/pjpeg'); +insert into agents (name, email, password , phone, avater) values ('Deidre', 'dmaleck30@spotify.com', 'trOhPISML', '739-613-9409', 'video/msvideo'); +insert into agents (name, email, password , phone, avater) values ('Brietta', 'bsellar31@bigcartel.com', 'hgbUUYt', '761-205-0866', 'text/plain'); +insert into agents (name, email, password , phone, avater) values ('Aleta', 'abolderoe32@wiley.com', 'MoMqRCRe9', '174-673-6862', 'application/powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Bertie', 'bmckee33@list-manage.com', 'DyeLx6C78', '291-375-2344', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Guinna', 'ggarrelts34@twitter.com', 'UhyDfHpeHQhy', '942-146-2414', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Carmelle', 'cwickstead35@csmonitor.com', 'ghjvK7p', '680-830-1555', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Kynthia', null, 'uOU72vKV', '770-400-3185', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Martita', 'mgoldhawk37@sfgate.com', 'LVbe37uiQYK', '814-982-5744', 'application/excel'); +insert into agents (name, email, password , phone, avater) values ('Fania', 'fcattini38@miibeian.gov.cn', 'uvFvOYZZNPf', '804-702-2381', 'application/x-mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Natalee', 'nkneel39@google.it', 'iOpvCXYd94', '428-499-5556', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Karylin', null, 'BIGxZI', '887-742-6175', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Aggie', 'abelward3b@npr.org', 'eewAnohy', '943-751-3664', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Micheline', 'maronow3c@ow.ly', 'lGXXsJBWMCB', '968-485-1991', 'application/x-mspowerpoint'); +insert into agents (name, email, password , phone, avater) values ('Isobel', 'idilleston3d@123-reg.co.uk', 'qtjX0h', '858-672-1699', 'image/gif'); +insert into agents (name, email, password , phone, avater) values ('Merola', 'mstockney3e@typepad.com', 'GHm9e5z', '698-503-5727', 'application/x-excel'); +insert into agents (name, email, password , phone, avater) values ('Phillie', 'pchipman3f@earthlink.net', 'ROQQ1lwI', '736-346-6573', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Benedetta', 'bcowperthwaite3g@mac.com', 'cyfhN1', '721-762-9817', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Aleta', 'anock3h@stumbleupon.com', 'c7A51EDwko', '643-962-2958', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Molli', 'mgodbold3i@senate.gov', 'SEQiNiKwK6', '500-933-0521', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Wilone', 'wvigar3j@istockphoto.com', 'oEtTFtPRI', '482-429-9868', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Cinda', 'cpardy3k@europa.eu', 'nemZMqX', '388-326-9762', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Shirleen', 'shuddleston3l@vistaprint.com', 'S66D4X', '986-372-0787', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Sheilakathryn', 'snequest3m@prweb.com', 'CUPmgsqyu', '577-890-7094', 'image/png'); +insert into agents (name, email, password , phone, avater) values ('Carmel', null, '5VTLmS6z', '619-599-9441', 'application/powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Idell', 'imarmyon3o@google.ca', 'c34JXgt', '663-599-5872', 'application/excel'); +insert into agents (name, email, password , phone, avater) values ('Tomi', 'tbettles3p@privacy.gov.au', 'ywgR2I', '577-860-1056', 'application/pdf'); +insert into agents (name, email, password , phone, avater) values ('Rosaline', 'rfrangione3q@bigcartel.com', 'sN3tY4AO', '254-454-2168', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Geneva', 'gmiranda3r@sbwire.com', 'ZY5sV4o', '470-229-5855', 'video/avi'); +insert into agents (name, email, password , phone, avater) values ('Alessandra', 'ahullah3s@vk.com', 'SOfBFyRcnqH', '880-706-5629', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Hedvige', 'hpatifield3t@squidoo.com', 'aGP4tViwMf7k', '210-885-7942', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Kristine', 'kranns3u@networksolutions.com', 'MhjQ5i0', '651-552-6160', 'application/msword'); +insert into agents (name, email, password , phone, avater) values ('Michaella', 'mbutteris3v@topsy.com', 'uadNmp', '543-455-8697', 'video/quicktime'); +insert into agents (name, email, password , phone, avater) values ('Maryann', 'maldred3w@meetup.com', 'NgxjChxW', '341-624-1965', 'application/x-troff-msvideo'); +insert into agents (name, email, password , phone, avater) values ('Dixie', null, 'rZjF6W5J83Z', '378-890-0286', 'application/x-msexcel'); +insert into agents (name, email, password , phone, avater) values ('Renata', 'rsurmeyer3y@rediff.com', 'i8fVHHf', '932-195-6242', 'application/vnd.ms-excel'); +insert into agents (name, email, password , phone, avater) values ('Petronilla', 'pbursnall3z@columbia.edu', 'f18YmZF', '601-526-0365', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('L;urette', 'lowers40@symantec.com', 'iNJKIsbaVuS', '936-733-2961', 'video/msvideo'); +insert into agents (name, email, password , phone, avater) values ('Martynne', 'mbrandolini41@prlog.org', 'S2obMC9', '876-700-0617', 'image/jpeg'); +insert into agents (name, email, password , phone, avater) values ('Lorrayne', 'lgoodhew42@weebly.com', '9959qfkB', '864-356-0497', 'audio/mpeg3'); +insert into agents (name, email, password , phone, avater) values ('Renae', 'rdenziloe43@narod.ru', 'E1sWHlrFWq', '175-366-9540', 'application/vnd.ms-powerpoint'); +insert into agents (name, email, password , phone, avater) values ('Dulsea', 'dhoulden44@vinaora.com', 'B7FDhNTyKoSP', '714-266-4725', 'video/mpeg'); +insert into agents (name, email, password , phone, avater) values ('Gabriellia', 'gledrun45@springer.com', '4gvb5lj0Kye', '742-914-9580', 'video/x-mpeg'); diff --git a/server/database/config/imagesFackData.sql b/server/database/config/imagesFackData.sql new file mode 100644 index 0000000..0c4519e --- /dev/null +++ b/server/database/config/imagesFackData.sql @@ -0,0 +1,150 @@ +insert into images ( estate_id, image) values (148, null); +insert into images ( estate_id, image) values (93, 'image/x-tiff'); +insert into images ( estate_id, image) values (107, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (34, 'application/pdf'); +insert into images ( estate_id, image) values (42, 'image/png'); +insert into images ( estate_id, image) values (124, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (59, 'application/vnd.ms-excel'); +insert into images ( estate_id, image) values (129, 'image/tiff'); +insert into images ( estate_id, image) values (53, 'video/quicktime'); +insert into images ( estate_id, image) values (99, 'video/x-msvideo'); +insert into images ( estate_id, image) values (65, null); +insert into images ( estate_id, image) values (119, 'image/x-tiff'); +insert into images ( estate_id, image) values (35, 'application/x-excel'); +insert into images ( estate_id, image) values (4, 'video/mpeg'); +insert into images ( estate_id, image) values (109, 'image/gif'); +insert into images ( estate_id, image) values (62, 'text/plain'); +insert into images ( estate_id, image) values (77, 'application/pdf'); +insert into images ( estate_id, image) values (12, 'video/x-mpeg'); +insert into images ( estate_id, image) values (87, 'video/mpeg'); +insert into images ( estate_id, image) values (145, 'image/png'); +insert into images ( estate_id, image) values (20, 'video/quicktime'); +insert into images ( estate_id, image) values (103, 'audio/mpeg3'); +insert into images ( estate_id, image) values (25, 'application/x-excel'); +insert into images ( estate_id, image) values (128, 'application/pdf'); +insert into images ( estate_id, image) values (84, 'application/vnd.ms-excel'); +insert into images ( estate_id, image) values (105, 'application/pdf'); +insert into images ( estate_id, image) values (26, 'application/x-msexcel'); +insert into images ( estate_id, image) values (18, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (20, 'image/tiff'); +insert into images ( estate_id, image) values (6, null); +insert into images ( estate_id, image) values (112, 'video/x-msvideo'); +insert into images ( estate_id, image) values (61, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (20, 'audio/x-mpeg-3'); +insert into images ( estate_id, image) values (6, 'text/plain'); +insert into images ( estate_id, image) values (105, null); +insert into images ( estate_id, image) values (109, 'image/gif'); +insert into images ( estate_id, image) values (79, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (144, 'application/pdf'); +insert into images ( estate_id, image) values (82, 'image/jpeg'); +insert into images ( estate_id, image) values (120, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (146, 'image/tiff'); +insert into images ( estate_id, image) values (69, 'application/excel'); +insert into images ( estate_id, image) values (90, 'video/mpeg'); +insert into images ( estate_id, image) values (111, 'video/x-mpeg'); +insert into images ( estate_id, image) values (53, null); +insert into images ( estate_id, image) values (146, 'video/mpeg'); +insert into images ( estate_id, image) values (146, 'video/msvideo'); +insert into images ( estate_id, image) values (37, 'image/jpeg'); +insert into images ( estate_id, image) values (119, 'application/x-msexcel'); +insert into images ( estate_id, image) values (149, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (107, 'image/tiff'); +insert into images ( estate_id, image) values (81, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (136, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (120, 'video/mpeg'); +insert into images ( estate_id, image) values (17, 'video/mpeg'); +insert into images ( estate_id, image) values (105, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (13, null); +insert into images ( estate_id, image) values (25, 'video/x-mpeg'); +insert into images ( estate_id, image) values (64, null); +insert into images ( estate_id, image) values (54, 'application/x-mspowerpoint'); +insert into images ( estate_id, image) values (32, 'application/excel'); +insert into images ( estate_id, image) values (1, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (91, null); +insert into images ( estate_id, image) values (140, null); +insert into images ( estate_id, image) values (85, 'video/x-msvideo'); +insert into images ( estate_id, image) values (87, 'image/pjpeg'); +insert into images ( estate_id, image) values (22, null); +insert into images ( estate_id, image) values (125, 'audio/x-mpeg-3'); +insert into images ( estate_id, image) values (70, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (48, 'image/png'); +insert into images ( estate_id, image) values (128, 'video/mpeg'); +insert into images ( estate_id, image) values (60, 'image/x-tiff'); +insert into images ( estate_id, image) values (108, 'application/msword'); +insert into images ( estate_id, image) values (131, 'image/gif'); +insert into images ( estate_id, image) values (22, 'image/tiff'); +insert into images ( estate_id, image) values (148, 'application/x-troff-msvideo'); +insert into images ( estate_id, image) values (60, 'video/mpeg'); +insert into images ( estate_id, image) values (7, 'image/png'); +insert into images ( estate_id, image) values (7, 'audio/mpeg3'); +insert into images ( estate_id, image) values (72, 'application/excel'); +insert into images ( estate_id, image) values (129, 'application/x-troff-msvideo'); +insert into images ( estate_id, image) values (53, 'audio/mpeg3'); +insert into images ( estate_id, image) values (69, 'image/pjpeg'); +insert into images ( estate_id, image) values (15, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (30, 'video/msvideo'); +insert into images ( estate_id, image) values (71, null); +insert into images ( estate_id, image) values (130, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (77, 'application/msword'); +insert into images ( estate_id, image) values (145, null); +insert into images ( estate_id, image) values (98, null); +insert into images ( estate_id, image) values (95, 'video/msvideo'); +insert into images ( estate_id, image) values (34, null); +insert into images ( estate_id, image) values (87, 'video/msvideo'); +insert into images ( estate_id, image) values (2, 'application/x-excel'); +insert into images ( estate_id, image) values (134, 'application/x-mspowerpoint'); +insert into images ( estate_id, image) values (28, 'video/avi'); +insert into images ( estate_id, image) values (133, null); +insert into images ( estate_id, image) values (138, 'image/jpeg'); +insert into images ( estate_id, image) values (59, 'application/mspowerpoint'); +insert into images ( estate_id, image) values (30, 'application/x-excel'); +insert into images ( estate_id, image) values (27, 'application/x-troff-msvideo'); +insert into images ( estate_id, image) values (2, null); +insert into images ( estate_id, image) values (122, 'audio/mpeg3'); +insert into images ( estate_id, image) values (70, 'image/pjpeg'); +insert into images ( estate_id, image) values (130, 'image/tiff'); +insert into images ( estate_id, image) values (141, 'image/png'); +insert into images ( estate_id, image) values (118, 'application/excel'); +insert into images ( estate_id, image) values (69, 'image/gif'); +insert into images ( estate_id, image) values (147, 'image/tiff'); +insert into images ( estate_id, image) values (23, 'video/x-mpeg'); +insert into images ( estate_id, image) values (148, 'application/excel'); +insert into images ( estate_id, image) values (86, 'application/msword'); +insert into images ( estate_id, image) values (13, 'video/quicktime'); +insert into images ( estate_id, image) values (132, 'video/mpeg'); +insert into images ( estate_id, image) values (146, 'image/tiff'); +insert into images ( estate_id, image) values (35, 'text/plain'); +insert into images ( estate_id, image) values (127, 'application/msword'); +insert into images ( estate_id, image) values (0, 'video/x-msvideo'); +insert into images ( estate_id, image) values (27, 'image/png'); +insert into images ( estate_id, image) values (70, 'application/pdf'); +insert into images ( estate_id, image) values (144, 'image/pjpeg'); +insert into images ( estate_id, image) values (84, 'image/pjpeg'); +insert into images ( estate_id, image) values (80, 'application/x-excel'); +insert into images ( estate_id, image) values (75, 'application/x-mspowerpoint'); +insert into images ( estate_id, image) values (134, 'application/msword'); +insert into images ( estate_id, image) values (62, 'application/x-troff-msvideo'); +insert into images ( estate_id, image) values (97, 'application/vnd.ms-excel'); +insert into images ( estate_id, image) values (70, 'application/x-msexcel'); +insert into images ( estate_id, image) values (104, null); +insert into images ( estate_id, image) values (4, null); +insert into images ( estate_id, image) values (142, null); +insert into images ( estate_id, image) values (135, 'application/pdf'); +insert into images ( estate_id, image) values (22, 'video/quicktime'); +insert into images ( estate_id, image) values (144, 'application/pdf'); +insert into images ( estate_id, image) values (82, 'audio/mpeg3'); +insert into images ( estate_id, image) values (49, 'image/tiff'); +insert into images ( estate_id, image) values (87, 'application/powerpoint'); +insert into images ( estate_id, image) values (56, 'application/x-mspowerpoint'); +insert into images ( estate_id, image) values (108, 'image/png'); +insert into images ( estate_id, image) values (119, 'video/mpeg'); +insert into images ( estate_id, image) values (53, 'application/vnd.ms-powerpoint'); +insert into images ( estate_id, image) values (15, 'application/excel'); +insert into images ( estate_id, image) values (46, 'video/msvideo'); +insert into images ( estate_id, image) values (134, 'audio/mpeg3'); +insert into images ( estate_id, image) values (138, 'audio/mpeg3'); +insert into images ( estate_id, image) values (73, 'application/excel'); +insert into images ( estate_id, image) values (147, 'application/pdf'); +insert into images ( estate_id, image) values (45, 'application/x-msexcel'); +insert into images ( estate_id, image) values (45, null); +insert into images ( estate_id, image) values (94, 'application/x-excel'); diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql new file mode 100644 index 0000000..5fd9119 --- /dev/null +++ b/server/database/config/realStateFackData.sql @@ -0,0 +1,150 @@ +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (41, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (80, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (13, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (42, 'orci', '$191501.75', 'pharetra magna', 'Buy', 'House', '42 Park Meadow Lane', 'Drobin', 'Poland', 2, 1, 2, 224, true, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (69, 'potenti nullam', '$102097.77', 'pellentesque at nulla suspendisse potenti cras in purus eu magna vulputate luctus cum sociis natoque penatibus', 'Buy', 'House', '9992 Jenna Plaza', 'Akhtopol', 'Bulgaria', 3, 2, 3, 173, false, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'luctus et', '$123383.84', 'eu mi nulla ac enim in tempor turpis nec euismod scelerisque quam turpis adipiscing lorem vitae', 'Buy', 'House', '1717 Hudson Alley', 'Maiyema', 'Nigeria', 1, 3, 4, 230, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'porta volutpat erat quisque', '$265040.46', 'vulputate elementum nullam varius nulla facilisi cras non velit nec nisi vulputate nonummy maecenas', 'Buy', 'House', '9 Clove Road', 'Iwo', 'Nigeria', 3, 3, 2, 186, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'metus sapien ut', '$72245.56', 'ullamcorper purus sit amet nulla quisque arcu', 'Buy', 'House', '308 Charing Cross Circle', 'Ylöjärvi', 'Finland', 3, 1, 3, 231, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (88, 'purus aliquet at feugiat', '$301624.69', 'pede venenatis non sodales sed tincidunt eu felis fusce posuere felis sed', 'Buy', 'House', '05 Everett Point', 'Quinta da Courela', 'Portugal', 2, 3, 2, 230, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (32, 'est risus auctor sed', '$451787.74', 'rhoncus aliquam lacus morbi quis tortor id', 'Buy', 'House', '06146 Washington Pass', 'Sangpi', 'China', 3, 2, 2, 199, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'sapien non mi', '$141218.13', 'et ultrices posuere cubilia curae donec pharetra magna vestibulum aliquet ultrices erat', 'Buy', 'House', '550 Kensington Street', 'Washington', 'United States', 1, 3, 4, 232, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (37, 'felis', '$240120.05', 'eget semper', 'Buy', 'House', '3 Rusk Terrace', 'Xianzong', 'China', 3, 3, 4, 205, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'dolor sit amet consectetuer', '$317908.31', 'orci luctus et', 'Buy', 'House', '99016 Meadow Vale Avenue', 'Višňové', 'Czech Republic', 3, 1, 1, 202, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (24, 'ac', '$214856.50', 'sit amet justo morbi', 'Buy', 'House', '075 Garrison Drive', 'Wilga', 'Poland', 3, 4, 3, 152, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (96, 'elit proin risus', '$331482.44', 'habitasse platea dictumst morbi vestibulum velit id', 'Buy', 'House', '9 Del Mar Hill', 'Limoges', 'France', 2, 1, 4, 211, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (50, 'condimentum id luctus nec', '$495232.67', 'praesent lectus vestibulum quam sapien', 'Buy', 'House', '4 Pleasure Way', 'Novikovo', 'Russia', 2, 4, 1, 186, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'condimentum neque sapien placerat', '$47831.30', 'integer ac neque duis bibendum morbi non quam nec dui luctus rutrum nulla tellus in', 'Buy', 'House', '49 Del Mar Court', 'Bobonan', 'Philippines', 3, 1, 3, 242, false, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'donec vitae nisi nam', '$416056.60', 'vestibulum velit id pretium iaculis diam erat fermentum justo nec condimentum neque sapien placerat ante nulla', 'Buy', 'House', '10520 Monument Terrace', 'Amboasary', 'Madagascar', 1, 4, 2, 215, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (8, 'morbi non', '$165854.83', 'dui luctus rutrum nulla', 'Buy', 'House', '8841 Bunker Hill Junction', 'La Tuque', 'Canada', 1, 4, 1, 228, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (66, 'libero', '$272481.88', 'in porttitor pede justo eu massa donec dapibus duis', 'Buy', 'House', '4 Esker Plaza', 'Lyantonde', 'Uganda', 3, 1, 2, 212, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (83, 'at velit vivamus', '$206236.08', 'ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae duis faucibus accumsan', 'Buy', 'House', '20411 Shasta Point', 'Miguel Calmon', 'Brazil', 3, 2, 1, 152, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'orci', '$479884.82', 'quam sapien varius ut blandit non', 'Buy', 'House', '03 Talmadge Road', 'Lelystad', 'Netherlands', 2, 3, 4, 211, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'sit amet', '$499654.40', 'nulla ut erat id mauris vulputate elementum nullam varius', 'Buy', 'House', '71 Boyd Court', 'Songbo', 'China', 1, 3, 2, 188, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'amet', '$152036.24', 'vel nisl duis ac nibh fusce lacus purus aliquet at feugiat non pretium', 'Buy', 'House', '8543 Gulseth Drive', 'Kadoma', 'Zimbabwe', 1, 1, 3, 152, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (76, 'justo pellentesque', '$256963.73', 'lacinia eget tincidunt eget tempus vel pede', 'Buy', 'House', '93019 Melrose Avenue', 'Shōbara', 'Japan', 2, 4, 2, 173, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'pede', '$491487.39', 'ut', 'Buy', 'House', '6 Derek Point', 'Ixopo', 'South Africa', 1, 3, 1, 204, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'ac tellus semper', '$428599.42', 'massa id nisl venenatis', 'Buy', 'House', '7943 Vahlen Center', 'Chenxiang', 'China', 2, 1, 1, 222, false, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (7, 'sodales scelerisque', '$367204.67', 'consequat nulla nisl nunc nisl duis', 'Buy', 'House', '11965 Independence Plaza', 'Vurğun', 'Azerbaijan', 3, 3, 3, 203, true, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (58, 'lorem vitae', '$153306.82', 'augue vestibulum rutrum rutrum neque', 'Buy', 'House', '34878 7th Park', 'Stockholm', 'Sweden', 1, 3, 2, 242, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'augue', '$261040.78', 'pellentesque volutpat dui maecenas tristique est et tempus semper est', 'Buy', 'House', '068 Park Meadow Point', 'Jiangkou', 'China', 1, 2, 3, 212, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (12, 'nulla', '$27904.74', 'nulla neque libero convallis eget eleifend luctus ultricies eu nibh quisque id justo sit amet', 'Buy', 'House', '57 Ruskin Alley', 'Pawak', 'Philippines', 1, 4, 2, 181, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'pellentesque', '$453023.85', 'vitae mattis nibh ligula nec sem duis aliquam convallis nunc', 'Buy', 'House', '2128 Nancy Drive', 'Dankunku', 'Gambia', 3, 1, 3, 191, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (68, 'ipsum', '$422011.63', 'mauris eget massa tempor', 'Buy', 'House', '54 Kings Pass', 'Seso', 'Indonesia', 1, 4, 4, 166, true, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (67, 'quis turpis', '$358241.10', 'integer tincidunt', 'Buy', 'House', '74 Morrow Crossing', 'Huangkeng', 'China', 1, 3, 3, 217, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'ultrices libero non', '$315321.62', 'morbi odio odio elementum eu interdum eu tincidunt in leo', 'Buy', 'House', '14248 Grayhawk Hill', 'Chengjiao', 'China', 1, 1, 2, 217, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (100, 'blandit lacinia', '$238419.81', 'nam dui proin leo', 'Buy', 'House', '167 Jana Avenue', 'Omaha', 'United States', 3, 2, 1, 223, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (60, 'nunc purus', '$341889.48', 'mi nulla ac enim in tempor turpis nec euismod', 'Buy', 'House', '1 Hooker Road', 'Tarouca', 'Portugal', 2, 4, 1, 199, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (33, 'euismod scelerisque quam turpis', '$157508.81', 'justo etiam', 'Buy', 'House', '26668 Spenser Way', 'Fucheng', 'China', 1, 2, 3, 166, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'vestibulum quam sapien', '$201335.77', 'consequat lectus in est risus auctor sed tristique in tempus', 'Buy', 'House', '96008 Shoshone Place', 'Taldan', 'Russia', 2, 2, 3, 222, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (32, 'gravida nisi at', '$152855.79', 'lobortis convallis tortor risus dapibus augue vel accumsan tellus nisi eu orci mauris lacinia sapien', 'Buy', 'House', '94629 Sommers Park', 'Depok', 'Indonesia', 3, 4, 1, 192, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (28, 'nullam porttitor', '$327404.05', 'mauris sit amet eros suspendisse accumsan tortor quis turpis sed ante vivamus tortor duis', 'Buy', 'House', '2 Grasskamp Pass', 'Minzheng', 'China', 3, 4, 1, 208, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'pulvinar', '$454694.80', 'eget semper rutrum nulla nunc purus phasellus in felis donec semper sapien a libero', 'Buy', 'House', '689 Marquette Street', 'Reckange-sur-Mess', 'Luxembourg', 3, 4, 2, 248, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (9, 'aliquam convallis nunc', '$203807.37', 'lacus purus aliquet at feugiat non pretium quis lectus suspendisse', 'Buy', 'House', '8036 Linden Crossing', 'Aţ Ţafīlah', 'Jordan', 2, 1, 1, 226, false, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'ut massa', '$424927.15', 'tortor quis turpis', 'Buy', 'House', '5 Sunfield Drive', 'Cariaco', 'Venezuela', 1, 3, 4, 179, true, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (43, 'tortor risus', '$220345.04', 'risus praesent lectus vestibulum quam sapien varius ut blandit non interdum', 'Buy', 'House', '101 Darwin Hill', 'Itanhaém', 'Brazil', 3, 4, 4, 202, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (19, 'dis parturient', '$462439.28', 'orci luctus et ultrices posuere cubilia curae duis faucibus accumsan odio', 'Buy', 'House', '2354 Katie Park', 'Fāryāb', 'Iran', 1, 4, 3, 203, false, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'quam sollicitudin', '$16029.46', 'ultrices vel augue vestibulum ante ipsum primis in faucibus orci', 'Buy', 'House', '92 Ridgeview Crossing', 'San Jose Village', 'Northern Mariana Islands', 1, 3, 2, 237, false, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'in', '$94828.48', 'tortor sollicitudin mi sit amet lobortis sapien sapien non mi integer ac neque duis bibendum', 'Buy', 'House', '05218 Montana Alley', 'Volodymyr-Volyns’kyy', 'Ukraine', 1, 3, 1, 222, false, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (46, 'ante vestibulum', '$236281.22', 'sed justo pellentesque viverra pede', 'Buy', 'House', '7508 Merchant Circle', 'Itbayat', 'Philippines', 1, 1, 2, 249, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (86, 'quam sapien', '$111560.29', 'ut nunc vestibulum ante ipsum primis in faucibus orci', 'Buy', 'House', '87 3rd Plaza', 'Fenghuanglu', 'China', 3, 4, 3, 232, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (57, 'neque duis', '$178257.62', 'vel enim sit amet nunc viverra dapibus nulla suscipit ligula', 'Buy', 'House', '5006 Cody Court', 'Gornji Grad', 'Slovenia', 3, 1, 1, 227, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (84, 'sit amet', '$426779.53', 'interdum in ante vestibulum ante ipsum primis', 'Buy', 'House', '7 Bultman Circle', 'Vaitogi', 'American Samoa', 3, 1, 3, 177, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'dolor', '$110326.93', 'rutrum nulla tellus in sagittis dui vel nisl duis ac', 'Buy', 'House', '42 Elmside Court', 'Choa Saidān Shāh', 'Pakistan', 3, 1, 2, 233, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (15, 'mattis odio donec vitae', '$11447.87', 'velit donec diam neque vestibulum eget vulputate', 'Buy', 'House', '63014 Park Meadow Pass', 'Coyaima', 'Colombia', 1, 4, 3, 167, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (65, 'eget', '$245728.41', 'orci luctus et ultrices posuere cubilia', 'Buy', 'House', '0450 Logan Crossing', 'Shiniujiang', 'China', 1, 3, 2, 174, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'sit amet diam', '$478323.46', 'non', 'Buy', 'House', '3 Gale Pass', 'El Aguacate', 'Mexico', 2, 3, 2, 174, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (79, 'luctus cum sociis', '$48243.12', 'mi integer ac neque duis bibendum morbi non quam nec dui', 'Buy', 'House', '742 Beilfuss Parkway', 'Tarlac City', 'Philippines', 1, 1, 1, 164, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (91, 'nulla ac enim', '$412220.05', 'amet justo', 'Buy', 'House', '82 Hanson Junction', 'Bitobe', 'Indonesia', 3, 3, 1, 210, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (26, 'quis orci eget', '$114840.72', 'phasellus id sapien in sapien iaculis congue', 'Buy', 'House', '796 Grim Circle', 'Zhouling', 'China', 3, 1, 1, 169, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (62, 'congue', '$279347.35', 'porta volutpat erat quisque erat eros', 'Buy', 'House', '9804 Raven Alley', 'Cikijing', 'Indonesia', 3, 2, 2, 166, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (58, 'dapibus duis at', '$203099.99', 'ridiculus mus vivamus vestibulum sagittis', 'Buy', 'House', '12396 Manitowish Pass', 'Dniprovka', 'Ukraine', 2, 4, 1, 155, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'imperdiet nullam orci pede', '$437955.42', 'mus vivamus vestibulum sagittis sapien cum sociis natoque penatibus et', 'Buy', 'House', '90 Monterey Hill', 'Strawczyn', 'Poland', 3, 1, 2, 210, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (17, 'quis', '$63294.45', 'sem duis aliquam convallis', 'Buy', 'House', '6 Pleasure Avenue', 'Choisy-le-Roi', 'France', 2, 1, 4, 245, true, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (68, 'non mauris', '$121540.32', 'nisl aenean lectus pellentesque eget nunc donec quis orci eget', 'Buy', 'House', '2 Corben Lane', 'Peñaflor', 'Chile', 3, 4, 4, 236, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (79, 'placerat praesent blandit', '$416373.43', 'dolor morbi vel lectus in quam fringilla rhoncus mauris enim leo rhoncus sed vestibulum', 'Buy', 'House', '52 Rockefeller Center', 'Markala', 'Mali', 3, 3, 4, 202, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (75, 'morbi', '$307998.41', 'pede libero quis orci nullam molestie nibh', 'Buy', 'House', '79 Forest Dale Park', 'Rameshki', 'Russia', 2, 4, 1, 162, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (25, 'nec', '$423933.10', 'vel augue vestibulum rutrum', 'Buy', 'House', '8 Sugar Crossing', 'Aviúges', 'Portugal', 3, 1, 3, 197, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'in tempus sit', '$445655.85', 'pede justo lacinia eget tincidunt', 'Buy', 'House', '20 Kings Park', 'Surat Thani', 'Thailand', 1, 3, 1, 197, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (33, 'sit', '$208223.17', 'ut rhoncus', 'Buy', 'House', '47 Elgar Center', 'Port Saint John’s', 'South Africa', 3, 2, 3, 173, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (12, 'rutrum rutrum neque aenean', '$381135.79', 'augue aliquam erat volutpat in congue etiam justo etiam pretium iaculis justo in', 'Buy', 'House', '7 Upham Road', 'Zgornje Pirniče', 'Slovenia', 2, 2, 2, 243, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'vel augue vestibulum rutrum', '$227191.91', 'sagittis dui vel nisl duis ac nibh fusce lacus purus aliquet at feugiat', 'Buy', 'House', '20475 Tennyson Lane', 'Sinjil', 'Palestinian Territory', 1, 3, 3, 155, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (16, 'vestibulum', '$436506.36', 'nulla nisl nunc nisl duis bibendum felis sed interdum venenatis turpis', 'Buy', 'House', '1215 Fisk Trail', 'Picoto', 'Portugal', 3, 1, 3, 197, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'etiam pretium', '$11127.89', 'pede morbi porttitor lorem id', 'Buy', 'House', '4 Hazelcrest Terrace', 'Russeifa', 'Jordan', 2, 2, 2, 246, true, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (23, 'aliquam erat volutpat in', '$348306.47', 'molestie lorem quisque ut', 'Buy', 'House', '0 Sunnyside Alley', 'Montelíbano', 'Colombia', 2, 3, 2, 192, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (35, 'eu interdum', '$407710.05', 'sed vel enim sit amet nunc viverra dapibus nulla', 'Buy', 'House', '9664 Lawn Trail', 'Samho-rodongjagu', 'North Korea', 3, 4, 3, 151, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (54, 'faucibus orci luctus et', '$435245.85', 'aliquam augue quam sollicitudin vitae consectetuer eget rutrum', 'Buy', 'House', '18222 Graedel Trail', 'Ishiki', 'Japan', 1, 3, 3, 206, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (36, 'congue', '$236582.13', 'integer a nibh in quis justo maecenas rhoncus aliquam lacus morbi quis', 'Buy', 'House', '09001 Farmco Terrace', 'Zengji', 'China', 1, 2, 1, 193, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'in eleifend', '$377894.47', 'volutpat convallis morbi odio', 'Buy', 'House', '31335 Garrison Trail', 'Fort-de-France', 'Martinique', 3, 2, 2, 207, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (47, 'luctus et', '$276865.51', 'massa id lobortis convallis tortor', 'Buy', 'House', '6 Westerfield Pass', 'Zhangjiayuan', 'China', 3, 2, 3, 225, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (69, 'neque', '$399376.95', 'ut massa volutpat convallis morbi odio odio elementum eu', 'Buy', 'House', '42589 Rigney Trail', 'Hongqi', 'China', 1, 3, 2, 151, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'non pretium', '$83819.33', 'nisl nunc rhoncus', 'Buy', 'House', '99 Vahlen Center', 'Dashiju', 'China', 1, 3, 1, 166, false, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'maecenas ut massa quis', '$209430.61', 'mattis pulvinar nulla', 'Buy', 'House', '104 Jana Crossing', 'Huangtugang', 'China', 1, 1, 2, 152, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (35, 'ante', '$324652.56', 'turpis', 'Buy', 'House', '0492 John Wall Junction', 'Dijon', 'France', 1, 4, 1, 199, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'nec condimentum', '$227940.47', 'eget eleifend luctus ultricies eu nibh quisque', 'Buy', 'House', '86268 Lakeland Drive', 'Auxerre', 'France', 2, 2, 4, 242, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'nulla', '$185974.42', 'rutrum at lorem integer', 'Buy', 'House', '18 Amoth Pass', 'Pita', 'Guinea', 1, 2, 3, 159, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (84, 'at vulputate vitae nisl', '$300071.81', 'dui vel nisl duis ac nibh fusce lacus purus aliquet at feugiat non pretium quis lectus', 'Buy', 'House', '8 Blackbird Center', 'Huimin', 'China', 1, 4, 4, 239, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (88, 'accumsan felis ut', '$337627.70', 'eu massa donec dapibus duis at velit eu est congue elementum in', 'Buy', 'House', '8 Saint Paul Street', 'Mandi Bahāuddīn', 'Pakistan', 3, 4, 2, 244, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vestibulum vestibulum ante', '$395530.51', 'luctus tincidunt nulla mollis', 'Buy', 'House', '1474 Dahle Road', 'Pai do Vento', 'Portugal', 1, 3, 1, 185, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (59, 'molestie lorem quisque ut', '$276227.81', 'amet eros suspendisse accumsan tortor quis', 'Buy', 'House', '533 Delladonna Circle', 'Meijiang', 'China', 3, 2, 3, 245, false, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'id', '$38573.55', 'luctus nec molestie sed justo pellentesque viverra pede ac', 'Buy', 'House', '59034 Continental Drive', 'Bella Vista', 'Argentina', 1, 3, 2, 212, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (43, 'sed magna', '$178218.48', 'erat vestibulum sed magna at nunc commodo placerat praesent', 'Buy', 'House', '269 Graceland Terrace', 'Karolinka', 'Czech Republic', 3, 3, 4, 173, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (52, 'lectus in', '$90581.43', 'morbi porttitor lorem id ligula suspendisse ornare', 'Buy', 'House', '60 Bartillon Drive', 'Rancamaya', 'Indonesia', 2, 1, 1, 155, false, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'justo pellentesque viverra', '$352048.85', 'et tempus semper est quam pharetra magna ac consequat metus sapien ut', 'Buy', 'House', '0186 Marquette Street', 'Alençon', 'France', 1, 3, 3, 153, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'in faucibus orci', '$343045.14', 'neque aenean auctor gravida sem praesent id massa id nisl venenatis lacinia aenean', 'Buy', 'House', '16284 Kinsman Crossing', 'Sipocot', 'Philippines', 3, 2, 3, 186, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (45, 'mollis', '$156391.71', 'vulputate luctus cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus', 'Buy', 'House', '40 Lakeland Pass', 'Charagua', 'Bolivia', 1, 4, 1, 214, true, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (66, 'tortor duis', '$297732.64', 'donec vitae', 'Buy', 'House', '420 Dakota Center', 'Tanumshede', 'Sweden', 2, 1, 1, 245, false, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (83, 'nullam orci', '$57764.17', 'curae donec pharetra magna', 'Buy', 'House', '6 Emmet Trail', 'Auriflama', 'Brazil', 1, 1, 3, 162, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'amet justo morbi ut', '$105791.89', 'tristique est et tempus semper est', 'Buy', 'House', '38 Hoard Junction', 'Lajeado', 'Brazil', 1, 2, 2, 160, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'ultrices', '$141016.69', 'penatibus et magnis', 'Buy', 'House', '98 School Court', 'Medvezh’yegorsk', 'Russia', 3, 2, 1, 173, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'ipsum', '$231743.03', 'tortor risus dapibus augue vel accumsan', 'Buy', 'House', '17484 Debs Hill', 'Changtian', 'China', 3, 3, 2, 216, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (81, 'adipiscing elit proin', '$255068.33', 'id mauris vulputate elementum nullam varius nulla facilisi cras non velit', 'Buy', 'House', '2 Oakridge Court', 'Maia', 'Portugal', 1, 4, 2, 173, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (24, 'vel lectus in', '$476589.55', 'amet sem fusce consequat nulla', 'Buy', 'House', '1 Eastlawn Pass', 'Yuannan', 'China', 3, 4, 4, 245, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (76, 'dictumst', '$313177.15', 'at velit eu est congue elementum in hac habitasse platea', 'Buy', 'House', '390 Arkansas Drive', 'La Motte-Servolex', 'France', 3, 3, 4, 216, false, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vivamus', '$208013.73', 'maecenas rhoncus aliquam lacus morbi quis tortor', 'Buy', 'House', '918 Anzinger Road', 'São Pedro', 'Portugal', 1, 1, 3, 207, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (44, 'etiam faucibus', '$208805.87', 'ut nulla sed accumsan felis', 'Buy', 'House', '7575 Onsgard Park', 'Oliveirinha', 'Portugal', 3, 4, 3, 224, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (19, 'dapibus duis', '$496172.81', 'semper sapien a libero nam dui proin leo', 'Buy', 'House', '0845 Acker Drive', 'Matingain', 'Philippines', 3, 4, 1, 176, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (56, 'posuere cubilia', '$121593.33', 'eros viverra eget congue', 'Buy', 'House', '6 Bartillon Center', 'Sumberjati', 'Indonesia', 2, 4, 4, 152, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (77, 'nunc nisl duis bibendum', '$336020.65', 'quisque porta volutpat erat quisque erat eros viverra eget', 'Buy', 'House', '20580 Steensland Circle', 'Refojos', 'Portugal', 1, 3, 4, 188, true, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'metus vitae ipsum', '$358214.73', 'nisi', 'Buy', 'House', '432 Prairie Rose Lane', 'Thạnh Mỹ', 'Vietnam', 1, 2, 1, 203, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (23, 'magna vulputate luctus cum', '$417563.67', 'lacus curabitur at ipsum ac tellus semper interdum mauris ullamcorper purus', 'Buy', 'House', '2586 Farwell Crossing', 'Tomiya', 'Japan', 1, 3, 3, 220, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'sit amet lobortis sapien', '$473571.89', 'lorem integer tincidunt ante vel ipsum praesent blandit lacinia erat vestibulum sed magna at nunc commodo', 'Buy', 'House', '9806 Bunker Hill Court', 'Chum Phuang', 'Thailand', 1, 3, 2, 232, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'potenti', '$323151.08', 'arcu adipiscing molestie hendrerit at vulputate vitae nisl aenean', 'Buy', 'House', '30351 Vera Hill', 'Garawati', 'Indonesia', 2, 1, 3, 233, false, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (98, 'curae nulla dapibus', '$476891.08', 'ac enim in tempor', 'Buy', 'House', '396 Declaration Avenue', 'San Pedro', 'Mexico', 3, 2, 4, 185, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (63, 'praesent lectus vestibulum', '$74579.70', 'nam nulla integer pede justo lacinia eget tincidunt eget tempus vel pede', 'Buy', 'House', '05 Main Junction', 'Macaíba', 'Brazil', 3, 2, 1, 191, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'suspendisse potenti cras in', '$50440.69', 'eu mi nulla ac enim in tempor turpis nec euismod', 'Buy', 'House', '7815 Columbus Court', 'Titab', 'Indonesia', 3, 2, 1, 182, false, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'eget', '$278516.82', 'a libero nam dui', 'Buy', 'House', '21955 Northland Street', 'Västerås', 'Sweden', 3, 2, 2, 179, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'eget eros elementum pellentesque', '$448893.39', 'sapien iaculis congue vivamus metus arcu adipiscing molestie', 'Buy', 'House', '1410 Burrows Crossing', 'Kuanghe', 'China', 1, 2, 2, 177, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (9, 'ipsum praesent blandit lacinia', '$252470.38', 'id nisl venenatis lacinia aenean sit amet justo morbi ut odio', 'Buy', 'House', '08882 Helena Junction', 'Rochester', 'United States', 3, 3, 4, 170, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (81, 'in', '$417485.35', 'turpis a pede posuere nonummy integer non velit donec diam neque', 'Buy', 'House', '75 Blackbird Street', 'Galižana', 'Croatia', 2, 4, 1, 203, true, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'sed nisl nunc rhoncus', '$249950.96', 'vestibulum quam sapien', 'Buy', 'House', '797 Hoepker Circle', 'Antes', 'Portugal', 2, 3, 1, 181, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (7, 'convallis nulla', '$407194.93', 'in felis eu sapien cursus vestibulum proin eu', 'Buy', 'House', '5937 Carpenter Pass', 'Frederiksberg', 'Denmark', 1, 1, 4, 183, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'aenean lectus pellentesque eget', '$45748.33', 'non interdum in ante vestibulum ante ipsum', 'Buy', 'House', '2513 Bobwhite Parkway', 'Nalbandyan', 'Armenia', 3, 3, 1, 225, false, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'sem duis aliquam', '$242670.41', 'maecenas tristique est et tempus', 'Buy', 'House', '852 Beilfuss Hill', 'San Juan', 'Philippines', 2, 2, 3, 172, true, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'sollicitudin vitae', '$202328.64', 'luctus cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus vivamus', 'Buy', 'House', '6 Continental Crossing', 'Caimitillo', 'Panama', 3, 4, 2, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'nunc', '$317183.13', 'leo odio porttitor id', 'Buy', 'House', '23 Lake View Court', 'Banjar Sambangan', 'Indonesia', 1, 4, 2, 178, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (87, 'ut at', '$127622.38', 'lorem integer tincidunt ante vel ipsum praesent blandit lacinia erat vestibulum sed', 'Buy', 'House', '761 Eastwood Place', 'Yŏnggwang-ŭp', 'North Korea', 3, 2, 4, 167, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (67, 'odio odio elementum eu', '$183304.70', 'nibh', 'Buy', 'House', '7 Little Fleur Road', 'Petrodvorets', 'Russia', 3, 3, 1, 205, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'nunc', '$226857.31', 'nibh in hac habitasse platea dictumst aliquam augue', 'Buy', 'House', '9 Mayer Parkway', 'Houston', 'United States', 3, 3, 2, 203, true, 2, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (63, 'justo etiam pretium iaculis', '$239850.22', 'nunc proin at turpis a pede posuere nonummy integer non velit', 'Buy', 'House', '7635 Kenwood Point', 'Zhangyelu', 'China', 1, 4, 2, 181, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'justo', '$101006.19', 'curae nulla dapibus dolor vel est donec odio justo sollicitudin ut suscipit a feugiat et', 'Buy', 'House', '58 Reinke Junction', 'Matola', 'Mozambique', 1, 1, 1, 216, true, 4, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'tristique tortor eu pede', '$195214.72', 'dis parturient montes nascetur ridiculus mus etiam vel augue vestibulum rutrum rutrum neque aenean auctor', 'Buy', 'House', '36821 Oneill Circle', 'Tiron', 'Indonesia', 2, 2, 4, 179, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (82, 'ut tellus', '$437110.63', 'posuere', 'Buy', 'House', '38 Green Ridge Alley', 'Altıağac', 'Azerbaijan', 3, 4, 2, 226, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'morbi', '$205003.40', 'ipsum', 'Buy', 'House', '00349 Bartelt Court', 'Oropéndolas', 'Honduras', 1, 4, 2, 171, false, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (28, 'sollicitudin mi sit amet', '$206600.60', 'consequat varius integer ac', 'Buy', 'House', '72 Butternut Parkway', 'Pentecoste', 'Brazil', 1, 1, 1, 190, false, 1, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'nulla integer pede', '$277523.81', 'odio', 'Buy', 'House', '1 American Circle', 'Lafayette', 'United States', 3, 1, 4, 211, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vestibulum ante', '$33993.25', 'interdum mauris ullamcorper purus sit amet nulla quisque arcu libero rutrum ac lobortis vel', 'Buy', 'House', '8941 Northridge Center', 'Heshi', 'China', 3, 4, 4, 223, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'eget', '$338993.42', 'dui nec nisi volutpat eleifend donec ut dolor morbi vel lectus in quam fringilla', 'Buy', 'House', '19 Hansons Alley', 'Ngeni', 'Indonesia', 1, 3, 1, 183, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'odio cras mi', '$447461.59', 'mus vivamus vestibulum sagittis sapien cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus', 'Buy', 'House', '85168 Chive Way', 'Novobeysugskaya', 'Russia', 1, 2, 2, 189, false, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (50, 'ut odio cras', '$194921.41', 'et eros vestibulum ac est lacinia', 'Buy', 'House', '25 Lerdahl Park', 'Pokrov', 'Russia', 2, 2, 3, 162, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (100, 'pede lobortis ligula sit', '$373356.00', 'et magnis dis parturient montes nascetur ridiculus mus etiam vel augue vestibulum rutrum rutrum neque', 'Buy', 'House', '52831 Colorado Park', 'Kedawung', 'Indonesia', 2, 2, 1, 172, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'turpis', '$53515.43', 'sollicitudin', 'Buy', 'House', '9 Grayhawk Crossing', 'Banyubang', 'Indonesia', 3, 4, 4, 199, true, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'sem mauris laoreet ut', '$417029.22', 'in faucibus orci luctus et ultrices posuere cubilia', 'Buy', 'House', '50 Leroy Place', 'Bhairāhawā', 'Nepal', 3, 2, 1, 166, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (39, 'nisl duis bibendum', '$90860.95', 'id luctus nec molestie sed justo pellentesque viverra pede ac diam cras', 'Buy', 'House', '3143 Granby Trail', 'Gombang', 'Indonesia', 2, 1, 4, 212, false, 4, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'tempor', '$476870.74', 'enim sit amet nunc viverra dapibus nulla suscipit ligula in', 'Buy', 'House', '2 Amoth Alley', 'Wenquan', 'China', 1, 1, 1, 152, false, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'ut massa', '$44759.04', 'magna bibendum imperdiet nullam orci pede venenatis non sodales', 'Buy', 'House', '3 Farragut Pass', 'Goge', 'Indonesia', 1, 4, 2, 245, true, 3, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'tortor risus dapibus', '$265366.71', 'sed tincidunt eu felis fusce posuere felis sed lacus morbi sem mauris', 'Buy', 'House', '879 Banding Street', 'Osypenko', 'Ukraine', 3, 1, 1, 193, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (8, 'at nulla suspendisse potenti', '$46879.29', 'suspendisse ornare consequat lectus in est risus auctor sed tristique in tempus sit amet', 'Buy', 'House', '03469 Vermont Alley', 'Bāgh-e Maīdān', 'Afghanistan', 3, 2, 3, 210, true, 1, true); From b4dd3ce5163a5b76d515ab659ba5ee4040db54bb Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Tue, 26 Oct 2021 00:34:20 +0300 Subject: [PATCH 15/47] handle error 404, 500 , and set setting for production #5 --- .eslintrc.json | 2 +- .vscode/settings.json | 7 +++++++ client/package.json | 1 + server/app.js | 16 +++++++++++++++- server/controllers/errors/index.js | 4 ++++ server/controllers/errors/notFoundError.js | 6 ++++++ server/controllers/errors/serverError.js | 6 ++++++ server/index.js | 7 +++---- server/routes/index.js | 8 ++++++++ 9 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 server/controllers/errors/index.js create mode 100644 server/controllers/errors/notFoundError.js create mode 100644 server/controllers/errors/serverError.js diff --git a/.eslintrc.json b/.eslintrc.json index 41fee36..7276943 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "airbnb-base" ], "parserOptions": { - "ecmaVersion": 12 + "ecmaVersion": "latest" }, "rules": { } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c3a7563 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "git.ignoreLimitWarning": true, + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + } + } \ No newline at end of file diff --git a/client/package.json b/client/package.json index aa8d067..b900884 100644 --- a/client/package.json +++ b/client/package.json @@ -2,6 +2,7 @@ "name": "client", "version": "0.1.0", "private": true, + "proxy": "http://localhost:5000", "dependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", diff --git a/server/app.js b/server/app.js index 7d0c531..f2fd85b 100644 --- a/server/app.js +++ b/server/app.js @@ -1,8 +1,10 @@ const express = require('express'); +const { join } = require('path'); const compression = require('compression'); const cookieParser = require('cookie-parser'); +const router = require('./routes'); -const { env: { PORT } } = process; +const { env: { PORT, NODE_ENV } } = process; const app = express(); @@ -13,5 +15,17 @@ app.use(express.json()); app.use(compression()); app.use(cookieParser()); app.disable('x-powered-by'); +app.use('/api/v1/', router); +if (NODE_ENV === 'development') { + app.get('/', (req, res) => { + res.json({ message: 'server running' }); + }); +} +if (NODE_ENV === 'production') { + app.use(express.static(join(__dirname, '..', 'client', 'build'))); + app.get('*', (req, res) => { + res.sendFile(join(__dirname, '..', 'client', 'build', 'index.html')); + }); +} module.exports = app; diff --git a/server/controllers/errors/index.js b/server/controllers/errors/index.js new file mode 100644 index 0000000..2f5087f --- /dev/null +++ b/server/controllers/errors/index.js @@ -0,0 +1,4 @@ +const notFoundError = require('./notFoundError'); +const serverError = require('./serverError'); + +module.exports = { serverError, notFoundError }; diff --git a/server/controllers/errors/notFoundError.js b/server/controllers/errors/notFoundError.js new file mode 100644 index 0000000..70ecd71 --- /dev/null +++ b/server/controllers/errors/notFoundError.js @@ -0,0 +1,6 @@ +/* eslint-disable no-unused-vars */ +const notFoundError = (req, res, next) => { + res.status(404).json({ message: 'Page Not Found' }); +}; + +module.exports = notFoundError; diff --git a/server/controllers/errors/serverError.js b/server/controllers/errors/serverError.js new file mode 100644 index 0000000..d77be96 --- /dev/null +++ b/server/controllers/errors/serverError.js @@ -0,0 +1,6 @@ +/* eslint-disable no-unused-vars */ +const serverError = (req, res, next) => { + res.status(500).json({ message: 'Server Error' }); +}; + +module.exports = serverError; diff --git a/server/index.js b/server/index.js index 6bbc826..991b1f9 100644 --- a/server/index.js +++ b/server/index.js @@ -1,9 +1,8 @@ -require('env2')('.env'); const app = require('./app'); -const PORT = app.get('port'); +const port = app.get('port'); -app.listen(PORT, () => { +app.listen(port, () => { // eslint-disable-next-line no-console - console.log(`server is running at http://localhost:${PORT}`); + console.log(`server is running at http://localhost:${port}`); }); diff --git a/server/routes/index.js b/server/routes/index.js index e69de29..f041226 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -0,0 +1,8 @@ +const express = require('express'); +const { notFoundError, serverError } = require('../controllers/errors'); + +const router = express.Router(); + +router.use(notFoundError); +router.use(serverError); +module.exports = router; From 9205054c62482fb81a342f4b2fb92bdad6889281 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 06:25:35 +0300 Subject: [PATCH 16/47] remove line comment --- server/controllers/middleware/auth/createToken.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js index 6d3830b..9fa19b1 100644 --- a/server/controllers/middleware/auth/createToken.js +++ b/server/controllers/middleware/auth/createToken.js @@ -1,6 +1,5 @@ const {sign} = require('jsonwebtoken'); module.exports = (req, res, next) => { - //user => object (name, email, phone) const payload = req.user; const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); res.cookie('token', accessToken); From 3dd27b5674961487f698f1d922f828123db3fd82 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 07:03:18 +0300 Subject: [PATCH 17/47] status for create #9 --- server/controllers/middleware/auth/createToken.js | 4 +++- server/controllers/users/signup.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 server/controllers/users/signup.js diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js index 9fa19b1..64a5f33 100644 --- a/server/controllers/middleware/auth/createToken.js +++ b/server/controllers/middleware/auth/createToken.js @@ -2,5 +2,7 @@ const {sign} = require('jsonwebtoken'); module.exports = (req, res, next) => { const payload = req.user; const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); - res.cookie('token', accessToken); + res.status(201).cookie('token', accessToken, { + httpOnly: true + }); } \ No newline at end of file diff --git a/server/controllers/users/signup.js b/server/controllers/users/signup.js new file mode 100644 index 0000000..b214d83 --- /dev/null +++ b/server/controllers/users/signup.js @@ -0,0 +1,13 @@ +const signUpSchema = require("../../utils/validation/signUpSchema") +const { hash } = require('bcrypt'); +const signUpQuery = require('../../database/quieres/account/signUp'); +module.exports = async (req,res,next)=>{ + try{ + const {username,password,email,phone} = await signUpSchema.validate(req.body); + const hasedPswrd = await hash(password, 8); + const user = await signUpQuery(username,email,phone,hasedPswrd); + + }catch(err){ + + } +} \ No newline at end of file From bb096c25619029f19004e9d5fb2aac2fe0e5f065 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 10:11:37 +0300 Subject: [PATCH 18/47] resolve error #5 --- server/controllers/errors/serverError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/errors/serverError.js b/server/controllers/errors/serverError.js index d77be96..46394ee 100644 --- a/server/controllers/errors/serverError.js +++ b/server/controllers/errors/serverError.js @@ -1,5 +1,5 @@ /* eslint-disable no-unused-vars */ -const serverError = (req, res, next) => { +const serverError = (req, res, next, err) => { res.status(500).json({ message: 'Server Error' }); }; From 65575af29ecff198fa3db8312d3685a8420bb292 Mon Sep 17 00:00:00 2001 From: ameera abedalnaser Date: Tue, 26 Oct 2021 10:57:04 +0300 Subject: [PATCH 19/47] update-fack-data related #6 --- server/database/config/adminsFack Data.sql | 153 +----------------- server/database/config/agentsFackData.sql | 156 +------------------ server/database/config/imagesFackData.sql | 156 +------------------ server/database/config/realStateFackData.sql | 144 ----------------- 4 files changed, 15 insertions(+), 594 deletions(-) diff --git a/server/database/config/adminsFack Data.sql b/server/database/config/adminsFack Data.sql index 3dfafae..2a33e7d 100644 --- a/server/database/config/adminsFack Data.sql +++ b/server/database/config/adminsFack Data.sql @@ -1,150 +1,3 @@ -insert into admins (username, password , email) values ('Bobbie Fendt', 'PpIaalr9H', 'bfendt0@blogspot.com'); -insert into admins (username, password , email) values ('Noni Djurdjevic', 'rm8TDCjVl0W', 'ndjurdjevic1@icq.com'); -insert into admins (username, password , email) values ('Kizzie Maliphant', 'J4D9p9', 'kmaliphant2@php.net'); -insert into admins (username, password , email) values ('Janenna Muncer', 'zalXyYdHf6rj', 'jmuncer3@usgs.gov'); -insert into admins (username, password , email) values ('Stormie Tupman', 'RFlj1q', 'stupman4@ucsd.edu'); -insert into admins (username, password , email) values ('Iolande Hannon', 'MJxajHSl2rAc', null); -insert into admins (username, password , email) values ('Jarrod Pichmann', '0fhvHkw3RH', 'jpichmann6@marriott.com'); -insert into admins (username, password , email) values ('Rodney Silmon', '92LzsyZ', 'rsilmon7@cdc.gov'); -insert into admins (username, password , email) values ('Colin Meco', 'tfJJ98XtHvt', 'cmeco8@state.gov'); -insert into admins (username, password , email) values ('Emylee Tremblet', 'JBuEFGDSk', 'etremblet9@google.com.br'); -insert into admins (username, password , email) values ('Fionnula Carn', 'IbtdNj8u', null); -insert into admins (username, password , email) values ('Netty O''Ferris', 'x7SBX6u3', 'noferrisb@discuz.net'); -insert into admins (username, password , email) values ('Davon Batkin', 'FESFc9vb', 'dbatkinc@nsw.gov.au'); -insert into admins (username, password , email) values ('Lilian Newall', 'Atpa42S7kU', 'lnewalld@google.co.jp'); -insert into admins (username, password , email) values ('Tabby ducarme', 'up2tGLZZ5', 'tducarmee@diigo.com'); -insert into admins (username, password , email) values ('Kari Dron', 'V26b2nSW', 'kdronf@china.com.cn'); -insert into admins (username, password , email) values ('Harmony Littrik', 'GdxrpA4', 'hlittrikg@dion.ne.jp'); -insert into admins (username, password , email) values ('Irwin Thieme', 'cxiD1Q8C1', 'ithiemeh@aol.com'); -insert into admins (username, password , email) values ('Eolande Hattersley', 'ZLWk75Q7ops', 'ehattersleyi@wordpress.org'); -insert into admins (username, password , email) values ('Whitman Flarity', 'uSm5m1Vs', 'wflarityj@oaic.gov.au'); -insert into admins (username, password , email) values ('Andrei Marion', 'FCpcxaZ9DM', 'amarionk@google.co.uk'); -insert into admins (username, password , email) values ('Crissie Peer', 'XzEek1edn79', 'cpeerl@pagesperso-orange.fr'); -insert into admins (username, password , email) values ('Cathlene Osbourn', 'uOaKt4a', 'cosbournm@hp.com'); -insert into admins (username, password , email) values ('Jojo Marques', 'mHWH2iC', 'jmarquesn@nyu.edu'); -insert into admins (username, password , email) values ('Berget Hathwood', 'pbtMeoSUBq', 'bhathwoodo@so-net.ne.jp'); -insert into admins (username, password , email) values ('Hal Tschirasche', 'BNP5J4I', 'htschiraschep@fc2.com'); -insert into admins (username, password , email) values ('Tatiania Fleetwood', 'dVxq1OP3J', null); -insert into admins (username, password , email) values ('Jacquenetta Camilli', 'i7IjxSRMX', null); -insert into admins (username, password , email) values ('Waite Steynor', 'd8ed6a', null); -insert into admins (username, password , email) values ('Sascha Daunter', '5AqxXoh', 'sdauntert@biblegateway.com'); -insert into admins (username, password , email) values ('Garrard Eskriett', 'fzgAhE2', 'geskriettu@samsung.com'); -insert into admins (username, password , email) values ('Tresa Cankett', 'R4lFXY', 'tcankettv@springer.com'); -insert into admins (username, password , email) values ('Eduard Van Driel', '8B3GZDb9z', null); -insert into admins (username, password , email) values ('Theresita Jolin', 'LGFQ212', 'tjolinx@webs.com'); -insert into admins (username, password , email) values ('Dita Khilkov', 'Bo075o6A', null); -insert into admins (username, password , email) values ('Gorden Townrow', 'icExSxt', 'gtownrowz@purevolume.com'); -insert into admins (username, password , email) values ('Maisie Pawlicki', 'w8oZEKMQ', 'mpawlicki10@nyu.edu'); -insert into admins (username, password , email) values ('Fayre Dolan', 'q9nXnnSNtx', 'fdolan11@goodreads.com'); -insert into admins (username, password , email) values ('Issi Summerson', '3RLSIk', 'isummerson12@amazonaws.com'); -insert into admins (username, password , email) values ('Layla Doiley', 'Tp4ARn', 'ldoiley13@oracle.com'); -insert into admins (username, password , email) values ('Danila Nott', 'qLksmHybtS', null); -insert into admins (username, password , email) values ('Margaretha Abela', 'kmt7EJ5oSIp', 'mabela15@google.it'); -insert into admins (username, password , email) values ('Alexandra Nancekivell', 'PwON4A', 'anancekivell16@w3.org'); -insert into admins (username, password , email) values ('Venita Hulles', 'DeRq2Xg', 'vhulles17@drupal.org'); -insert into admins (username, password , email) values ('Marcos Smethurst', 'R79WWN', 'msmethurst18@nature.com'); -insert into admins (username, password , email) values ('Ruby Wellbeloved', 'hZm7H92mW', 'rwellbeloved19@yellowbook.com'); -insert into admins (username, password , email) values ('Vassily Kilbourne', 'ed5lAfBJK', 'vkilbourne1a@ebay.com'); -insert into admins (username, password , email) values ('Sigfried Finker', 'ER5ISdRBk', 'sfinker1b@geocities.jp'); -insert into admins (username, password , email) values ('Johan Dunton', 'Hokjm7TJt', 'jdunton1c@mac.com'); -insert into admins (username, password , email) values ('Ewart Holywell', 'kWmUiP3Oa', 'eholywell1d@storify.com'); -insert into admins (username, password , email) values ('Guglielma Nore', 'JnJpUDHND97w', 'gnore1e@rambler.ru'); -insert into admins (username, password , email) values ('Shena Balthasar', 'Ttzt4O', 'sbalthasar1f@goo.gl'); -insert into admins (username, password , email) values ('Ollie Cuffe', 'jP3i5i', 'ocuffe1g@netlog.com'); -insert into admins (username, password , email) values ('Dixie Cock', '5Ff3U61dE', 'dcock1h@hc360.com'); -insert into admins (username, password , email) values ('Katherina Whitticks', 'yLasmgO', 'kwhitticks1i@netvibes.com'); -insert into admins (username, password , email) values ('Diarmid Chaikovski', 'NGON43VWec', 'dchaikovski1j@ucoz.com'); -insert into admins (username, password , email) values ('Friedrick Fenner', 'wJjDiKDt', null); -insert into admins (username, password , email) values ('Bette Cluely', 'DPwQ2FUzc60', 'bcluely1l@nature.com'); -insert into admins (username, password , email) values ('Sheila Perllman', 'shQ4Net', 'sperllman1m@amazonaws.com'); -insert into admins (username, password , email) values ('Isa Brackenbury', 'aIAIQO', 'ibrackenbury1n@list-manage.com'); -insert into admins (username, password , email) values ('Jacquenette Swain', 'aE7zcpB', 'jswain1o@odnoklassniki.ru'); -insert into admins (username, password , email) values ('Helen-elizabeth Joderli', '2SQ3ao97BqTK', 'hjoderli1p@e-recht24.de'); -insert into admins (username, password , email) values ('Clari Sunshine', 'xq9rIrIRzdt9', 'csunshine1q@shareasale.com'); -insert into admins (username, password , email) values ('Lorrie Lapsley', 'YYOBzT0oXW', 'llapsley1r@epa.gov'); -insert into admins (username, password , email) values ('Stormy Edgcombe', 'LOLqpzg', 'sedgcombe1s@ebay.co.uk'); -insert into admins (username, password , email) values ('Rodolph Chese', 'IkLhqPm', 'rchese1t@addtoany.com'); -insert into admins (username, password , email) values ('Merle Bridywater', 'bQFIzJtS', null); -insert into admins (username, password , email) values ('Kin Phil', 'cjzcOVgjVI', 'kphil1v@slideshare.net'); -insert into admins (username, password , email) values ('Leigha Birmingham', 'vDlYCrcBJL', 'lbirmingham1w@phoca.cz'); -insert into admins (username, password , email) values ('Scarlett Spurman', 'bfLiyuKWN5uQ', 'sspurman1x@washington.edu'); -insert into admins (username, password , email) values ('Booth D''Hooge', 'ParEPy', 'bdhooge1y@engadget.com'); -insert into admins (username, password , email) values ('Loree Wiffler', 'sN1WsgGbqUS', 'lwiffler1z@irs.gov'); -insert into admins (username, password , email) values ('Stefan Kirsch', 'q1hMjvMeP6', 'skirsch20@t-online.de'); -insert into admins (username, password , email) values ('Free Bevar', 'hTufEEXymoy', 'fbevar21@ibm.com'); -insert into admins (username, password , email) values ('Cathyleen Tubbles', 'MgW4Jwb5VK', 'ctubbles22@slate.com'); -insert into admins (username, password , email) values ('Rabbi Josephson', 'xrFvD4wj', 'rjosephson23@foxnews.com'); -insert into admins (username, password , email) values ('Isabeau Antonsson', 'zAPgYjO1vD', 'iantonsson24@wisc.edu'); -insert into admins (username, password , email) values ('Giustino Sperrett', 'Qx7DTzIfTS', 'gsperrett25@gizmodo.com'); -insert into admins (username, password , email) values ('Philip Gillean', '7E4CwgxY', 'pgillean26@tripod.com'); -insert into admins (username, password , email) values ('Hi Chilcott', 'iYJovT1SER', 'hchilcott27@msn.com'); -insert into admins (username, password , email) values ('Lianne Van der Velde', 'MYtWlfErxUA', 'lvan28@google.cn'); -insert into admins (username, password , email) values ('Marco O'' Faherty', 'KeNbshFv', 'mo29@boston.com'); -insert into admins (username, password , email) values ('Killie de Verson', 'vOnamaBDM', 'kde2a@icq.com'); -insert into admins (username, password , email) values ('Alejandro Brigham', '9stwvkrRHRMN', 'abrigham2b@mysql.com'); -insert into admins (username, password , email) values ('Goldi Lyle', 'aArEiQe21J', null); -insert into admins (username, password , email) values ('Maxi Hambelton', 'AH5aMrtG', null); -insert into admins (username, password , email) values ('Arabela Frankema', 'SOcw2AfC', 'afrankema2e@last.fm'); -insert into admins (username, password , email) values ('Jarret Eggins', 'z1eEBSQV', 'jeggins2f@bravesites.com'); -insert into admins (username, password , email) values ('Clea Wainscoat', 'VYGMwfpGkvjR', null); -insert into admins (username, password , email) values ('Wiatt Phizakarley', 'ZHG81KEv', 'wphizakarley2h@list-manage.com'); -insert into admins (username, password , email) values ('Matthiew Meachem', 'IA7mUrAiUXB', 'mmeachem2i@reference.com'); -insert into admins (username, password , email) values ('Denise Gerred', '87wJF8aIiZhN', 'dgerred2j@blogtalkradio.com'); -insert into admins (username, password , email) values ('Bonni LAbbet', 'dKNgiUKp', 'blabbet2k@irs.gov'); -insert into admins (username, password , email) values ('Isak Sams', 'JXLmhNTqLQn', null); -insert into admins (username, password , email) values ('Zorine Gavrielli', '3Rn6P9', 'zgavrielli2m@umich.edu'); -insert into admins (username, password , email) values ('Stanislaw Fidelli', 'X0rxvori0pB', 'sfidelli2n@msu.edu'); -insert into admins (username, password , email) values ('Hanna Durak', 'WIMBCLH6FaC', 'hdurak2o@cam.ac.uk'); -insert into admins (username, password , email) values ('Merill Sellman', 'wcUxHYPYl0', 'msellman2p@woothemes.com'); -insert into admins (username, password , email) values ('Nefen Culpan', 'SEgEHq4DciY', null); -insert into admins (username, password , email) values ('Bernarr MacNucator', 'a1EZSqRlL3', 'bmacnucator2r@businessweek.com'); -insert into admins (username, password , email) values ('Stefano Lembrick', '8ENOXC5', 'slembrick2s@npr.org'); -insert into admins (username, password , email) values ('Wendy Lembcke', 'caXU2D', 'wlembcke2t@rediff.com'); -insert into admins (username, password , email) values ('Allene Dillet', 'wmNLLH5zBR', 'adillet2u@fastcompany.com'); -insert into admins (username, password , email) values ('Evelyn Reavey', 'xqA1T5ZMKd7q', 'ereavey2v@vimeo.com'); -insert into admins (username, password , email) values ('Rosanna Rosengart', 'O50QvoVq', 'rrosengart2w@topsy.com'); -insert into admins (username, password , email) values ('Matthew Kleinhausen', '6vroZQu4l5C', null); -insert into admins (username, password , email) values ('Codee Lintill', '783mVNeiZ', 'clintill2y@cpanel.net'); -insert into admins (username, password , email) values ('Clarita McFaell', 'nV2RAwaEy4', 'cmcfaell2z@networksolutions.com'); -insert into admins (username, password , email) values ('Sumner Everwin', '6dVje6g', 'severwin30@scientificamerican.com'); -insert into admins (username, password , email) values ('Chico Frick', 'VjdlNjZSQytE', null); -insert into admins (username, password , email) values ('Rhianon Ginsie', 'hn5goatiV', 'rginsie32@mail.ru'); -insert into admins (username, password , email) values ('Devy Lyttle', 'QM36TSG', 'dlyttle33@irs.gov'); -insert into admins (username, password , email) values ('Erma Raggett', 'CDlPpzY6V6jr', 'eraggett34@icq.com'); -insert into admins (username, password , email) values ('Windham Seally', '7m66YdV0OJ', 'wseally35@amazon.co.uk'); -insert into admins (username, password , email) values ('Candi Saffe', 'ksDNIinRTcH', 'csaffe36@paypal.com'); -insert into admins (username, password , email) values ('Georgeta Coale', 'GWv64vjLj', 'gcoale37@surveymonkey.com'); -insert into admins (username, password , email) values ('Celestyn Jakucewicz', 'mK4ZxJFV', 'cjakucewicz38@cdbaby.com'); -insert into admins (username, password , email) values ('Zak Wetter', 'EdLfpOzGqVCu', 'zwetter39@twitter.com'); -insert into admins (username, password , email) values ('Cherilynn Kiddell', 'LU8PiI', 'ckiddell3a@umn.edu'); -insert into admins (username, password , email) values ('Otto Drakard', 'vbeITyUyjVM', 'odrakard3b@wordpress.com'); -insert into admins (username, password , email) values ('Elsie Tarburn', '3t3cKJ', 'etarburn3c@msn.com'); -insert into admins (username, password , email) values ('Brandy Larrie', 'd2G0LirY4M38', 'blarrie3d@com.com'); -insert into admins (username, password , email) values ('Carmine Fowley', 'QrXZzpztElZ', 'cfowley3e@last.fm'); -insert into admins (username, password , email) values ('Gilemette Shattock', '8txNfqYM', 'gshattock3f@ovh.net'); -insert into admins (username, password , email) values ('Andonis Creber', 'HPUPF2ym', 'acreber3g@cbc.ca'); -insert into admins (username, password , email) values ('Gordan Talby', 'GQhJY6zf', 'gtalby3h@google.cn'); -insert into admins (username, password , email) values ('Curry Charrisson', 'Wwei71OuwR', null); -insert into admins (username, password , email) values ('Liz Geerling', 'V4MBmhd4zK', 'lgeerling3j@indiatimes.com'); -insert into admins (username, password , email) values ('Dotti Fendt', 'Cn9P5bgR', 'dfendt3k@webs.com'); -insert into admins (username, password , email) values ('Gael Zaczek', '62tNQVi3a', 'gzaczek3l@infoseek.co.jp'); -insert into admins (username, password , email) values ('Desirae Reilly', 'DaAw1Btn2EGx', 'dreilly3m@sciencedirect.com'); -insert into admins (username, password , email) values ('Ann-marie Goodbarr', 'jq6Ompdr', 'agoodbarr3n@stumbleupon.com'); -insert into admins (username, password , email) values ('Ezechiel Husby', 'adKZUA4B', 'ehusby3o@zdnet.com'); -insert into admins (username, password , email) values ('Carline Twiggins', 'SrST8eOQPWF', 'ctwiggins3p@dailymail.co.uk'); -insert into admins (username, password , email) values ('Nessy Guly', '5pPsXhA0Z67y', 'nguly3q@mtv.com'); -insert into admins (username, password , email) values ('Celestina Brayfield', 'fr2uXmW5', 'cbrayfield3r@tinypic.com'); -insert into admins (username, password , email) values ('Jenni Wildblood', 'S70b7cUltWtP', 'jwildblood3s@yale.edu'); -insert into admins (username, password , email) values ('Georgianne Quittonden', 'RDHZ4l', 'gquittonden3t@photobucket.com'); -insert into admins (username, password , email) values ('Durant Gurg', 'tLWEvXIsVwfK', 'dgurg3u@discovery.com'); -insert into admins (username, password , email) values ('Pavel Hambrick', 'mo4Quzrq9msv', 'phambrick3v@ustream.tv'); -insert into admins (username, password , email) values ('Wilone Schops', 'dHhUYp3', 'wschops3w@illinois.edu'); -insert into admins (username, password , email) values ('Paxon Benadette', '5BilF8nrOis5', 'pbenadette3x@slashdot.org'); -insert into admins (username, password , email) values ('Lorne Jeffes', 'LDw2DCFh', 'ljeffes3y@unblog.fr'); -insert into admins (username, password , email) values ('Gregoire De la Harpe', '8pfQe8', 'gde3z@cnbc.com'); -insert into admins (username, password , email) values ('Cornall Raeburn', 'sax6m2lM5N', null); -insert into admins (username, password , email) values ('Pierette Pionter', 'y5sUrtvulrdL', 'ppionter41@stumbleupon.com'); -insert into admins (username, password , email) values ('Ansley Sacher', 'a07XI0o3unys', 'asacher42@youtu.be'); -insert into admins (username, password , email) values ('Blondelle Gownge', 'VYcRktxAd6Yh', 'bgownge43@mozilla.org'); -insert into admins (username, password , email) values ('Bevon Shory', 'WbdjKuEAXOQ', 'bshory44@gov.uk'); -insert into admins (username, password , email) values ('Christabel Luffman', 'lDUWJwM', null); +insert into admins (username, password , email) values ('Bobbie Fendt', 'F1A1CC71ED10594F97B1B6CF94A00727', 'bfendt0@blogspot.com'); +insert into admins (username, password , email) values ('Noni Djurdjevic', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ndjurdjevic1@icq.com'); +insert into admins (username, password , email) values ('Kizzie Maliphant', 'F1A1CC71ED10594F97B1B6CF94A00727', 'kmaliphant2@php.net'); diff --git a/server/database/config/agentsFackData.sql b/server/database/config/agentsFackData.sql index c13cfb9..8af4e91 100644 --- a/server/database/config/agentsFackData.sql +++ b/server/database/config/agentsFackData.sql @@ -1,150 +1,6 @@ -insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', 'zPaSLffNNHt', '481-649-8020', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', 'HjmlmFbqJrzj', '663-871-7450', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', 'NmB91dU', '630-385-8312', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', 'nYa5Ibw', '210-886-2847', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Lillian', null, 'dRCLpEwy', '270-209-1221', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', 'ppgDMnGe82Ci', '426-753-9984', 'application/mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Kimberlee', 'kscamp6@washingtonpost.com', 'OpvcvwsA', '728-690-3987', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Vicki', 'vallred7@cam.ac.uk', 'YN1CkEqx', '504-768-2377', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Sioux', 'sbank8@cafepress.com', 'eyB98M', '609-148-4383', 'application/vnd.ms-powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Heidie', 'hpaulet9@skype.com', 'qyIFnw4M5Ahe', '640-885-2675', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Nertie', 'ntrahmela@epa.gov', 'HVVqU7D0', '587-822-1209', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Steffie', 'sevansonb@tinypic.com', '15Ivgt69', '744-526-0201', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Imogen', 'icorsellesc@europa.eu', 'VqR64wrD', '961-568-7728', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Kirby', 'kstooked@canalblog.com', 's9bqrekn', '838-437-0166', 'application/mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Aura', 'amapstone@sourceforge.net', 'VT5Iy8MQhFo', '405-977-3855', 'application/x-mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Ellynn', 'ehelmf@fotki.com', 'iUhvvbYm', '975-260-7379', 'audio/x-mpeg-3'); -insert into agents (name, email, password , phone, avater) values ('Katharyn', 'klalondeg@cornell.edu', 'mD5ECSg3', '406-588-5092', 'video/x-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Margaretha', 'mmcclymondh@homestead.com', 'pWOpIk', '472-483-3149', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Stormie', 'shallwoodi@scribd.com', 'CkB5qro4UVbn', '828-957-3626', 'image/x-tiff'); -insert into agents (name, email, password , phone, avater) values ('Ethelin', 'edohertyj@squarespace.com', '2k8nel', '215-461-2833', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Chloe', 'crickmank@craigslist.org', 'l7DWQu0NR8R7', '797-573-4068', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Brandise', 'braitiel@typepad.com', 'xrssojD4PGEM', '918-647-1129', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Shandy', 'skrabbem@spiegel.de', 'uExQ5raf', '186-513-0155', 'image/x-tiff'); -insert into agents (name, email, password , phone, avater) values ('Gwenny', 'gspyvyen@foxnews.com', 'NPNTVM', '936-955-0985', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Joeann', 'jmarsterso@tripod.com', 'IMbUOzvLjw', '238-407-3787', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Pauli', 'ppotzoldp@harvard.edu', 'gv1HFthQDRw', '955-887-9084', 'application/x-msexcel'); -insert into agents (name, email, password , phone, avater) values ('Kessia', 'krapseyq@independent.co.uk', 'p5XPnS', '868-237-3249', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Rosette', 'rorpinr@google.com', '9BBJW1CJM', '613-394-3594', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Candida', 'cparchments@mapy.cz', 'CS0KL3fMB', '316-829-0334', 'video/x-mpeg'); -insert into agents (name, email, password , phone, avater) values ('Adel', 'ahaffardt@fastcompany.com', 'M3M9zumL', '234-941-3027', 'image/x-tiff'); -insert into agents (name, email, password , phone, avater) values ('Carola', 'caughtonu@uiuc.edu', 'UlhjaGq', '742-675-3652', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Geri', 'gsoppethv@hc360.com', 'Wj3vu0', '536-403-5044', 'video/x-mpeg'); -insert into agents (name, email, password , phone, avater) values ('Dannye', null, 'wtB2VWU7u', '348-901-4048', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Rae', null, 'WTCXE3', '790-407-3530', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Kalina', 'kmethy@facebook.com', '8k5iG3', '126-919-0870', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Milli', null, 'yxniep7', '746-683-3875', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Arlene', 'aattenbarrow10@weebly.com', 'HfKxYSQ', '538-163-6790', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Charissa', 'cesmond11@cisco.com', 'KG1SpL', '832-893-6625', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Alis', 'ajell12@google.com.hk', 'QzFAWBrWeb', '265-394-9051', 'application/x-mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Marilin', 'mbleything13@vkontakte.ru', 'UhY125yWPk', '344-308-3983', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Alberta', 'acollcutt14@goodreads.com', 'NYJhGXQflYv', '213-565-2866', 'image/x-tiff'); -insert into agents (name, email, password , phone, avater) values ('Guenevere', 'gdesouza15@live.com', 'dqit1jMU0VT', '399-604-9213', 'application/x-excel'); -insert into agents (name, email, password , phone, avater) values ('Nanni', 'nbrussell16@umich.edu', '8vsHUCfaRf47', '635-195-5206', 'text/plain'); -insert into agents (name, email, password , phone, avater) values ('Shel', 'szeale17@mozilla.com', 'MPTXUT', '255-815-3103', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Sherline', 'swoolaghan18@goo.ne.jp', 'sapDmnp', '563-350-5658', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Dyan', 'dohanessian19@artisteer.com', '9q6Yo3Vf', '919-237-5617', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Hertha', 'hhayden1a@mapy.cz', 'Zqit86MJb7v', '993-210-1375', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Drusie', 'dmarjanovic1b@seattletimes.com', '6Cgnvp14AKJh', '492-911-9416', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Dale', 'dbeamond1c@gravatar.com', 'RoA5lI', '547-125-1386', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Ara', null, 'pZszGeqHF', '170-150-2665', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Roslyn', 'rburfield1e@nhs.uk', 'Key2GYR', '226-629-5499', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Consuela', 'cdron1f@posterous.com', 'kiE5lC8g', '356-396-8442', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Debera', 'dsansam1g@ft.com', 'sl5kDaDfQ7', '510-391-5197', 'audio/x-mpeg-3'); -insert into agents (name, email, password , phone, avater) values ('Kizzee', 'knoel1h@linkedin.com', 'IBuJFoufA', '647-355-4033', 'application/powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Kaylee', 'kgregoire1i@domainmarket.com', 'D4DJLzpfKp3', '336-311-8987', 'video/msvideo'); -insert into agents (name, email, password , phone, avater) values ('Sheeree', 'sdorbin1j@amazon.co.uk', 'PFO1ERnuDuA', '775-340-3072', 'application/x-excel'); -insert into agents (name, email, password , phone, avater) values ('Gerty', null, 'jiEI2mI', '674-707-7754', 'application/vnd.ms-powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Harrie', 'hganiclef1l@4shared.com', 'Wcs5ghZ', '717-252-2739', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Pen', 'praitt1m@cbslocal.com', 'dW1yINUh', '431-175-2665', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Inna', null, '77hEidP9tD', '371-471-4596', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Rosene', 'rdunklee1o@csmonitor.com', 'o8BHEWGYjy9', '432-537-4837', 'text/plain'); -insert into agents (name, email, password , phone, avater) values ('Dacey', 'djoselevitz1p@imdb.com', 'OBU4G3O9J', '855-453-7496', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Kathlin', 'kpickavant1q@weather.com', 'cIi12et5ji', '742-926-2609', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Joli', 'jfleckness1r@t.co', 'YfTJW9E5ty0', '656-582-3313', 'application/mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Ladonna', 'lswanborough1s@godaddy.com', 'ml4otnDAgFB', '760-656-9481', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Shaylah', 'smoroney1t@toplist.cz', 'Z5p4j7', '163-758-7247', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Merline', 'mgrund1u@imageshack.us', 'zAoneQoJ', '973-991-9356', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Rosa', 'rfairy1v@nps.gov', 'xsxOCXPcIXQV', '162-899-0081', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Tracie', 'tmcaster1w@freewebs.com', 'r4FWmYkZfT', '159-489-4239', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Felecia', 'fpietzker1x@mysql.com', 'LhUVqfQ', '765-621-8433', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Kalina', null, 'VM0u5TxZU3h', '411-869-3673', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Shandra', 'snewborn1z@wikimedia.org', 'QxyeGAF', '339-252-0138', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Odelinda', 'oblindermann20@theglobeandmail.com', 'nfEkIEAzSP4', '478-200-0820', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Shir', 'seasom21@spotify.com', '42sXdqJEoM', '637-533-5026', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Chiquia', 'crushworth22@nytimes.com', 'Fmc0IN0Rn', '674-527-9240', 'application/x-excel'); -insert into agents (name, email, password , phone, avater) values ('Donny', 'dwalch23@who.int', 'byH4Pb2xplUd', '672-396-8319', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Lydia', 'llegging24@goo.ne.jp', 'U05AJ6z1t', '798-319-7125', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Eddi', null, 'dxyRAGu', '969-435-2400', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Kissie', 'ksymones26@instagram.com', 'J41Ktb', '333-601-9150', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Afton', 'amapother27@phoca.cz', 'JPJV64p40YFk', '291-584-5019', 'video/x-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Shandy', 'sdales28@uiuc.edu', 'uUfwtCgUPY', '472-341-9889', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Janean', 'jvasovic29@rakuten.co.jp', '15meAi9jj3', '422-480-2846', 'application/vnd.ms-powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Emmaline', 'emennell2a@npr.org', '6PKLVVpTCXm', '928-553-3387', 'application/x-msexcel'); -insert into agents (name, email, password , phone, avater) values ('Teddie', 'twessing2b@multiply.com', 'B12zqxHBjZ', '529-988-9106', 'application/x-excel'); -insert into agents (name, email, password , phone, avater) values ('Gayla', 'gpfaffe2c@house.gov', 'Go3uQF', '769-830-0553', 'application/mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Mamie', 'mjay2d@parallels.com', 'dSyYpagBOkz', '223-165-6495', 'image/tiff'); -insert into agents (name, email, password , phone, avater) values ('Courtenay', 'cmcdunlevy2e@deviantart.com', 'aHt0rsWRmuNc', '701-821-9105', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Orella', 'ocandey2f@examiner.com', 'KquQupfWL', '853-247-2656', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Krystalle', null, '1FuThn', '627-959-7961', 'audio/x-mpeg-3'); -insert into agents (name, email, password , phone, avater) values ('Orelle', 'oaskam2h@independent.co.uk', 'hm78AShqrw', '720-792-9410', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Teressa', 'tleatherland2i@census.gov', 'Rdi9BdgAO64D', '105-947-9923', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Caryl', 'chobgen2j@eepurl.com', 'Uprw3wuZ', '302-611-8373', 'text/plain'); -insert into agents (name, email, password , phone, avater) values ('Marj', 'mmaliffe2k@homestead.com', 'TY5HqNvmTX', '791-316-1532', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Seline', 'ssouthorn2l@prweb.com', 'BTIT6Y', '535-388-2601', 'audio/x-mpeg-3'); -insert into agents (name, email, password , phone, avater) values ('Lula', 'lfrancisco2m@yahoo.com', 'nJeahk1f1E', '910-798-0299', 'video/msvideo'); -insert into agents (name, email, password , phone, avater) values ('Nathalie', 'nwhettleton2n@nbcnews.com', 'qo8AF8NG', '466-534-5286', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Marketa', 'mputnam2o@guardian.co.uk', 'u3N1neOW03pk', '318-272-3741', 'video/x-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Starla', 'smcphilip2p@umn.edu', '9FkyYf5', '287-500-8574', 'video/x-mpeg'); -insert into agents (name, email, password , phone, avater) values ('Elysee', 'ereay2q@cam.ac.uk', 'xDjtJy30', '882-536-4419', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Cassandre', 'cpeche2r@yahoo.co.jp', '0kHoz2v', '490-378-3036', 'video/x-mpeg'); -insert into agents (name, email, password , phone, avater) values ('Poppy', 'pfaivre2s@utexas.edu', 'k0l4DvnOrzi', '904-471-1574', 'video/x-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Maryanne', 'mtiptaft2t@marketwatch.com', 'Gve73afgn', '859-476-9884', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Valry', 'venglish2u@upenn.edu', 'TyfiyV7Bi', '574-554-8907', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Genna', 'gpash2v@dropbox.com', '1XDOJM', '689-758-1257', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Lorain', 'lpossell2w@tinyurl.com', '1mwP02JArJiL', '381-200-3759', 'application/excel'); -insert into agents (name, email, password , phone, avater) values ('Winonah', 'wrowthorn2x@bigcartel.com', 'rR46TL', '325-430-0792', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Babara', null, '9HBGXSvgxWL', '982-309-8885', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Margarette', 'mmaseres2z@rakuten.co.jp', 'GPu9fL0S1W', '980-316-8933', 'image/pjpeg'); -insert into agents (name, email, password , phone, avater) values ('Deidre', 'dmaleck30@spotify.com', 'trOhPISML', '739-613-9409', 'video/msvideo'); -insert into agents (name, email, password , phone, avater) values ('Brietta', 'bsellar31@bigcartel.com', 'hgbUUYt', '761-205-0866', 'text/plain'); -insert into agents (name, email, password , phone, avater) values ('Aleta', 'abolderoe32@wiley.com', 'MoMqRCRe9', '174-673-6862', 'application/powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Bertie', 'bmckee33@list-manage.com', 'DyeLx6C78', '291-375-2344', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Guinna', 'ggarrelts34@twitter.com', 'UhyDfHpeHQhy', '942-146-2414', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Carmelle', 'cwickstead35@csmonitor.com', 'ghjvK7p', '680-830-1555', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Kynthia', null, 'uOU72vKV', '770-400-3185', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Martita', 'mgoldhawk37@sfgate.com', 'LVbe37uiQYK', '814-982-5744', 'application/excel'); -insert into agents (name, email, password , phone, avater) values ('Fania', 'fcattini38@miibeian.gov.cn', 'uvFvOYZZNPf', '804-702-2381', 'application/x-mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Natalee', 'nkneel39@google.it', 'iOpvCXYd94', '428-499-5556', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Karylin', null, 'BIGxZI', '887-742-6175', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Aggie', 'abelward3b@npr.org', 'eewAnohy', '943-751-3664', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Micheline', 'maronow3c@ow.ly', 'lGXXsJBWMCB', '968-485-1991', 'application/x-mspowerpoint'); -insert into agents (name, email, password , phone, avater) values ('Isobel', 'idilleston3d@123-reg.co.uk', 'qtjX0h', '858-672-1699', 'image/gif'); -insert into agents (name, email, password , phone, avater) values ('Merola', 'mstockney3e@typepad.com', 'GHm9e5z', '698-503-5727', 'application/x-excel'); -insert into agents (name, email, password , phone, avater) values ('Phillie', 'pchipman3f@earthlink.net', 'ROQQ1lwI', '736-346-6573', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Benedetta', 'bcowperthwaite3g@mac.com', 'cyfhN1', '721-762-9817', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Aleta', 'anock3h@stumbleupon.com', 'c7A51EDwko', '643-962-2958', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Molli', 'mgodbold3i@senate.gov', 'SEQiNiKwK6', '500-933-0521', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Wilone', 'wvigar3j@istockphoto.com', 'oEtTFtPRI', '482-429-9868', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Cinda', 'cpardy3k@europa.eu', 'nemZMqX', '388-326-9762', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Shirleen', 'shuddleston3l@vistaprint.com', 'S66D4X', '986-372-0787', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Sheilakathryn', 'snequest3m@prweb.com', 'CUPmgsqyu', '577-890-7094', 'image/png'); -insert into agents (name, email, password , phone, avater) values ('Carmel', null, '5VTLmS6z', '619-599-9441', 'application/powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Idell', 'imarmyon3o@google.ca', 'c34JXgt', '663-599-5872', 'application/excel'); -insert into agents (name, email, password , phone, avater) values ('Tomi', 'tbettles3p@privacy.gov.au', 'ywgR2I', '577-860-1056', 'application/pdf'); -insert into agents (name, email, password , phone, avater) values ('Rosaline', 'rfrangione3q@bigcartel.com', 'sN3tY4AO', '254-454-2168', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Geneva', 'gmiranda3r@sbwire.com', 'ZY5sV4o', '470-229-5855', 'video/avi'); -insert into agents (name, email, password , phone, avater) values ('Alessandra', 'ahullah3s@vk.com', 'SOfBFyRcnqH', '880-706-5629', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Hedvige', 'hpatifield3t@squidoo.com', 'aGP4tViwMf7k', '210-885-7942', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Kristine', 'kranns3u@networksolutions.com', 'MhjQ5i0', '651-552-6160', 'application/msword'); -insert into agents (name, email, password , phone, avater) values ('Michaella', 'mbutteris3v@topsy.com', 'uadNmp', '543-455-8697', 'video/quicktime'); -insert into agents (name, email, password , phone, avater) values ('Maryann', 'maldred3w@meetup.com', 'NgxjChxW', '341-624-1965', 'application/x-troff-msvideo'); -insert into agents (name, email, password , phone, avater) values ('Dixie', null, 'rZjF6W5J83Z', '378-890-0286', 'application/x-msexcel'); -insert into agents (name, email, password , phone, avater) values ('Renata', 'rsurmeyer3y@rediff.com', 'i8fVHHf', '932-195-6242', 'application/vnd.ms-excel'); -insert into agents (name, email, password , phone, avater) values ('Petronilla', 'pbursnall3z@columbia.edu', 'f18YmZF', '601-526-0365', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('L;urette', 'lowers40@symantec.com', 'iNJKIsbaVuS', '936-733-2961', 'video/msvideo'); -insert into agents (name, email, password , phone, avater) values ('Martynne', 'mbrandolini41@prlog.org', 'S2obMC9', '876-700-0617', 'image/jpeg'); -insert into agents (name, email, password , phone, avater) values ('Lorrayne', 'lgoodhew42@weebly.com', '9959qfkB', '864-356-0497', 'audio/mpeg3'); -insert into agents (name, email, password , phone, avater) values ('Renae', 'rdenziloe43@narod.ru', 'E1sWHlrFWq', '175-366-9540', 'application/vnd.ms-powerpoint'); -insert into agents (name, email, password , phone, avater) values ('Dulsea', 'dhoulden44@vinaora.com', 'B7FDhNTyKoSP', '714-266-4725', 'video/mpeg'); -insert into agents (name, email, password , phone, avater) values ('Gabriellia', 'gledrun45@springer.com', '4gvb5lj0Kye', '742-914-9580', 'video/x-mpeg'); +insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', '6D29E04CD937DC37CB72E42736CA238C', '481-649-8020', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', '6D29E04CD937DC37CB72E42736CA238C', '663-871-7450', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '630-385-8312', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', '6D29E04CD937DC37CB72E42736CA238C', '210-886-2847', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Lillian', 'abutrford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '270-209-1221', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', '6D29E04CD937DC37CB72E42736CA238C', '426-753-9984', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); diff --git a/server/database/config/imagesFackData.sql b/server/database/config/imagesFackData.sql index 0c4519e..d038652 100644 --- a/server/database/config/imagesFackData.sql +++ b/server/database/config/imagesFackData.sql @@ -1,150 +1,6 @@ -insert into images ( estate_id, image) values (148, null); -insert into images ( estate_id, image) values (93, 'image/x-tiff'); -insert into images ( estate_id, image) values (107, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (34, 'application/pdf'); -insert into images ( estate_id, image) values (42, 'image/png'); -insert into images ( estate_id, image) values (124, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (59, 'application/vnd.ms-excel'); -insert into images ( estate_id, image) values (129, 'image/tiff'); -insert into images ( estate_id, image) values (53, 'video/quicktime'); -insert into images ( estate_id, image) values (99, 'video/x-msvideo'); -insert into images ( estate_id, image) values (65, null); -insert into images ( estate_id, image) values (119, 'image/x-tiff'); -insert into images ( estate_id, image) values (35, 'application/x-excel'); -insert into images ( estate_id, image) values (4, 'video/mpeg'); -insert into images ( estate_id, image) values (109, 'image/gif'); -insert into images ( estate_id, image) values (62, 'text/plain'); -insert into images ( estate_id, image) values (77, 'application/pdf'); -insert into images ( estate_id, image) values (12, 'video/x-mpeg'); -insert into images ( estate_id, image) values (87, 'video/mpeg'); -insert into images ( estate_id, image) values (145, 'image/png'); -insert into images ( estate_id, image) values (20, 'video/quicktime'); -insert into images ( estate_id, image) values (103, 'audio/mpeg3'); -insert into images ( estate_id, image) values (25, 'application/x-excel'); -insert into images ( estate_id, image) values (128, 'application/pdf'); -insert into images ( estate_id, image) values (84, 'application/vnd.ms-excel'); -insert into images ( estate_id, image) values (105, 'application/pdf'); -insert into images ( estate_id, image) values (26, 'application/x-msexcel'); -insert into images ( estate_id, image) values (18, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (20, 'image/tiff'); -insert into images ( estate_id, image) values (6, null); -insert into images ( estate_id, image) values (112, 'video/x-msvideo'); -insert into images ( estate_id, image) values (61, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (20, 'audio/x-mpeg-3'); -insert into images ( estate_id, image) values (6, 'text/plain'); -insert into images ( estate_id, image) values (105, null); -insert into images ( estate_id, image) values (109, 'image/gif'); -insert into images ( estate_id, image) values (79, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (144, 'application/pdf'); -insert into images ( estate_id, image) values (82, 'image/jpeg'); -insert into images ( estate_id, image) values (120, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (146, 'image/tiff'); -insert into images ( estate_id, image) values (69, 'application/excel'); -insert into images ( estate_id, image) values (90, 'video/mpeg'); -insert into images ( estate_id, image) values (111, 'video/x-mpeg'); -insert into images ( estate_id, image) values (53, null); -insert into images ( estate_id, image) values (146, 'video/mpeg'); -insert into images ( estate_id, image) values (146, 'video/msvideo'); -insert into images ( estate_id, image) values (37, 'image/jpeg'); -insert into images ( estate_id, image) values (119, 'application/x-msexcel'); -insert into images ( estate_id, image) values (149, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (107, 'image/tiff'); -insert into images ( estate_id, image) values (81, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (136, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (120, 'video/mpeg'); -insert into images ( estate_id, image) values (17, 'video/mpeg'); -insert into images ( estate_id, image) values (105, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (13, null); -insert into images ( estate_id, image) values (25, 'video/x-mpeg'); -insert into images ( estate_id, image) values (64, null); -insert into images ( estate_id, image) values (54, 'application/x-mspowerpoint'); -insert into images ( estate_id, image) values (32, 'application/excel'); -insert into images ( estate_id, image) values (1, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (91, null); -insert into images ( estate_id, image) values (140, null); -insert into images ( estate_id, image) values (85, 'video/x-msvideo'); -insert into images ( estate_id, image) values (87, 'image/pjpeg'); -insert into images ( estate_id, image) values (22, null); -insert into images ( estate_id, image) values (125, 'audio/x-mpeg-3'); -insert into images ( estate_id, image) values (70, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (48, 'image/png'); -insert into images ( estate_id, image) values (128, 'video/mpeg'); -insert into images ( estate_id, image) values (60, 'image/x-tiff'); -insert into images ( estate_id, image) values (108, 'application/msword'); -insert into images ( estate_id, image) values (131, 'image/gif'); -insert into images ( estate_id, image) values (22, 'image/tiff'); -insert into images ( estate_id, image) values (148, 'application/x-troff-msvideo'); -insert into images ( estate_id, image) values (60, 'video/mpeg'); -insert into images ( estate_id, image) values (7, 'image/png'); -insert into images ( estate_id, image) values (7, 'audio/mpeg3'); -insert into images ( estate_id, image) values (72, 'application/excel'); -insert into images ( estate_id, image) values (129, 'application/x-troff-msvideo'); -insert into images ( estate_id, image) values (53, 'audio/mpeg3'); -insert into images ( estate_id, image) values (69, 'image/pjpeg'); -insert into images ( estate_id, image) values (15, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (30, 'video/msvideo'); -insert into images ( estate_id, image) values (71, null); -insert into images ( estate_id, image) values (130, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (77, 'application/msword'); -insert into images ( estate_id, image) values (145, null); -insert into images ( estate_id, image) values (98, null); -insert into images ( estate_id, image) values (95, 'video/msvideo'); -insert into images ( estate_id, image) values (34, null); -insert into images ( estate_id, image) values (87, 'video/msvideo'); -insert into images ( estate_id, image) values (2, 'application/x-excel'); -insert into images ( estate_id, image) values (134, 'application/x-mspowerpoint'); -insert into images ( estate_id, image) values (28, 'video/avi'); -insert into images ( estate_id, image) values (133, null); -insert into images ( estate_id, image) values (138, 'image/jpeg'); -insert into images ( estate_id, image) values (59, 'application/mspowerpoint'); -insert into images ( estate_id, image) values (30, 'application/x-excel'); -insert into images ( estate_id, image) values (27, 'application/x-troff-msvideo'); -insert into images ( estate_id, image) values (2, null); -insert into images ( estate_id, image) values (122, 'audio/mpeg3'); -insert into images ( estate_id, image) values (70, 'image/pjpeg'); -insert into images ( estate_id, image) values (130, 'image/tiff'); -insert into images ( estate_id, image) values (141, 'image/png'); -insert into images ( estate_id, image) values (118, 'application/excel'); -insert into images ( estate_id, image) values (69, 'image/gif'); -insert into images ( estate_id, image) values (147, 'image/tiff'); -insert into images ( estate_id, image) values (23, 'video/x-mpeg'); -insert into images ( estate_id, image) values (148, 'application/excel'); -insert into images ( estate_id, image) values (86, 'application/msword'); -insert into images ( estate_id, image) values (13, 'video/quicktime'); -insert into images ( estate_id, image) values (132, 'video/mpeg'); -insert into images ( estate_id, image) values (146, 'image/tiff'); -insert into images ( estate_id, image) values (35, 'text/plain'); -insert into images ( estate_id, image) values (127, 'application/msword'); -insert into images ( estate_id, image) values (0, 'video/x-msvideo'); -insert into images ( estate_id, image) values (27, 'image/png'); -insert into images ( estate_id, image) values (70, 'application/pdf'); -insert into images ( estate_id, image) values (144, 'image/pjpeg'); -insert into images ( estate_id, image) values (84, 'image/pjpeg'); -insert into images ( estate_id, image) values (80, 'application/x-excel'); -insert into images ( estate_id, image) values (75, 'application/x-mspowerpoint'); -insert into images ( estate_id, image) values (134, 'application/msword'); -insert into images ( estate_id, image) values (62, 'application/x-troff-msvideo'); -insert into images ( estate_id, image) values (97, 'application/vnd.ms-excel'); -insert into images ( estate_id, image) values (70, 'application/x-msexcel'); -insert into images ( estate_id, image) values (104, null); -insert into images ( estate_id, image) values (4, null); -insert into images ( estate_id, image) values (142, null); -insert into images ( estate_id, image) values (135, 'application/pdf'); -insert into images ( estate_id, image) values (22, 'video/quicktime'); -insert into images ( estate_id, image) values (144, 'application/pdf'); -insert into images ( estate_id, image) values (82, 'audio/mpeg3'); -insert into images ( estate_id, image) values (49, 'image/tiff'); -insert into images ( estate_id, image) values (87, 'application/powerpoint'); -insert into images ( estate_id, image) values (56, 'application/x-mspowerpoint'); -insert into images ( estate_id, image) values (108, 'image/png'); -insert into images ( estate_id, image) values (119, 'video/mpeg'); -insert into images ( estate_id, image) values (53, 'application/vnd.ms-powerpoint'); -insert into images ( estate_id, image) values (15, 'application/excel'); -insert into images ( estate_id, image) values (46, 'video/msvideo'); -insert into images ( estate_id, image) values (134, 'audio/mpeg3'); -insert into images ( estate_id, image) values (138, 'audio/mpeg3'); -insert into images ( estate_id, image) values (73, 'application/excel'); -insert into images ( estate_id, image) values (147, 'application/pdf'); -insert into images ( estate_id, image) values (45, 'application/x-msexcel'); -insert into images ( estate_id, image) values (45, null); -insert into images ( estate_id, image) values (94, 'application/x-excel'); +insert into images ( estate_id, image) values (148,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (93, 'https://cdn.archilovers.com/projects/57d7daff-e586-4a1b-83b3-8d5bf0f8e070.jpg'); +insert into images ( estate_id, image) values (107, 'https://images.unsplash.com/photo-1616046229478-9901c5536a45?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8aG91c2UlMjBpbnRlcmlvcnxlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (34, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQgICbcCNuDBzMfR9fpdh0z-na1sAcEqI4tDQAyx2rnCteciKKUIIp4DoWfj1crDydSMEY&usqp=CAU'); +insert into images ( estate_id, image) values (42, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQnZRKe5mthbwAN_6uYmne2gUU4U68zpHcWQ&usqp=CAU'); +insert into images ( estate_id, image) values (124, 'https://images.adsttc.com/media/images/5014/01c2/28ba/0d3b/4500/0b8d/slideshow/stringio.jpg?1414576481'); diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql index 5fd9119..a31d32f 100644 --- a/server/database/config/realStateFackData.sql +++ b/server/database/config/realStateFackData.sql @@ -4,147 +4,3 @@ insert into estates ( agent_id, title, price, description, type, category, stree insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (13, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (42, 'orci', '$191501.75', 'pharetra magna', 'Buy', 'House', '42 Park Meadow Lane', 'Drobin', 'Poland', 2, 1, 2, 224, true, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (69, 'potenti nullam', '$102097.77', 'pellentesque at nulla suspendisse potenti cras in purus eu magna vulputate luctus cum sociis natoque penatibus', 'Buy', 'House', '9992 Jenna Plaza', 'Akhtopol', 'Bulgaria', 3, 2, 3, 173, false, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'luctus et', '$123383.84', 'eu mi nulla ac enim in tempor turpis nec euismod scelerisque quam turpis adipiscing lorem vitae', 'Buy', 'House', '1717 Hudson Alley', 'Maiyema', 'Nigeria', 1, 3, 4, 230, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'porta volutpat erat quisque', '$265040.46', 'vulputate elementum nullam varius nulla facilisi cras non velit nec nisi vulputate nonummy maecenas', 'Buy', 'House', '9 Clove Road', 'Iwo', 'Nigeria', 3, 3, 2, 186, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'metus sapien ut', '$72245.56', 'ullamcorper purus sit amet nulla quisque arcu', 'Buy', 'House', '308 Charing Cross Circle', 'Ylöjärvi', 'Finland', 3, 1, 3, 231, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (88, 'purus aliquet at feugiat', '$301624.69', 'pede venenatis non sodales sed tincidunt eu felis fusce posuere felis sed', 'Buy', 'House', '05 Everett Point', 'Quinta da Courela', 'Portugal', 2, 3, 2, 230, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (32, 'est risus auctor sed', '$451787.74', 'rhoncus aliquam lacus morbi quis tortor id', 'Buy', 'House', '06146 Washington Pass', 'Sangpi', 'China', 3, 2, 2, 199, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'sapien non mi', '$141218.13', 'et ultrices posuere cubilia curae donec pharetra magna vestibulum aliquet ultrices erat', 'Buy', 'House', '550 Kensington Street', 'Washington', 'United States', 1, 3, 4, 232, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (37, 'felis', '$240120.05', 'eget semper', 'Buy', 'House', '3 Rusk Terrace', 'Xianzong', 'China', 3, 3, 4, 205, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'dolor sit amet consectetuer', '$317908.31', 'orci luctus et', 'Buy', 'House', '99016 Meadow Vale Avenue', 'Višňové', 'Czech Republic', 3, 1, 1, 202, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (24, 'ac', '$214856.50', 'sit amet justo morbi', 'Buy', 'House', '075 Garrison Drive', 'Wilga', 'Poland', 3, 4, 3, 152, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (96, 'elit proin risus', '$331482.44', 'habitasse platea dictumst morbi vestibulum velit id', 'Buy', 'House', '9 Del Mar Hill', 'Limoges', 'France', 2, 1, 4, 211, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (50, 'condimentum id luctus nec', '$495232.67', 'praesent lectus vestibulum quam sapien', 'Buy', 'House', '4 Pleasure Way', 'Novikovo', 'Russia', 2, 4, 1, 186, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'condimentum neque sapien placerat', '$47831.30', 'integer ac neque duis bibendum morbi non quam nec dui luctus rutrum nulla tellus in', 'Buy', 'House', '49 Del Mar Court', 'Bobonan', 'Philippines', 3, 1, 3, 242, false, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'donec vitae nisi nam', '$416056.60', 'vestibulum velit id pretium iaculis diam erat fermentum justo nec condimentum neque sapien placerat ante nulla', 'Buy', 'House', '10520 Monument Terrace', 'Amboasary', 'Madagascar', 1, 4, 2, 215, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (8, 'morbi non', '$165854.83', 'dui luctus rutrum nulla', 'Buy', 'House', '8841 Bunker Hill Junction', 'La Tuque', 'Canada', 1, 4, 1, 228, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (66, 'libero', '$272481.88', 'in porttitor pede justo eu massa donec dapibus duis', 'Buy', 'House', '4 Esker Plaza', 'Lyantonde', 'Uganda', 3, 1, 2, 212, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (83, 'at velit vivamus', '$206236.08', 'ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae duis faucibus accumsan', 'Buy', 'House', '20411 Shasta Point', 'Miguel Calmon', 'Brazil', 3, 2, 1, 152, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'orci', '$479884.82', 'quam sapien varius ut blandit non', 'Buy', 'House', '03 Talmadge Road', 'Lelystad', 'Netherlands', 2, 3, 4, 211, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'sit amet', '$499654.40', 'nulla ut erat id mauris vulputate elementum nullam varius', 'Buy', 'House', '71 Boyd Court', 'Songbo', 'China', 1, 3, 2, 188, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'amet', '$152036.24', 'vel nisl duis ac nibh fusce lacus purus aliquet at feugiat non pretium', 'Buy', 'House', '8543 Gulseth Drive', 'Kadoma', 'Zimbabwe', 1, 1, 3, 152, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (76, 'justo pellentesque', '$256963.73', 'lacinia eget tincidunt eget tempus vel pede', 'Buy', 'House', '93019 Melrose Avenue', 'Shōbara', 'Japan', 2, 4, 2, 173, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'pede', '$491487.39', 'ut', 'Buy', 'House', '6 Derek Point', 'Ixopo', 'South Africa', 1, 3, 1, 204, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'ac tellus semper', '$428599.42', 'massa id nisl venenatis', 'Buy', 'House', '7943 Vahlen Center', 'Chenxiang', 'China', 2, 1, 1, 222, false, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (7, 'sodales scelerisque', '$367204.67', 'consequat nulla nisl nunc nisl duis', 'Buy', 'House', '11965 Independence Plaza', 'Vurğun', 'Azerbaijan', 3, 3, 3, 203, true, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (58, 'lorem vitae', '$153306.82', 'augue vestibulum rutrum rutrum neque', 'Buy', 'House', '34878 7th Park', 'Stockholm', 'Sweden', 1, 3, 2, 242, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'augue', '$261040.78', 'pellentesque volutpat dui maecenas tristique est et tempus semper est', 'Buy', 'House', '068 Park Meadow Point', 'Jiangkou', 'China', 1, 2, 3, 212, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (12, 'nulla', '$27904.74', 'nulla neque libero convallis eget eleifend luctus ultricies eu nibh quisque id justo sit amet', 'Buy', 'House', '57 Ruskin Alley', 'Pawak', 'Philippines', 1, 4, 2, 181, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'pellentesque', '$453023.85', 'vitae mattis nibh ligula nec sem duis aliquam convallis nunc', 'Buy', 'House', '2128 Nancy Drive', 'Dankunku', 'Gambia', 3, 1, 3, 191, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (68, 'ipsum', '$422011.63', 'mauris eget massa tempor', 'Buy', 'House', '54 Kings Pass', 'Seso', 'Indonesia', 1, 4, 4, 166, true, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (67, 'quis turpis', '$358241.10', 'integer tincidunt', 'Buy', 'House', '74 Morrow Crossing', 'Huangkeng', 'China', 1, 3, 3, 217, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (48, 'ultrices libero non', '$315321.62', 'morbi odio odio elementum eu interdum eu tincidunt in leo', 'Buy', 'House', '14248 Grayhawk Hill', 'Chengjiao', 'China', 1, 1, 2, 217, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (100, 'blandit lacinia', '$238419.81', 'nam dui proin leo', 'Buy', 'House', '167 Jana Avenue', 'Omaha', 'United States', 3, 2, 1, 223, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (60, 'nunc purus', '$341889.48', 'mi nulla ac enim in tempor turpis nec euismod', 'Buy', 'House', '1 Hooker Road', 'Tarouca', 'Portugal', 2, 4, 1, 199, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (33, 'euismod scelerisque quam turpis', '$157508.81', 'justo etiam', 'Buy', 'House', '26668 Spenser Way', 'Fucheng', 'China', 1, 2, 3, 166, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'vestibulum quam sapien', '$201335.77', 'consequat lectus in est risus auctor sed tristique in tempus', 'Buy', 'House', '96008 Shoshone Place', 'Taldan', 'Russia', 2, 2, 3, 222, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (32, 'gravida nisi at', '$152855.79', 'lobortis convallis tortor risus dapibus augue vel accumsan tellus nisi eu orci mauris lacinia sapien', 'Buy', 'House', '94629 Sommers Park', 'Depok', 'Indonesia', 3, 4, 1, 192, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (28, 'nullam porttitor', '$327404.05', 'mauris sit amet eros suspendisse accumsan tortor quis turpis sed ante vivamus tortor duis', 'Buy', 'House', '2 Grasskamp Pass', 'Minzheng', 'China', 3, 4, 1, 208, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'pulvinar', '$454694.80', 'eget semper rutrum nulla nunc purus phasellus in felis donec semper sapien a libero', 'Buy', 'House', '689 Marquette Street', 'Reckange-sur-Mess', 'Luxembourg', 3, 4, 2, 248, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (9, 'aliquam convallis nunc', '$203807.37', 'lacus purus aliquet at feugiat non pretium quis lectus suspendisse', 'Buy', 'House', '8036 Linden Crossing', 'Aţ Ţafīlah', 'Jordan', 2, 1, 1, 226, false, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'ut massa', '$424927.15', 'tortor quis turpis', 'Buy', 'House', '5 Sunfield Drive', 'Cariaco', 'Venezuela', 1, 3, 4, 179, true, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (43, 'tortor risus', '$220345.04', 'risus praesent lectus vestibulum quam sapien varius ut blandit non interdum', 'Buy', 'House', '101 Darwin Hill', 'Itanhaém', 'Brazil', 3, 4, 4, 202, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (19, 'dis parturient', '$462439.28', 'orci luctus et ultrices posuere cubilia curae duis faucibus accumsan odio', 'Buy', 'House', '2354 Katie Park', 'Fāryāb', 'Iran', 1, 4, 3, 203, false, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'quam sollicitudin', '$16029.46', 'ultrices vel augue vestibulum ante ipsum primis in faucibus orci', 'Buy', 'House', '92 Ridgeview Crossing', 'San Jose Village', 'Northern Mariana Islands', 1, 3, 2, 237, false, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'in', '$94828.48', 'tortor sollicitudin mi sit amet lobortis sapien sapien non mi integer ac neque duis bibendum', 'Buy', 'House', '05218 Montana Alley', 'Volodymyr-Volyns’kyy', 'Ukraine', 1, 3, 1, 222, false, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (46, 'ante vestibulum', '$236281.22', 'sed justo pellentesque viverra pede', 'Buy', 'House', '7508 Merchant Circle', 'Itbayat', 'Philippines', 1, 1, 2, 249, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (86, 'quam sapien', '$111560.29', 'ut nunc vestibulum ante ipsum primis in faucibus orci', 'Buy', 'House', '87 3rd Plaza', 'Fenghuanglu', 'China', 3, 4, 3, 232, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (57, 'neque duis', '$178257.62', 'vel enim sit amet nunc viverra dapibus nulla suscipit ligula', 'Buy', 'House', '5006 Cody Court', 'Gornji Grad', 'Slovenia', 3, 1, 1, 227, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (84, 'sit amet', '$426779.53', 'interdum in ante vestibulum ante ipsum primis', 'Buy', 'House', '7 Bultman Circle', 'Vaitogi', 'American Samoa', 3, 1, 3, 177, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'dolor', '$110326.93', 'rutrum nulla tellus in sagittis dui vel nisl duis ac', 'Buy', 'House', '42 Elmside Court', 'Choa Saidān Shāh', 'Pakistan', 3, 1, 2, 233, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (15, 'mattis odio donec vitae', '$11447.87', 'velit donec diam neque vestibulum eget vulputate', 'Buy', 'House', '63014 Park Meadow Pass', 'Coyaima', 'Colombia', 1, 4, 3, 167, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (65, 'eget', '$245728.41', 'orci luctus et ultrices posuere cubilia', 'Buy', 'House', '0450 Logan Crossing', 'Shiniujiang', 'China', 1, 3, 2, 174, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'sit amet diam', '$478323.46', 'non', 'Buy', 'House', '3 Gale Pass', 'El Aguacate', 'Mexico', 2, 3, 2, 174, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (79, 'luctus cum sociis', '$48243.12', 'mi integer ac neque duis bibendum morbi non quam nec dui', 'Buy', 'House', '742 Beilfuss Parkway', 'Tarlac City', 'Philippines', 1, 1, 1, 164, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (91, 'nulla ac enim', '$412220.05', 'amet justo', 'Buy', 'House', '82 Hanson Junction', 'Bitobe', 'Indonesia', 3, 3, 1, 210, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (26, 'quis orci eget', '$114840.72', 'phasellus id sapien in sapien iaculis congue', 'Buy', 'House', '796 Grim Circle', 'Zhouling', 'China', 3, 1, 1, 169, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (62, 'congue', '$279347.35', 'porta volutpat erat quisque erat eros', 'Buy', 'House', '9804 Raven Alley', 'Cikijing', 'Indonesia', 3, 2, 2, 166, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (58, 'dapibus duis at', '$203099.99', 'ridiculus mus vivamus vestibulum sagittis', 'Buy', 'House', '12396 Manitowish Pass', 'Dniprovka', 'Ukraine', 2, 4, 1, 155, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'imperdiet nullam orci pede', '$437955.42', 'mus vivamus vestibulum sagittis sapien cum sociis natoque penatibus et', 'Buy', 'House', '90 Monterey Hill', 'Strawczyn', 'Poland', 3, 1, 2, 210, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (17, 'quis', '$63294.45', 'sem duis aliquam convallis', 'Buy', 'House', '6 Pleasure Avenue', 'Choisy-le-Roi', 'France', 2, 1, 4, 245, true, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (68, 'non mauris', '$121540.32', 'nisl aenean lectus pellentesque eget nunc donec quis orci eget', 'Buy', 'House', '2 Corben Lane', 'Peñaflor', 'Chile', 3, 4, 4, 236, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (79, 'placerat praesent blandit', '$416373.43', 'dolor morbi vel lectus in quam fringilla rhoncus mauris enim leo rhoncus sed vestibulum', 'Buy', 'House', '52 Rockefeller Center', 'Markala', 'Mali', 3, 3, 4, 202, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (75, 'morbi', '$307998.41', 'pede libero quis orci nullam molestie nibh', 'Buy', 'House', '79 Forest Dale Park', 'Rameshki', 'Russia', 2, 4, 1, 162, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (25, 'nec', '$423933.10', 'vel augue vestibulum rutrum', 'Buy', 'House', '8 Sugar Crossing', 'Aviúges', 'Portugal', 3, 1, 3, 197, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (40, 'in tempus sit', '$445655.85', 'pede justo lacinia eget tincidunt', 'Buy', 'House', '20 Kings Park', 'Surat Thani', 'Thailand', 1, 3, 1, 197, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (33, 'sit', '$208223.17', 'ut rhoncus', 'Buy', 'House', '47 Elgar Center', 'Port Saint John’s', 'South Africa', 3, 2, 3, 173, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (12, 'rutrum rutrum neque aenean', '$381135.79', 'augue aliquam erat volutpat in congue etiam justo etiam pretium iaculis justo in', 'Buy', 'House', '7 Upham Road', 'Zgornje Pirniče', 'Slovenia', 2, 2, 2, 243, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'vel augue vestibulum rutrum', '$227191.91', 'sagittis dui vel nisl duis ac nibh fusce lacus purus aliquet at feugiat', 'Buy', 'House', '20475 Tennyson Lane', 'Sinjil', 'Palestinian Territory', 1, 3, 3, 155, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (16, 'vestibulum', '$436506.36', 'nulla nisl nunc nisl duis bibendum felis sed interdum venenatis turpis', 'Buy', 'House', '1215 Fisk Trail', 'Picoto', 'Portugal', 3, 1, 3, 197, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'etiam pretium', '$11127.89', 'pede morbi porttitor lorem id', 'Buy', 'House', '4 Hazelcrest Terrace', 'Russeifa', 'Jordan', 2, 2, 2, 246, true, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (23, 'aliquam erat volutpat in', '$348306.47', 'molestie lorem quisque ut', 'Buy', 'House', '0 Sunnyside Alley', 'Montelíbano', 'Colombia', 2, 3, 2, 192, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (35, 'eu interdum', '$407710.05', 'sed vel enim sit amet nunc viverra dapibus nulla', 'Buy', 'House', '9664 Lawn Trail', 'Samho-rodongjagu', 'North Korea', 3, 4, 3, 151, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (54, 'faucibus orci luctus et', '$435245.85', 'aliquam augue quam sollicitudin vitae consectetuer eget rutrum', 'Buy', 'House', '18222 Graedel Trail', 'Ishiki', 'Japan', 1, 3, 3, 206, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (36, 'congue', '$236582.13', 'integer a nibh in quis justo maecenas rhoncus aliquam lacus morbi quis', 'Buy', 'House', '09001 Farmco Terrace', 'Zengji', 'China', 1, 2, 1, 193, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'in eleifend', '$377894.47', 'volutpat convallis morbi odio', 'Buy', 'House', '31335 Garrison Trail', 'Fort-de-France', 'Martinique', 3, 2, 2, 207, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (47, 'luctus et', '$276865.51', 'massa id lobortis convallis tortor', 'Buy', 'House', '6 Westerfield Pass', 'Zhangjiayuan', 'China', 3, 2, 3, 225, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (69, 'neque', '$399376.95', 'ut massa volutpat convallis morbi odio odio elementum eu', 'Buy', 'House', '42589 Rigney Trail', 'Hongqi', 'China', 1, 3, 2, 151, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'non pretium', '$83819.33', 'nisl nunc rhoncus', 'Buy', 'House', '99 Vahlen Center', 'Dashiju', 'China', 1, 3, 1, 166, false, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'maecenas ut massa quis', '$209430.61', 'mattis pulvinar nulla', 'Buy', 'House', '104 Jana Crossing', 'Huangtugang', 'China', 1, 1, 2, 152, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (35, 'ante', '$324652.56', 'turpis', 'Buy', 'House', '0492 John Wall Junction', 'Dijon', 'France', 1, 4, 1, 199, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (85, 'nec condimentum', '$227940.47', 'eget eleifend luctus ultricies eu nibh quisque', 'Buy', 'House', '86268 Lakeland Drive', 'Auxerre', 'France', 2, 2, 4, 242, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'nulla', '$185974.42', 'rutrum at lorem integer', 'Buy', 'House', '18 Amoth Pass', 'Pita', 'Guinea', 1, 2, 3, 159, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (84, 'at vulputate vitae nisl', '$300071.81', 'dui vel nisl duis ac nibh fusce lacus purus aliquet at feugiat non pretium quis lectus', 'Buy', 'House', '8 Blackbird Center', 'Huimin', 'China', 1, 4, 4, 239, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (88, 'accumsan felis ut', '$337627.70', 'eu massa donec dapibus duis at velit eu est congue elementum in', 'Buy', 'House', '8 Saint Paul Street', 'Mandi Bahāuddīn', 'Pakistan', 3, 4, 2, 244, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vestibulum vestibulum ante', '$395530.51', 'luctus tincidunt nulla mollis', 'Buy', 'House', '1474 Dahle Road', 'Pai do Vento', 'Portugal', 1, 3, 1, 185, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (59, 'molestie lorem quisque ut', '$276227.81', 'amet eros suspendisse accumsan tortor quis', 'Buy', 'House', '533 Delladonna Circle', 'Meijiang', 'China', 3, 2, 3, 245, false, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'id', '$38573.55', 'luctus nec molestie sed justo pellentesque viverra pede ac', 'Buy', 'House', '59034 Continental Drive', 'Bella Vista', 'Argentina', 1, 3, 2, 212, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (43, 'sed magna', '$178218.48', 'erat vestibulum sed magna at nunc commodo placerat praesent', 'Buy', 'House', '269 Graceland Terrace', 'Karolinka', 'Czech Republic', 3, 3, 4, 173, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (52, 'lectus in', '$90581.43', 'morbi porttitor lorem id ligula suspendisse ornare', 'Buy', 'House', '60 Bartillon Drive', 'Rancamaya', 'Indonesia', 2, 1, 1, 155, false, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (73, 'justo pellentesque viverra', '$352048.85', 'et tempus semper est quam pharetra magna ac consequat metus sapien ut', 'Buy', 'House', '0186 Marquette Street', 'Alençon', 'France', 1, 3, 3, 153, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'in faucibus orci', '$343045.14', 'neque aenean auctor gravida sem praesent id massa id nisl venenatis lacinia aenean', 'Buy', 'House', '16284 Kinsman Crossing', 'Sipocot', 'Philippines', 3, 2, 3, 186, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (45, 'mollis', '$156391.71', 'vulputate luctus cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus', 'Buy', 'House', '40 Lakeland Pass', 'Charagua', 'Bolivia', 1, 4, 1, 214, true, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (66, 'tortor duis', '$297732.64', 'donec vitae', 'Buy', 'House', '420 Dakota Center', 'Tanumshede', 'Sweden', 2, 1, 1, 245, false, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (83, 'nullam orci', '$57764.17', 'curae donec pharetra magna', 'Buy', 'House', '6 Emmet Trail', 'Auriflama', 'Brazil', 1, 1, 3, 162, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'amet justo morbi ut', '$105791.89', 'tristique est et tempus semper est', 'Buy', 'House', '38 Hoard Junction', 'Lajeado', 'Brazil', 1, 2, 2, 160, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'ultrices', '$141016.69', 'penatibus et magnis', 'Buy', 'House', '98 School Court', 'Medvezh’yegorsk', 'Russia', 3, 2, 1, 173, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'ipsum', '$231743.03', 'tortor risus dapibus augue vel accumsan', 'Buy', 'House', '17484 Debs Hill', 'Changtian', 'China', 3, 3, 2, 216, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (81, 'adipiscing elit proin', '$255068.33', 'id mauris vulputate elementum nullam varius nulla facilisi cras non velit', 'Buy', 'House', '2 Oakridge Court', 'Maia', 'Portugal', 1, 4, 2, 173, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (24, 'vel lectus in', '$476589.55', 'amet sem fusce consequat nulla', 'Buy', 'House', '1 Eastlawn Pass', 'Yuannan', 'China', 3, 4, 4, 245, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (76, 'dictumst', '$313177.15', 'at velit eu est congue elementum in hac habitasse platea', 'Buy', 'House', '390 Arkansas Drive', 'La Motte-Servolex', 'France', 3, 3, 4, 216, false, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vivamus', '$208013.73', 'maecenas rhoncus aliquam lacus morbi quis tortor', 'Buy', 'House', '918 Anzinger Road', 'São Pedro', 'Portugal', 1, 1, 3, 207, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (44, 'etiam faucibus', '$208805.87', 'ut nulla sed accumsan felis', 'Buy', 'House', '7575 Onsgard Park', 'Oliveirinha', 'Portugal', 3, 4, 3, 224, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (19, 'dapibus duis', '$496172.81', 'semper sapien a libero nam dui proin leo', 'Buy', 'House', '0845 Acker Drive', 'Matingain', 'Philippines', 3, 4, 1, 176, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (56, 'posuere cubilia', '$121593.33', 'eros viverra eget congue', 'Buy', 'House', '6 Bartillon Center', 'Sumberjati', 'Indonesia', 2, 4, 4, 152, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (77, 'nunc nisl duis bibendum', '$336020.65', 'quisque porta volutpat erat quisque erat eros viverra eget', 'Buy', 'House', '20580 Steensland Circle', 'Refojos', 'Portugal', 1, 3, 4, 188, true, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'metus vitae ipsum', '$358214.73', 'nisi', 'Buy', 'House', '432 Prairie Rose Lane', 'Thạnh Mỹ', 'Vietnam', 1, 2, 1, 203, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (23, 'magna vulputate luctus cum', '$417563.67', 'lacus curabitur at ipsum ac tellus semper interdum mauris ullamcorper purus', 'Buy', 'House', '2586 Farwell Crossing', 'Tomiya', 'Japan', 1, 3, 3, 220, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'sit amet lobortis sapien', '$473571.89', 'lorem integer tincidunt ante vel ipsum praesent blandit lacinia erat vestibulum sed magna at nunc commodo', 'Buy', 'House', '9806 Bunker Hill Court', 'Chum Phuang', 'Thailand', 1, 3, 2, 232, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'potenti', '$323151.08', 'arcu adipiscing molestie hendrerit at vulputate vitae nisl aenean', 'Buy', 'House', '30351 Vera Hill', 'Garawati', 'Indonesia', 2, 1, 3, 233, false, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (98, 'curae nulla dapibus', '$476891.08', 'ac enim in tempor', 'Buy', 'House', '396 Declaration Avenue', 'San Pedro', 'Mexico', 3, 2, 4, 185, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (63, 'praesent lectus vestibulum', '$74579.70', 'nam nulla integer pede justo lacinia eget tincidunt eget tempus vel pede', 'Buy', 'House', '05 Main Junction', 'Macaíba', 'Brazil', 3, 2, 1, 191, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'suspendisse potenti cras in', '$50440.69', 'eu mi nulla ac enim in tempor turpis nec euismod', 'Buy', 'House', '7815 Columbus Court', 'Titab', 'Indonesia', 3, 2, 1, 182, false, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'eget', '$278516.82', 'a libero nam dui', 'Buy', 'House', '21955 Northland Street', 'Västerås', 'Sweden', 3, 2, 2, 179, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'eget eros elementum pellentesque', '$448893.39', 'sapien iaculis congue vivamus metus arcu adipiscing molestie', 'Buy', 'House', '1410 Burrows Crossing', 'Kuanghe', 'China', 1, 2, 2, 177, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (9, 'ipsum praesent blandit lacinia', '$252470.38', 'id nisl venenatis lacinia aenean sit amet justo morbi ut odio', 'Buy', 'House', '08882 Helena Junction', 'Rochester', 'United States', 3, 3, 4, 170, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (81, 'in', '$417485.35', 'turpis a pede posuere nonummy integer non velit donec diam neque', 'Buy', 'House', '75 Blackbird Street', 'Galižana', 'Croatia', 2, 4, 1, 203, true, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'sed nisl nunc rhoncus', '$249950.96', 'vestibulum quam sapien', 'Buy', 'House', '797 Hoepker Circle', 'Antes', 'Portugal', 2, 3, 1, 181, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (7, 'convallis nulla', '$407194.93', 'in felis eu sapien cursus vestibulum proin eu', 'Buy', 'House', '5937 Carpenter Pass', 'Frederiksberg', 'Denmark', 1, 1, 4, 183, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'aenean lectus pellentesque eget', '$45748.33', 'non interdum in ante vestibulum ante ipsum', 'Buy', 'House', '2513 Bobwhite Parkway', 'Nalbandyan', 'Armenia', 3, 3, 1, 225, false, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (53, 'sem duis aliquam', '$242670.41', 'maecenas tristique est et tempus', 'Buy', 'House', '852 Beilfuss Hill', 'San Juan', 'Philippines', 2, 2, 3, 172, true, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (22, 'sollicitudin vitae', '$202328.64', 'luctus cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus vivamus', 'Buy', 'House', '6 Continental Crossing', 'Caimitillo', 'Panama', 3, 4, 2, 194, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'nunc', '$317183.13', 'leo odio porttitor id', 'Buy', 'House', '23 Lake View Court', 'Banjar Sambangan', 'Indonesia', 1, 4, 2, 178, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (87, 'ut at', '$127622.38', 'lorem integer tincidunt ante vel ipsum praesent blandit lacinia erat vestibulum sed', 'Buy', 'House', '761 Eastwood Place', 'Yŏnggwang-ŭp', 'North Korea', 3, 2, 4, 167, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (67, 'odio odio elementum eu', '$183304.70', 'nibh', 'Buy', 'House', '7 Little Fleur Road', 'Petrodvorets', 'Russia', 3, 3, 1, 205, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'nunc', '$226857.31', 'nibh in hac habitasse platea dictumst aliquam augue', 'Buy', 'House', '9 Mayer Parkway', 'Houston', 'United States', 3, 3, 2, 203, true, 2, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (63, 'justo etiam pretium iaculis', '$239850.22', 'nunc proin at turpis a pede posuere nonummy integer non velit', 'Buy', 'House', '7635 Kenwood Point', 'Zhangyelu', 'China', 1, 4, 2, 181, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'justo', '$101006.19', 'curae nulla dapibus dolor vel est donec odio justo sollicitudin ut suscipit a feugiat et', 'Buy', 'House', '58 Reinke Junction', 'Matola', 'Mozambique', 1, 1, 1, 216, true, 4, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'tristique tortor eu pede', '$195214.72', 'dis parturient montes nascetur ridiculus mus etiam vel augue vestibulum rutrum rutrum neque aenean auctor', 'Buy', 'House', '36821 Oneill Circle', 'Tiron', 'Indonesia', 2, 2, 4, 179, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (82, 'ut tellus', '$437110.63', 'posuere', 'Buy', 'House', '38 Green Ridge Alley', 'Altıağac', 'Azerbaijan', 3, 4, 2, 226, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (78, 'morbi', '$205003.40', 'ipsum', 'Buy', 'House', '00349 Bartelt Court', 'Oropéndolas', 'Honduras', 1, 4, 2, 171, false, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (28, 'sollicitudin mi sit amet', '$206600.60', 'consequat varius integer ac', 'Buy', 'House', '72 Butternut Parkway', 'Pentecoste', 'Brazil', 1, 1, 1, 190, false, 1, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (89, 'nulla integer pede', '$277523.81', 'odio', 'Buy', 'House', '1 American Circle', 'Lafayette', 'United States', 3, 1, 4, 211, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'vestibulum ante', '$33993.25', 'interdum mauris ullamcorper purus sit amet nulla quisque arcu libero rutrum ac lobortis vel', 'Buy', 'House', '8941 Northridge Center', 'Heshi', 'China', 3, 4, 4, 223, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (90, 'eget', '$338993.42', 'dui nec nisi volutpat eleifend donec ut dolor morbi vel lectus in quam fringilla', 'Buy', 'House', '19 Hansons Alley', 'Ngeni', 'Indonesia', 1, 3, 1, 183, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (31, 'odio cras mi', '$447461.59', 'mus vivamus vestibulum sagittis sapien cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus', 'Buy', 'House', '85168 Chive Way', 'Novobeysugskaya', 'Russia', 1, 2, 2, 189, false, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (50, 'ut odio cras', '$194921.41', 'et eros vestibulum ac est lacinia', 'Buy', 'House', '25 Lerdahl Park', 'Pokrov', 'Russia', 2, 2, 3, 162, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (100, 'pede lobortis ligula sit', '$373356.00', 'et magnis dis parturient montes nascetur ridiculus mus etiam vel augue vestibulum rutrum rutrum neque', 'Buy', 'House', '52831 Colorado Park', 'Kedawung', 'Indonesia', 2, 2, 1, 172, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (71, 'turpis', '$53515.43', 'sollicitudin', 'Buy', 'House', '9 Grayhawk Crossing', 'Banyubang', 'Indonesia', 3, 4, 4, 199, true, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'sem mauris laoreet ut', '$417029.22', 'in faucibus orci luctus et ultrices posuere cubilia', 'Buy', 'House', '50 Leroy Place', 'Bhairāhawā', 'Nepal', 3, 2, 1, 166, false, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (39, 'nisl duis bibendum', '$90860.95', 'id luctus nec molestie sed justo pellentesque viverra pede ac diam cras', 'Buy', 'House', '3143 Granby Trail', 'Gombang', 'Indonesia', 2, 1, 4, 212, false, 4, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (72, 'tempor', '$476870.74', 'enim sit amet nunc viverra dapibus nulla suscipit ligula in', 'Buy', 'House', '2 Amoth Alley', 'Wenquan', 'China', 1, 1, 1, 152, false, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'ut massa', '$44759.04', 'magna bibendum imperdiet nullam orci pede venenatis non sodales', 'Buy', 'House', '3 Farragut Pass', 'Goge', 'Indonesia', 1, 4, 2, 245, true, 3, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (10, 'tortor risus dapibus', '$265366.71', 'sed tincidunt eu felis fusce posuere felis sed lacus morbi sem mauris', 'Buy', 'House', '879 Banding Street', 'Osypenko', 'Ukraine', 3, 1, 1, 193, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (8, 'at nulla suspendisse potenti', '$46879.29', 'suspendisse ornare consequat lectus in est risus auctor sed tristique in tempus sit amet', 'Buy', 'House', '03469 Vermont Alley', 'Bāgh-e Maīdān', 'Afghanistan', 3, 2, 3, 210, true, 1, true); From 304913108eeec971e54faded06af50b4100a491b Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Tue, 26 Oct 2021 11:11:20 +0300 Subject: [PATCH 20/47] GET | /users/:userId/estates --- server/controllers/users/userEstates.js | 21 ++++++++++++++++++++ server/database/quieres/UserEstatesQuiery.js | 3 +++ server/database/quieres/index.js | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 server/controllers/users/userEstates.js create mode 100644 server/database/quieres/UserEstatesQuiery.js diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js new file mode 100644 index 0000000..3697422 --- /dev/null +++ b/server/controllers/users/userEstates.js @@ -0,0 +1,21 @@ +const { UserEstatesQuiery } = require('../../database/quieres/index'); + + +const userEstates = async (req, res) => { + + const userid = req.body.userid; + + try { + const { rows } = await UserEstatesQuiery(userid); + return res.json({ + data:rows, + message: 'get data Successfully !' + }); + } catch (err) { + return res.status(500).json({ + message: 'data Error: ' + err + }); + } +}; + +module.exports = userEstates; diff --git a/server/database/quieres/UserEstatesQuiery.js b/server/database/quieres/UserEstatesQuiery.js new file mode 100644 index 0000000..c145ac1 --- /dev/null +++ b/server/database/quieres/UserEstatesQuiery.js @@ -0,0 +1,3 @@ +const connection = require('../connection') + +module.exports = (userId) =>connection.query('SELECT * FROM estates WHERE userId = $1',[userId]) diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js index e69de29..ee4cc69 100644 --- a/server/database/quieres/index.js +++ b/server/database/quieres/index.js @@ -0,0 +1,3 @@ +const UserEstatesQuiery = require('./UserEstatesQuiery'); + +module.exports = {UserEstatesQuiery} From d1017e2b8b2e50fbda7eab8e416ec15604d2e58b Mon Sep 17 00:00:00 2001 From: ameera abedalnaser Date: Tue, 26 Oct 2021 11:34:03 +0300 Subject: [PATCH 21/47] update-fack-data related #6 --- server/database/config/imagesFackData.sql | 46 +++++++++++++++++--- server/database/config/realStateFackData.sql | 12 ++--- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/server/database/config/imagesFackData.sql b/server/database/config/imagesFackData.sql index d038652..3cfbc66 100644 --- a/server/database/config/imagesFackData.sql +++ b/server/database/config/imagesFackData.sql @@ -1,6 +1,40 @@ -insert into images ( estate_id, image) values (148,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (93, 'https://cdn.archilovers.com/projects/57d7daff-e586-4a1b-83b3-8d5bf0f8e070.jpg'); -insert into images ( estate_id, image) values (107, 'https://images.unsplash.com/photo-1616046229478-9901c5536a45?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8aG91c2UlMjBpbnRlcmlvcnxlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (34, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQgICbcCNuDBzMfR9fpdh0z-na1sAcEqI4tDQAyx2rnCteciKKUIIp4DoWfj1crDydSMEY&usqp=CAU'); -insert into images ( estate_id, image) values (42, 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQnZRKe5mthbwAN_6uYmne2gUU4U68zpHcWQ&usqp=CAU'); -insert into images ( estate_id, image) values (124, 'https://images.adsttc.com/media/images/5014/01c2/28ba/0d3b/4500/0b8d/slideshow/stringio.jpg?1414576481'); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (1,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (1,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (2,'https://cdn.vox-cdn.com/thumbor/6itLJS9BZ-B5gXPjM1AB_z-ZKVI=/0x0:3000x2000/1200x800/filters:focal(1260x760:1740x1240)/cdn.vox-cdn.com/uploads/chorus_image/image/65890203/iStock_1067331614.7.jpg'); +insert into images ( estate_id, image) values (2,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (2,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (2,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSh4O9GCySQw_9C24XfInhq-lYgfnHlRSMB5g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (4,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsj7rODPg-8QIdi6VONhE84ZFng3D5WpNfbA&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSBOKk95d1JPgPWHYPk_Z2NXd_ntTr-N0E0yQ&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + + + + + + + + + + + + + diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql index a31d32f..42314f7 100644 --- a/server/database/config/realStateFackData.sql +++ b/server/database/config/realStateFackData.sql @@ -1,6 +1,6 @@ -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (14, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (41, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (80, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (49, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (13, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); From 7f41bf344e8f954b31d54ae90692dfa4291587e0 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 13:35:54 +0300 Subject: [PATCH 22/47] sign --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7276943..c00798a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "airbnb-base" ], "parserOptions": { - "ecmaVersion": "latest" + "ecmaVersion": "13" }, "rules": { } From 0afc69e4e103b9931e4ffebfca85710a2a5971ff Mon Sep 17 00:00:00 2001 From: ameera abedalnaser Date: Tue, 26 Oct 2021 14:31:15 +0300 Subject: [PATCH 23/47] update-fack-data related #6 --- server/database/config/adminsFack Data.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/database/config/adminsFack Data.sql b/server/database/config/adminsFack Data.sql index 2a33e7d..421b924 100644 --- a/server/database/config/adminsFack Data.sql +++ b/server/database/config/adminsFack Data.sql @@ -1,3 +1,4 @@ -insert into admins (username, password , email) values ('Bobbie Fendt', 'F1A1CC71ED10594F97B1B6CF94A00727', 'bfendt0@blogspot.com'); -insert into admins (username, password , email) values ('Noni Djurdjevic', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ndjurdjevic1@icq.com'); -insert into admins (username, password , email) values ('Kizzie Maliphant', 'F1A1CC71ED10594F97B1B6CF94A00727', 'kmaliphant2@php.net'); +insert into admins (username, password , email) values ('ameera', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ameera2021abed@gmail.com'); +insert into admins (username, password , email) values ('haroon', 'F1A1CC71ED10594F97B1B6CF94A00727', 'hro19502001@gmail.com'); +insert into admins (username, password , email) values ('elham', 'F1A1CC71ED10594F97B1B6CF94A00727', 'elham2000fadel@gmail.com'); +insert into admins (username, password , email) values ('sallah', 'F1A1CC71ED10594F97B1B6CF94A00727', 'mohmsal96@gmail.com'); From dab02e493df69f404463e94240528d7e5d533947 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Tue, 26 Oct 2021 14:38:00 +0300 Subject: [PATCH 24/47] Update server/database/config/imagesFackData.sql --- server/database/config/imagesFackData.sql | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/server/database/config/imagesFackData.sql b/server/database/config/imagesFackData.sql index 3cfbc66..adf591e 100644 --- a/server/database/config/imagesFackData.sql +++ b/server/database/config/imagesFackData.sql @@ -25,16 +25,3 @@ insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic insert into images ( estate_id, image) values (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); insert into images ( estate_id, image) values (6,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); - - - - - - - - - - - - - From 02cca9b429d09180d9af1e9983aa3f850252371c Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 14:54:21 +0300 Subject: [PATCH 25/47] authentication function #9 --- .../middleware/auth/authenticateToken.js | 13 ------------- .../controllers/middleware/auth/createToken.js | 9 ++++++++- server/controllers/middleware/auth/isAuth.js | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) delete mode 100644 server/controllers/middleware/auth/authenticateToken.js create mode 100644 server/controllers/middleware/auth/isAuth.js diff --git a/server/controllers/middleware/auth/authenticateToken.js b/server/controllers/middleware/auth/authenticateToken.js deleted file mode 100644 index 75c6960..0000000 --- a/server/controllers/middleware/auth/authenticateToken.js +++ /dev/null @@ -1,13 +0,0 @@ -const { verify } = require('jsonwebtoken'); - -module.exports = (req, res, next) => { - if (req.cookies && req.cookies.token) { - verify(req.cookies.token, process.env.ACCESS_TOKEN_SECRET, (err, payload) => { - if (err) return res.status(403).json({ message: 'Invalid token' }); - req.user = payload; - next(); - }); - } else { - res.status(401).json({ message: 'No token provided' }); - } -}; \ No newline at end of file diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js index 64a5f33..ff300cb 100644 --- a/server/controllers/middleware/auth/createToken.js +++ b/server/controllers/middleware/auth/createToken.js @@ -1,8 +1,15 @@ const {sign} = require('jsonwebtoken'); module.exports = (req, res, next) => { const payload = req.user; - const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); + try{ + const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); res.status(201).cookie('token', accessToken, { httpOnly: true + }).json({ + message: 'User created successfully' }); + }catch(err){ + return next(err) + } + } \ No newline at end of file diff --git a/server/controllers/middleware/auth/isAuth.js b/server/controllers/middleware/auth/isAuth.js new file mode 100644 index 0000000..440feb3 --- /dev/null +++ b/server/controllers/middleware/auth/isAuth.js @@ -0,0 +1,16 @@ +const { verify } = require('jsonwebtoken'); + +module.exports = async(req, res, next) => { + if (req.cookies?.token) { + try{ + const token = verify(req.cookies.token, process.env.ACCESS_TOKEN_SECRET) + req.user = token; + next() + }catch{ + res.status(403).json({ message: 'Invalid token' }) + } + + } else { + res.status(401).json({ message: 'No token provided' }); + } +}; \ No newline at end of file From 9078e63e684c2eba698773fb136032b135c34ba4 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Tue, 26 Oct 2021 15:13:10 +0300 Subject: [PATCH 26/47] remove sign code #9 --- server/controllers/users/signup.js | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 server/controllers/users/signup.js diff --git a/server/controllers/users/signup.js b/server/controllers/users/signup.js deleted file mode 100644 index b214d83..0000000 --- a/server/controllers/users/signup.js +++ /dev/null @@ -1,13 +0,0 @@ -const signUpSchema = require("../../utils/validation/signUpSchema") -const { hash } = require('bcrypt'); -const signUpQuery = require('../../database/quieres/account/signUp'); -module.exports = async (req,res,next)=>{ - try{ - const {username,password,email,phone} = await signUpSchema.validate(req.body); - const hasedPswrd = await hash(password, 8); - const user = await signUpQuery(username,email,phone,hasedPswrd); - - }catch(err){ - - } -} \ No newline at end of file From 3a04dba5ab52e4573ed6b8dc6e7b694db70e45f8 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Tue, 26 Oct 2021 23:15:45 +0300 Subject: [PATCH 27/47] create end point to get all users #17 --- server/controllers/index.js | 3 +++ server/controllers/users/getAllUsers.js | 9 +++++++++ server/controllers/users/index.js | 3 +++ server/database/config/build.js | 5 +++-- server/database/connection.js | 6 +++--- server/database/quieres/getAllUsersQuery.js | 5 +++++ server/database/quieres/index.js | 6 ++++++ server/routes/index.js | 3 +++ 8 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 server/controllers/users/getAllUsers.js create mode 100644 server/database/quieres/getAllUsersQuery.js diff --git a/server/controllers/index.js b/server/controllers/index.js index e69de29..b158217 100644 --- a/server/controllers/index.js +++ b/server/controllers/index.js @@ -0,0 +1,3 @@ +const getAllUsers = require('./users/getAllUsers'); + +module.exports = { getAllUsers }; diff --git a/server/controllers/users/getAllUsers.js b/server/controllers/users/getAllUsers.js new file mode 100644 index 0000000..2550be6 --- /dev/null +++ b/server/controllers/users/getAllUsers.js @@ -0,0 +1,9 @@ +const { getAllUsersQuery } = require('../../database/quieres'); + +const getAllUsers = (req, res, next) => { + getAllUsersQuery() + .then(({ rows }) => res.json(({ data: rows }))) + .catch((err) => res.json({ err })) + .catch((err) => next(err)); +}; +module.exports = getAllUsers; diff --git a/server/controllers/users/index.js b/server/controllers/users/index.js index e69de29..afcad12 100644 --- a/server/controllers/users/index.js +++ b/server/controllers/users/index.js @@ -0,0 +1,3 @@ +const getAllUsers = require('./getAllUsers'); + +module.exports = { getAllUsers }; diff --git a/server/database/config/build.js b/server/database/config/build.js index 152437f..7b1c41c 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -2,9 +2,10 @@ const { readFileSync } = require('fs'); const { join } = require('path'); const connection = require('../connection'); + const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - sql+= readFileSync(join(__dirname, 'fakeData.sql')).toString(); + sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); return connection.query(sql); }; -module.exports = dbBuild; \ No newline at end of file +module.exports = dbBuild; diff --git a/server/database/connection.js b/server/database/connection.js index b26aafd..7ef7a43 100644 --- a/server/database/connection.js +++ b/server/database/connection.js @@ -1,6 +1,6 @@ require('env2')('.env'); -const {Pool} = require('pg'); - +const { Pool } = require('pg'); + const { NODE_ENV, DATABASE_URL_DEV, DATABASE_URL, DATABASE_URL_TEST, } = process.env; @@ -22,4 +22,4 @@ const options = { connectionString: dbUrl, ssl: { rejectUnauthorized: false }, }; -module.exports = new Pool(options); \ No newline at end of file +module.exports = new Pool(options); diff --git a/server/database/quieres/getAllUsersQuery.js b/server/database/quieres/getAllUsersQuery.js new file mode 100644 index 0000000..24231b0 --- /dev/null +++ b/server/database/quieres/getAllUsersQuery.js @@ -0,0 +1,5 @@ +const connection = require('../connection'); + +const getAllUsersQuery = () => connection.query('SELECT * FROM agents'); + +module.exports = getAllUsersQuery; diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js index e69de29..61e3b66 100644 --- a/server/database/quieres/index.js +++ b/server/database/quieres/index.js @@ -0,0 +1,6 @@ +const getAllUsersQuery = require('./getAllUsersQuery'); + +module.exports = { + getAllUsersQuery, + +}; diff --git a/server/routes/index.js b/server/routes/index.js index f041226..0c66e24 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,8 +1,11 @@ const express = require('express'); const { notFoundError, serverError } = require('../controllers/errors'); +const { getAllUsers } = require('../controllers'); const router = express.Router(); +router.get('/users', getAllUsers); router.use(notFoundError); router.use(serverError); + module.exports = router; From 44a08028378ee754839c393084214a7a3e03bcd3 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Tue, 26 Oct 2021 23:52:40 +0300 Subject: [PATCH 28/47] edit promies to async await #17 --- server/controllers/users/getAllUsers.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/controllers/users/getAllUsers.js b/server/controllers/users/getAllUsers.js index 2550be6..712052c 100644 --- a/server/controllers/users/getAllUsers.js +++ b/server/controllers/users/getAllUsers.js @@ -1,9 +1,12 @@ const { getAllUsersQuery } = require('../../database/quieres'); -const getAllUsers = (req, res, next) => { - getAllUsersQuery() - .then(({ rows }) => res.json(({ data: rows }))) - .catch((err) => res.json({ err })) - .catch((err) => next(err)); +const getAllUsers = async (req, res) => { + try { + const resalut = await getAllUsersQuery(); + const { data } = resalut; + res.json(({ data: data.rows })); + } catch (err) { + res.json({ err }); + } }; module.exports = getAllUsers; From 2818cea166720ae29fcb977fd17ddf50854497f6 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Wed, 27 Oct 2021 00:19:28 +0300 Subject: [PATCH 29/47] create end point to log out #16 --- server/controllers/index.js | 3 ++- server/controllers/logout.js | 5 +++++ server/routes/index.js | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 server/controllers/logout.js diff --git a/server/controllers/index.js b/server/controllers/index.js index b158217..7713304 100644 --- a/server/controllers/index.js +++ b/server/controllers/index.js @@ -1,3 +1,4 @@ const getAllUsers = require('./users/getAllUsers'); +const logout = require('./logout'); -module.exports = { getAllUsers }; +module.exports = { getAllUsers, logout }; diff --git a/server/controllers/logout.js b/server/controllers/logout.js new file mode 100644 index 0000000..c497d9e --- /dev/null +++ b/server/controllers/logout.js @@ -0,0 +1,5 @@ +const logout = (req, res) => { + res.clearCookie('token'); + res.json({ message: 'logged out Succefully' }); +}; +module.exports = logout; diff --git a/server/routes/index.js b/server/routes/index.js index 0c66e24..08068d6 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,10 +1,11 @@ const express = require('express'); const { notFoundError, serverError } = require('../controllers/errors'); -const { getAllUsers } = require('../controllers'); +const { getAllUsers, logout } = require('../controllers'); const router = express.Router(); router.get('/users', getAllUsers); +router.get('/logout', logout); router.use(notFoundError); router.use(serverError); From 57615cf01d08bf7e17b0768a321bf847894050bd Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Wed, 27 Oct 2021 10:16:57 +0300 Subject: [PATCH 30/47] edit require Router #16 --- server/routes/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/routes/index.js b/server/routes/index.js index 08068d6..fc6af5b 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,9 +1,7 @@ -const express = require('express'); +const router = require('express').Router(); const { notFoundError, serverError } = require('../controllers/errors'); const { getAllUsers, logout } = require('../controllers'); -const router = express.Router(); - router.get('/users', getAllUsers); router.get('/logout', logout); router.use(notFoundError); From a359212ceb8b8782cbaefe39cf11ece8ac8c3a36 Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Wed, 27 Oct 2021 12:40:59 +0300 Subject: [PATCH 31/47] prepar setting data base test and testing for endpoint /users #17 --- server/controllers/users/getAllUsers.js | 11 ++++---- ...adminsFack Data.sql => adminsFackData.sql} | 0 server/database/config/build.js | 7 +++-- .../database/config/{bulid.sql => build.sql} | 0 server/database/config/realStateFackData.sql | 12 ++++----- server/test/index.test.js | 26 +++++++++++++++++++ 6 files changed, 43 insertions(+), 13 deletions(-) rename server/database/config/{adminsFack Data.sql => adminsFackData.sql} (100%) rename server/database/config/{bulid.sql => build.sql} (100%) create mode 100644 server/test/index.test.js diff --git a/server/controllers/users/getAllUsers.js b/server/controllers/users/getAllUsers.js index 712052c..bf829ce 100644 --- a/server/controllers/users/getAllUsers.js +++ b/server/controllers/users/getAllUsers.js @@ -1,12 +1,13 @@ +/* eslint-disable no-console */ const { getAllUsersQuery } = require('../../database/quieres'); -const getAllUsers = async (req, res) => { +const getAllUsers = async (req, res, next) => { try { - const resalut = await getAllUsersQuery(); - const { data } = resalut; - res.json(({ data: data.rows })); + const { rows } = await getAllUsersQuery(); + + res.json(({ data: rows, msg: 'You are get all users' })); } catch (err) { - res.json({ err }); + next(err); } }; module.exports = getAllUsers; diff --git a/server/database/config/adminsFack Data.sql b/server/database/config/adminsFackData.sql similarity index 100% rename from server/database/config/adminsFack Data.sql rename to server/database/config/adminsFackData.sql diff --git a/server/database/config/build.js b/server/database/config/build.js index 7b1c41c..8b1c2b1 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -5,7 +5,10 @@ const connection = require('../connection'); const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); + sql += readFileSync(join(__dirname, 'adminsFackData.sql')).toString(); + sql += readFileSync(join(__dirname, 'agentsFackData.sql')).toString(); + sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); + sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); return connection.query(sql); }; -module.exports = dbBuild; +module.exports = { dbBuild }; diff --git a/server/database/config/bulid.sql b/server/database/config/build.sql similarity index 100% rename from server/database/config/bulid.sql rename to server/database/config/build.sql diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql index 42314f7..9b46bdd 100644 --- a/server/database/config/realStateFackData.sql +++ b/server/database/config/realStateFackData.sql @@ -1,6 +1,6 @@ -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); diff --git a/server/test/index.test.js b/server/test/index.test.js new file mode 100644 index 0000000..703f6c6 --- /dev/null +++ b/server/test/index.test.js @@ -0,0 +1,26 @@ +/* eslint-disable no-undef */ +const supertest = require('supertest'); +const app = require('../app'); +const { dbBuild } = require('../database/config/build'); +const connection = require('../database/connection'); + +beforeEach(() => dbBuild()); + +describe('All users', () => { + test('get all users', (done) => { + supertest(app) + .get('/api/v1/users') + .expect(200) + .expect('Content-Type', /json/) + .end((err, res) => { + if (err) return done(err); + expect(res.body.msg).toBe('You are get all users'); + return done(); + }); + }); + test('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); + +afterAll(() => connection.end()); From c39139810da12e377d069794acec6dd966727592 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 12:48:12 +0300 Subject: [PATCH 32/47] fix function --- package.json | 1 + server/controllers/index.js | 3 ++ server/controllers/users/index.js | 3 ++ server/controllers/users/userEstates.js | 31 +++++++++----------- server/database/config/realStateFackData.sql | 12 ++++---- server/database/connection.js | 6 ++-- server/database/quieres/UserEstatesQuiery.js | 8 +++-- server/routes/index.js | 3 ++ 8 files changed, 39 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index b7d5949..f4eed0e 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "compression": "^1.7.4", "cookie-parser": "^1.4.5", "cross": "^1.0.0", + "cross-env": "^7.0.3", "env2": "^2.2.2", "express": "^4.17.1", "joi": "^17.4.2", diff --git a/server/controllers/index.js b/server/controllers/index.js index e69de29..c867410 100644 --- a/server/controllers/index.js +++ b/server/controllers/index.js @@ -0,0 +1,3 @@ +const { userEstateshandler } = require('./users'); + +module.exports = { userEstateshandler }; diff --git a/server/controllers/users/index.js b/server/controllers/users/index.js index e69de29..9ce4a8a 100644 --- a/server/controllers/users/index.js +++ b/server/controllers/users/index.js @@ -0,0 +1,3 @@ +const userEstateshandler = require('./userEstates'); + +module.exports = { userEstateshandler }; diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index 3697422..cf63535 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -1,21 +1,18 @@ const { UserEstatesQuiery } = require('../../database/quieres/index'); - -const userEstates = async (req, res) => { - - const userid = req.body.userid; - - try { - const { rows } = await UserEstatesQuiery(userid); - return res.json({ - data:rows, - message: 'get data Successfully !' - }); - } catch (err) { - return res.status(500).json({ - message: 'data Error: ' + err - }); - } +const userEstateshandler = async (req, res) => { + const { userId } = req.params; + try { + const { rows } = await UserEstatesQuiery(userId); + return res.json({ + data: rows, + message: 'get data Successfully !', + }); + } catch (err) { + return res.status(500).json({ + message: `data Error: ${err}`, + }); + } }; -module.exports = userEstates; +module.exports = userEstateshandler; diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql index 42314f7..9b46bdd 100644 --- a/server/database/config/realStateFackData.sql +++ b/server/database/config/realStateFackData.sql @@ -1,6 +1,6 @@ -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); diff --git a/server/database/connection.js b/server/database/connection.js index b26aafd..7ef7a43 100644 --- a/server/database/connection.js +++ b/server/database/connection.js @@ -1,6 +1,6 @@ require('env2')('.env'); -const {Pool} = require('pg'); - +const { Pool } = require('pg'); + const { NODE_ENV, DATABASE_URL_DEV, DATABASE_URL, DATABASE_URL_TEST, } = process.env; @@ -22,4 +22,4 @@ const options = { connectionString: dbUrl, ssl: { rejectUnauthorized: false }, }; -module.exports = new Pool(options); \ No newline at end of file +module.exports = new Pool(options); diff --git a/server/database/quieres/UserEstatesQuiery.js b/server/database/quieres/UserEstatesQuiery.js index c145ac1..c4e23b4 100644 --- a/server/database/quieres/UserEstatesQuiery.js +++ b/server/database/quieres/UserEstatesQuiery.js @@ -1,3 +1,7 @@ -const connection = require('../connection') +const connection = require('../connection'); -module.exports = (userId) =>connection.query('SELECT * FROM estates WHERE userId = $1',[userId]) +connection.query('SELECT * FROM estates WHERE agent_id = $1', [1]); + +module.exports = (userId) => connection.query('SELECT * FROM estates WHERE agent_id = $1', [userId]); + +// diff --git a/server/routes/index.js b/server/routes/index.js index f041226..53a5394 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,8 +1,11 @@ const express = require('express'); const { notFoundError, serverError } = require('../controllers/errors'); +const { userEstateshandler } = require('../controllers'); const router = express.Router(); +router.get('/users/:userId/estates', userEstateshandler); + router.use(notFoundError); router.use(serverError); module.exports = router; From 21930ac6ddbe7927201bc3c938f697aed42855ff Mon Sep 17 00:00:00 2001 From: mohammedsalah7 Date: Wed, 27 Oct 2021 13:34:13 +0300 Subject: [PATCH 33/47] change test to async/await #17 --- server/controllers/users/getAllUsers.js | 2 +- server/database/config/adminsFackData.sql | 4 -- server/database/config/agentsFackData.sql | 6 --- server/database/config/build.js | 5 +-- server/database/config/fakeData.sql | 43 ++++++++++++++++++++ server/database/config/imagesFackData.sql | 27 ------------ server/database/config/realStateFackData.sql | 6 --- server/test/index.test.js | 20 +++------ 8 files changed, 51 insertions(+), 62 deletions(-) delete mode 100644 server/database/config/adminsFackData.sql delete mode 100644 server/database/config/agentsFackData.sql delete mode 100644 server/database/config/imagesFackData.sql delete mode 100644 server/database/config/realStateFackData.sql diff --git a/server/controllers/users/getAllUsers.js b/server/controllers/users/getAllUsers.js index bf829ce..b5cb32f 100644 --- a/server/controllers/users/getAllUsers.js +++ b/server/controllers/users/getAllUsers.js @@ -5,7 +5,7 @@ const getAllUsers = async (req, res, next) => { try { const { rows } = await getAllUsersQuery(); - res.json(({ data: rows, msg: 'You are get all users' })); + res.json(({ data: rows })); } catch (err) { next(err); } diff --git a/server/database/config/adminsFackData.sql b/server/database/config/adminsFackData.sql deleted file mode 100644 index 421b924..0000000 --- a/server/database/config/adminsFackData.sql +++ /dev/null @@ -1,4 +0,0 @@ -insert into admins (username, password , email) values ('ameera', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ameera2021abed@gmail.com'); -insert into admins (username, password , email) values ('haroon', 'F1A1CC71ED10594F97B1B6CF94A00727', 'hro19502001@gmail.com'); -insert into admins (username, password , email) values ('elham', 'F1A1CC71ED10594F97B1B6CF94A00727', 'elham2000fadel@gmail.com'); -insert into admins (username, password , email) values ('sallah', 'F1A1CC71ED10594F97B1B6CF94A00727', 'mohmsal96@gmail.com'); diff --git a/server/database/config/agentsFackData.sql b/server/database/config/agentsFackData.sql deleted file mode 100644 index 8af4e91..0000000 --- a/server/database/config/agentsFackData.sql +++ /dev/null @@ -1,6 +0,0 @@ -insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', '6D29E04CD937DC37CB72E42736CA238C', '481-649-8020', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); -insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', '6D29E04CD937DC37CB72E42736CA238C', '663-871-7450', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); -insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '630-385-8312', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); -insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', '6D29E04CD937DC37CB72E42736CA238C', '210-886-2847', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); -insert into agents (name, email, password , phone, avater) values ('Lillian', 'abutrford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '270-209-1221', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); -insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', '6D29E04CD937DC37CB72E42736CA238C', '426-753-9984', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); diff --git a/server/database/config/build.js b/server/database/config/build.js index 8b1c2b1..93646ef 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -5,10 +5,7 @@ const connection = require('../connection'); const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - sql += readFileSync(join(__dirname, 'adminsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'agentsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); + sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); return connection.query(sql); }; module.exports = { dbBuild }; diff --git a/server/database/config/fakeData.sql b/server/database/config/fakeData.sql index e69de29..5f62648 100644 --- a/server/database/config/fakeData.sql +++ b/server/database/config/fakeData.sql @@ -0,0 +1,43 @@ +insert into admins (username, password , email) values ('ameera', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ameera2021abed@gmail.com'); +insert into admins (username, password , email) values ('haroon', 'F1A1CC71ED10594F97B1B6CF94A00727', 'hro19502001@gmail.com'); +insert into admins (username, password , email) values ('elham', 'F1A1CC71ED10594F97B1B6CF94A00727', 'elham2000fadel@gmail.com'); +insert into admins (username, password , email) values ('sallah', 'F1A1CC71ED10594F97B1B6CF94A00727', 'mohmsal96@gmail.com'); +insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', '6D29E04CD937DC37CB72E42736CA238C', '481-649-8020', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', '6D29E04CD937DC37CB72E42736CA238C', '663-871-7450', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '630-385-8312', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', '6D29E04CD937DC37CB72E42736CA238C', '210-886-2847', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Lillian', 'abutrford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '270-209-1221', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', '6D29E04CD937DC37CB72E42736CA238C', '426-753-9984', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (1,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (1,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (2,'https://cdn.vox-cdn.com/thumbor/6itLJS9BZ-B5gXPjM1AB_z-ZKVI=/0x0:3000x2000/1200x800/filters:focal(1260x760:1740x1240)/cdn.vox-cdn.com/uploads/chorus_image/image/65890203/iStock_1067331614.7.jpg'); +insert into images ( estate_id, image) values (2,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (2,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (2,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSh4O9GCySQw_9C24XfInhq-lYgfnHlRSMB5g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (4,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsj7rODPg-8QIdi6VONhE84ZFng3D5WpNfbA&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSBOKk95d1JPgPWHYPk_Z2NXd_ntTr-N0E0yQ&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); diff --git a/server/database/config/imagesFackData.sql b/server/database/config/imagesFackData.sql deleted file mode 100644 index adf591e..0000000 --- a/server/database/config/imagesFackData.sql +++ /dev/null @@ -1,27 +0,0 @@ -insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (1,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (1,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); - -insert into images ( estate_id, image) values (2,'https://cdn.vox-cdn.com/thumbor/6itLJS9BZ-B5gXPjM1AB_z-ZKVI=/0x0:3000x2000/1200x800/filters:focal(1260x760:1740x1240)/cdn.vox-cdn.com/uploads/chorus_image/image/65890203/iStock_1067331614.7.jpg'); -insert into images ( estate_id, image) values (2,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (2,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (2,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); - -insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSh4O9GCySQw_9C24XfInhq-lYgfnHlRSMB5g&usqp=CAU'); -insert into images ( estate_id, image) values (3,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (3,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (4,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (4,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); - -insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsj7rODPg-8QIdi6VONhE84ZFng3D5WpNfbA&usqp=CAU'); -insert into images ( estate_id, image) values (5,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (5,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); -insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSBOKk95d1JPgPWHYPk_Z2NXd_ntTr-N0E0yQ&usqp=CAU'); -insert into images ( estate_id, image) values (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); -insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); -insert into images ( estate_id, image) values (6,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); diff --git a/server/database/config/realStateFackData.sql b/server/database/config/realStateFackData.sql deleted file mode 100644 index 9b46bdd..0000000 --- a/server/database/config/realStateFackData.sql +++ /dev/null @@ -1,6 +0,0 @@ -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); -insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); diff --git a/server/test/index.test.js b/server/test/index.test.js index 703f6c6..50c69d0 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -5,22 +5,14 @@ const { dbBuild } = require('../database/config/build'); const connection = require('../database/connection'); beforeEach(() => dbBuild()); +afterAll(() => connection.end()); -describe('All users', () => { - test('get all users', (done) => { - supertest(app) +describe('Tests Server', () => { + test('get all users', async () => { + const res = await supertest(app) .get('/api/v1/users') .expect(200) - .expect('Content-Type', /json/) - .end((err, res) => { - if (err) return done(err); - expect(res.body.msg).toBe('You are get all users'); - return done(); - }); - }); - test('adds 1 + 2 to equal 3', () => { - expect(1 + 2).toBe(3); + .expect('Content-Type', /json/); + return expect(6).toEqual(res.body.data.length); }); }); - -afterAll(() => connection.end()); From 68b7707b5514e571ad0f30937c2d3b4865696716 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 14:16:35 +0300 Subject: [PATCH 34/47] convert test to async await --- server/test/index.test.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/server/test/index.test.js b/server/test/index.test.js index 1207108..7ed09b3 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -24,16 +24,10 @@ describe('All users', () => { }); describe('user estates', () => { - test('get users estates', (done) => { - supertest(app) - .get('/api/v1/users/3/estates') - .expect(200) - .expect('Content-Type', /json/) - .end((err, res) => { - if (err) return done(err); - expect(res.body.message).toBe('get data Successfully !'); - return done(); - }); + test('get users estates', async () => { + const result = await supertest(app).get('/api/v1/users/3/estates'); + expect(result.body.message).toBe('get data Successfully !'); }); }); + afterAll(() => connection.end()); From 08fa33f3a6503c1e00f8d42da16de74bf8d394b8 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Wed, 27 Oct 2021 15:07:06 +0300 Subject: [PATCH 35/47] remove cross module, edit project name, edit test and remove unnecessaery edits to the build.js file --- package.json | 3 +-- server/database/config/build.js | 4 ---- server/test/index.test.js | 7 ++++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7889f26..ed1260e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "Housy", + "name": "housy", "version": "1.0.0", "description": "", "main": "index.js", @@ -23,7 +23,6 @@ "bcrypt": "^5.0.1", "compression": "^1.7.4", "cookie-parser": "^1.4.5", - "cross": "^1.0.0", "cross-env": "^7.0.3", "env2": "^2.2.2", "express": "^4.17.1", diff --git a/server/database/config/build.js b/server/database/config/build.js index 5861530..93646ef 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -5,10 +5,6 @@ const connection = require('../connection'); const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - sql += readFileSync(join(__dirname, 'adminsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'agentsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'realStateFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); return connection.query(sql); }; diff --git a/server/test/index.test.js b/server/test/index.test.js index 511b6b3..b235a33 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -19,9 +19,10 @@ describe('Tests Server', () => { describe('user estates', () => { test('get users estates', async () => { - const result = await supertest(app).get('/api/v1/users/3/estates'); + const result = await supertest(app) + .get('/api/v1/users/3/estates') + .expect(200) + .expect('Content-Type', /json/); expect(result.body.message).toBe('get data Successfully !'); }); }); - -afterAll(() => connection.end()); From f0729c414edbd314a652bfd9547165abb838d737 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Wed, 27 Oct 2021 15:16:08 +0300 Subject: [PATCH 36/47] edit project name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7d5949..eed6e3b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "Housy", + "name": "housy", "version": "1.0.0", "description": "", "main": "index.js", From b2c99071a2e8011e4a968534ec3b0663eac88312 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 15:32:45 +0300 Subject: [PATCH 37/47] add more test --- server/controllers/users/userEstates.js | 26 ++++++++++++-------- server/database/config/build.js | 4 --- server/database/quieres/UserEstatesQuiery.js | 4 --- server/database/quieres/index.js | 4 +-- server/test/index.test.js | 10 ++++++-- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index cf63535..f78d63b 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -1,16 +1,22 @@ -const { UserEstatesQuiery } = require('../../database/quieres/index'); +const { UserEstatesQuery } = require('../../database/quieres/index'); const userEstateshandler = async (req, res) => { const { userId } = req.params; - try { - const { rows } = await UserEstatesQuiery(userId); - return res.json({ - data: rows, - message: 'get data Successfully !', - }); - } catch (err) { - return res.status(500).json({ - message: `data Error: ${err}`, + + if (userId > 0) { + try { + const { rows } = await UserEstatesQuery(userId); + return res.json({ + data: rows, + }); + } catch (err) { + return res.status(500).json({ + message: `data Error: ${err}`, + }); + } + } else { + res.status(404).json({ + message: 'enter valid user id', }); } }; diff --git a/server/database/config/build.js b/server/database/config/build.js index 5861530..93646ef 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -5,10 +5,6 @@ const connection = require('../connection'); const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); - sql += readFileSync(join(__dirname, 'adminsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'agentsFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'realStateFackData.sql')).toString(); - sql += readFileSync(join(__dirname, 'imagesFackData.sql')).toString(); sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); return connection.query(sql); }; diff --git a/server/database/quieres/UserEstatesQuiery.js b/server/database/quieres/UserEstatesQuiery.js index c4e23b4..811caa3 100644 --- a/server/database/quieres/UserEstatesQuiery.js +++ b/server/database/quieres/UserEstatesQuiery.js @@ -1,7 +1,3 @@ const connection = require('../connection'); -connection.query('SELECT * FROM estates WHERE agent_id = $1', [1]); - module.exports = (userId) => connection.query('SELECT * FROM estates WHERE agent_id = $1', [userId]); - -// diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js index 8b9bb13..3eefb28 100644 --- a/server/database/quieres/index.js +++ b/server/database/quieres/index.js @@ -1,8 +1,8 @@ -const UserEstatesQuiery = require('./UserEstatesQuiery'); +const UserEstatesQuery = require('./UserEstatesQuiery'); const getAllUsersQuery = require('./getAllUsersQuery'); module.exports = { getAllUsersQuery, - UserEstatesQuiery, + UserEstatesQuery, }; diff --git a/server/test/index.test.js b/server/test/index.test.js index 511b6b3..09042bf 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -20,8 +20,14 @@ describe('Tests Server', () => { describe('user estates', () => { test('get users estates', async () => { const result = await supertest(app).get('/api/v1/users/3/estates'); - expect(result.body.message).toBe('get data Successfully !'); + expect(result.status).toBe(200); + expect(result.body.data.length).toBe(1); }); }); -afterAll(() => connection.end()); +describe('user estates', () => { + test('get users estates', async () => { + const result = await supertest(app).get('/api/v1/users/three/estates'); + expect(result.status).toBe(404); + }); +}); From a0df53a4125a75ab3e998bcb21da6fde846eb27d Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Wed, 27 Oct 2021 15:34:43 +0300 Subject: [PATCH 38/47] authentciation --- .../middleware/auth/createToken.js | 15 ----------- server/controllers/middleware/auth/isAuth.js | 16 ------------ server/controllers/middleware/index.js | 4 +++ server/controllers/middleware/isAuth.js | 21 ++++++++++++++++ server/database/config/fakeData.sql | 24 ++++++++++++++++++ server/utils/index.js | 5 ++++ server/utils/tokenFunction.js | 25 +++++++++++++++++++ 7 files changed, 79 insertions(+), 31 deletions(-) delete mode 100644 server/controllers/middleware/auth/createToken.js delete mode 100644 server/controllers/middleware/auth/isAuth.js create mode 100644 server/controllers/middleware/isAuth.js create mode 100644 server/utils/tokenFunction.js diff --git a/server/controllers/middleware/auth/createToken.js b/server/controllers/middleware/auth/createToken.js deleted file mode 100644 index ff300cb..0000000 --- a/server/controllers/middleware/auth/createToken.js +++ /dev/null @@ -1,15 +0,0 @@ -const {sign} = require('jsonwebtoken'); -module.exports = (req, res, next) => { - const payload = req.user; - try{ - const accessToken = sign(payload,process.env.ACCESS_TOKEN_SECRET); - res.status(201).cookie('token', accessToken, { - httpOnly: true - }).json({ - message: 'User created successfully' - }); - }catch(err){ - return next(err) - } - -} \ No newline at end of file diff --git a/server/controllers/middleware/auth/isAuth.js b/server/controllers/middleware/auth/isAuth.js deleted file mode 100644 index 440feb3..0000000 --- a/server/controllers/middleware/auth/isAuth.js +++ /dev/null @@ -1,16 +0,0 @@ -const { verify } = require('jsonwebtoken'); - -module.exports = async(req, res, next) => { - if (req.cookies?.token) { - try{ - const token = verify(req.cookies.token, process.env.ACCESS_TOKEN_SECRET) - req.user = token; - next() - }catch{ - res.status(403).json({ message: 'Invalid token' }) - } - - } else { - res.status(401).json({ message: 'No token provided' }); - } -}; \ No newline at end of file diff --git a/server/controllers/middleware/index.js b/server/controllers/middleware/index.js index e69de29..5433386 100644 --- a/server/controllers/middleware/index.js +++ b/server/controllers/middleware/index.js @@ -0,0 +1,4 @@ +const isAuth = require('./isAuth'); +module.exports = { + isAuth +} \ No newline at end of file diff --git a/server/controllers/middleware/isAuth.js b/server/controllers/middleware/isAuth.js new file mode 100644 index 0000000..6e46936 --- /dev/null +++ b/server/controllers/middleware/isAuth.js @@ -0,0 +1,21 @@ +const { verifyToken } = require('../../utils'); + +const isAuth = async (req, res, next) => { + try { + const { + cookies: { token }, + } = req; + if (!token) + return res.status(401).json({ + message: 'You are not authorized ', + }); + const decoded = await verifyToken(token); + req.user = decoded + return next(); + } catch (err) { + return res.status(401).json({ + message: 'You are not authorized ', + }); + } +}; +module.exports = isAuth; \ No newline at end of file diff --git a/server/database/config/fakeData.sql b/server/database/config/fakeData.sql index e69de29..dc8681a 100644 --- a/server/database/config/fakeData.sql +++ b/server/database/config/fakeData.sql @@ -0,0 +1,24 @@ +INSERT INTO agents (name, email, password , phone) + VALUES ('Kai', 'kallport0@patch.com', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', '677-871-7450'), + ('Trixie', 'tbeadon1@plala.or.jp', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', '663-871-7450'), +('Allina', 'aburford2@tumblr.com', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', '630-385-8312'); + +INSERT INTO admins (username, password , email) VALUES ('ameera', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', 'ameera2021abed@gmail.com'), + ('haroon', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', 'hro19502001@gmail.com'), + ('elham', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', 'elham2000fadel@gmail.com'), +('sallah', '$2b$10$oNaAu46EHAyOCiufPgchaOQDq5opRxSFHB20m.e3wzDBlM5Yzztf2', 'mohmsal96@gmail.com'); + +INSERT INTO estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) VALUES (1, 'suscipit ligula in', '$190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false), + (2, 'ipsum primis in', '$242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true), + (3, 'rhoncus sed vestibulum', '$84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false), +(4, 'sociis natoque penatibus et', '$106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false), + (5, 'in faucibus orci luctus', '$116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false), + (6, 'vestibulum ante ipsum primis', '$194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); + +INSERT INTO images ( estate_id, image) VALUES (1,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'), + (2,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/2.tobiarchitects.1526566679.5654.jpg'), + (3,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/3.tobiarchitects.1526566679.5654.jpg'), + (4,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/4.tobiarchitects.1526566679.5654.jpg'), + (5,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/5.tobiarchitects.1526566679.5654.jpg'), + (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/6.tobiarchitects.1526566679.5654.jpg'); + diff --git a/server/utils/index.js b/server/utils/index.js index e69de29..29a6754 100644 --- a/server/utils/index.js +++ b/server/utils/index.js @@ -0,0 +1,5 @@ +const { signToken, verifyToken } = require('./tokenFunction'); +module.exports = { + signToken, + verifyToken +} \ No newline at end of file diff --git a/server/utils/tokenFunction.js b/server/utils/tokenFunction.js new file mode 100644 index 0000000..bef66f9 --- /dev/null +++ b/server/utils/tokenFunction.js @@ -0,0 +1,25 @@ +const { verify, sign } = require('jsonwebtoken'); +const { + env: { ACCESS_TOKEN_SECRET }, +} = process; +const verifyToken = (token) => + new Promise((resolve, reject) => { + verify(token, ACCESS_TOKEN_SECRET, (err, decoded) => { + if (err) { + reject(err); + } else { + resolve(decoded); + } + }); + }); +const signToken = (payload) => + new Promise((resolve, reject) => { + sign(payload, ACCESS_TOKEN_SECRET, (err, token) => { + if (err) { + return reject(err); + } + return resolve(token); + }); + }); + +module.exports = { signToken, verifyToken }; \ No newline at end of file From 6db88eaa25862ffd0759576279084588f81fce66 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Wed, 27 Oct 2021 16:28:44 +0300 Subject: [PATCH 39/47] restore fake date --- server/database/config/fakeData.sql | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/server/database/config/fakeData.sql b/server/database/config/fakeData.sql index e69de29..5f62648 100644 --- a/server/database/config/fakeData.sql +++ b/server/database/config/fakeData.sql @@ -0,0 +1,43 @@ +insert into admins (username, password , email) values ('ameera', 'F1A1CC71ED10594F97B1B6CF94A00727', 'ameera2021abed@gmail.com'); +insert into admins (username, password , email) values ('haroon', 'F1A1CC71ED10594F97B1B6CF94A00727', 'hro19502001@gmail.com'); +insert into admins (username, password , email) values ('elham', 'F1A1CC71ED10594F97B1B6CF94A00727', 'elham2000fadel@gmail.com'); +insert into admins (username, password , email) values ('sallah', 'F1A1CC71ED10594F97B1B6CF94A00727', 'mohmsal96@gmail.com'); +insert into agents (name, email, password , phone, avater) values ('Kai', 'kallport0@patch.com', '6D29E04CD937DC37CB72E42736CA238C', '481-649-8020', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Trixie', 'tbeadon1@plala.or.jp', '6D29E04CD937DC37CB72E42736CA238C', '663-871-7450', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Allina', 'aburford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '630-385-8312', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Maye', 'mstrass3@yellowpages.com', '6D29E04CD937DC37CB72E42736CA238C', '210-886-2847', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Lillian', 'abutrford2@tumblr.com', '6D29E04CD937DC37CB72E42736CA238C', '270-209-1221', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into agents (name, email, password , phone, avater) values ('Emlyn', 'edrissell5@free.fr', '6D29E04CD937DC37CB72E42736CA238C', '426-753-9984', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrVnja3DFheGQjch5AL1n0Rk8nOFHm6Ny60w&usqp=CAU'); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (1, 'suscipit ligula in', '190483.22', 'tristique', 'Buy', 'House', '3152 Morningstar Park', 'Edinburgh of the Seven Seas', 'Saint Helena', 2, 1, 1, 194, false, 2, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (2, 'ipsum primis in', '242471.89', 'est quam pharetra magna ac consequat metus sapien ut nunc vestibulum ante', 'Buy', 'House', '100 Butternut Hill', 'Bern', 'Switzerland', 1, 2, 2, 226, true, 5, true); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (3, 'rhoncus sed vestibulum', '84726.00', 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', 'Buy', 'House', '0824 Mcguire Way', 'Kungshamn', 'Sweden', 1, 3, 3, 235, true, 5, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (4, 'sociis natoque penatibus et', '106226.71', 'quis odio consequat', 'Buy', 'House', '15918 Mcguire Point', 'Ranong', 'Thailand', 2, 4, 4, 244, true, 1, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (5, 'in faucibus orci luctus', '116162.27', 'parturient montes nascetur ridiculus mus vivamus vestibulum sagittis sapien cum', 'Buy', 'House', '898 Dixon Crossing', 'Gelap', 'Indonesia', 3, 2, 4, 150, false, 3, false); +insert into estates ( agent_id, title, price, description, type, category, street, city, region, bathrooms, bedrooms, rooms, space, approved, rate, available) values (6, 'vestibulum ante ipsum primis', '194193.55', 'leo odio porttitor id consequat in consequat ut nulla sed', 'Buy', 'House', '0891 7th Park', 'Álimos', 'Greece', 1, 3, 2, 174, false, 1, false); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (1,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (1,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (1,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (2,'https://cdn.vox-cdn.com/thumbor/6itLJS9BZ-B5gXPjM1AB_z-ZKVI=/0x0:3000x2000/1200x800/filters:focal(1260x760:1740x1240)/cdn.vox-cdn.com/uploads/chorus_image/image/65890203/iStock_1067331614.7.jpg'); +insert into images ( estate_id, image) values (2,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (2,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (2,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSh4O9GCySQw_9C24XfInhq-lYgfnHlRSMB5g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (3,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (3,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (4,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (4,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (4,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); + +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsj7rODPg-8QIdi6VONhE84ZFng3D5WpNfbA&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (5,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (5,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSBOKk95d1JPgPWHYPk_Z2NXd_ntTr-N0E0yQ&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://archello.s3.eu-central-1.amazonaws.com/images/2018/05/17/1.tobiarchitects.1526566679.5654.jpg'); +insert into images ( estate_id, image) values (6,'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHpF_yr6jMER79FRSejAszXCsyd__87nEF6g&usqp=CAU'); +insert into images ( estate_id, image) values (6,'https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8bHV4dXJ5JTIwaG91c2V8ZW58MHx8MHx8&ixlib=rb-1.2.1&w=1000&q=80'); From cd81e7682dd7485659cfa01490be4e90781d87a6 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Wed, 27 Oct 2021 16:31:22 +0300 Subject: [PATCH 40/47] move middlewares to outside te controller folder --- server/{controllers => }/middleware/index.js | 5 +-- server/{controllers => }/middleware/isAuth.js | 19 +++++----- server/utils/index.js | 7 ++-- server/utils/tokenFunction.js | 36 +++++++++---------- 4 files changed, 35 insertions(+), 32 deletions(-) rename server/{controllers => }/middleware/index.js (79%) rename server/{controllers => }/middleware/isAuth.js (52%) diff --git a/server/controllers/middleware/index.js b/server/middleware/index.js similarity index 79% rename from server/controllers/middleware/index.js rename to server/middleware/index.js index 5433386..4c1cf4e 100644 --- a/server/controllers/middleware/index.js +++ b/server/middleware/index.js @@ -1,4 +1,5 @@ const isAuth = require('./isAuth'); + module.exports = { - isAuth -} \ No newline at end of file + isAuth, +}; diff --git a/server/controllers/middleware/isAuth.js b/server/middleware/isAuth.js similarity index 52% rename from server/controllers/middleware/isAuth.js rename to server/middleware/isAuth.js index 6e46936..605b18c 100644 --- a/server/controllers/middleware/isAuth.js +++ b/server/middleware/isAuth.js @@ -1,21 +1,22 @@ -const { verifyToken } = require('../../utils'); +const { verifyToken } = require('../utils'); const isAuth = async (req, res, next) => { try { const { cookies: { token }, } = req; - if (!token) - return res.status(401).json({ - message: 'You are not authorized ', - }); + if (!token) { + return res.status(401).json({ + message: 'You are not authorized ', + }); + } const decoded = await verifyToken(token); - req.user = decoded - return next(); + req.user = decoded; + return next(); } catch (err) { return res.status(401).json({ - message: 'You are not authorized ', + message: 'You are not authorized ', }); } }; -module.exports = isAuth; \ No newline at end of file +module.exports = isAuth; diff --git a/server/utils/index.js b/server/utils/index.js index 29a6754..ce115b5 100644 --- a/server/utils/index.js +++ b/server/utils/index.js @@ -1,5 +1,6 @@ const { signToken, verifyToken } = require('./tokenFunction'); + module.exports = { - signToken, - verifyToken -} \ No newline at end of file + signToken, + verifyToken, +}; diff --git a/server/utils/tokenFunction.js b/server/utils/tokenFunction.js index bef66f9..c7ac90e 100644 --- a/server/utils/tokenFunction.js +++ b/server/utils/tokenFunction.js @@ -1,25 +1,25 @@ const { verify, sign } = require('jsonwebtoken'); + const { env: { ACCESS_TOKEN_SECRET }, } = process; -const verifyToken = (token) => - new Promise((resolve, reject) => { - verify(token, ACCESS_TOKEN_SECRET, (err, decoded) => { - if (err) { - reject(err); - } else { - resolve(decoded); - } - }); + +const verifyToken = (token) => new Promise((resolve, reject) => { + verify(token, ACCESS_TOKEN_SECRET, (err, decoded) => { + if (err) { + reject(err); + } else { + resolve(decoded); + } }); -const signToken = (payload) => - new Promise((resolve, reject) => { - sign(payload, ACCESS_TOKEN_SECRET, (err, token) => { - if (err) { - return reject(err); - } - return resolve(token); - }); +}); +const signToken = (payload) => new Promise((resolve, reject) => { + sign(payload, ACCESS_TOKEN_SECRET, (err, token) => { + if (err) { + return reject(err); + } + return resolve(token); }); +}); -module.exports = { signToken, verifyToken }; \ No newline at end of file +module.exports = { signToken, verifyToken }; From 3b8d2f8e14de7915867ba6a64779090df597756a Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 16:43:52 +0300 Subject: [PATCH 41/47] put if condition inside try --- server/controllers/users/userEstates.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index f78d63b..22ed44a 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -3,21 +3,20 @@ const { UserEstatesQuery } = require('../../database/quieres/index'); const userEstateshandler = async (req, res) => { const { userId } = req.params; - if (userId > 0) { - try { - const { rows } = await UserEstatesQuery(userId); + try { + const { rows } = await UserEstatesQuery(userId); + if (userId > 0) { return res.json({ data: rows, }); - } catch (err) { - return res.status(500).json({ - message: `data Error: ${err}`, - }); } - } else { res.status(404).json({ message: 'enter valid user id', }); + } catch (err) { + return res.status(500).json({ + message: `data Error: ${err}`, + }); } }; From 31e6f656accb408bfdfbd4d23c983e76ea47ac0e Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 16:50:09 +0300 Subject: [PATCH 42/47] change tests --- server/controllers/users/userEstates.js | 2 +- server/test/index.test.js | 43 ++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index 22ed44a..ebcc819 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -4,8 +4,8 @@ const userEstateshandler = async (req, res) => { const { userId } = req.params; try { - const { rows } = await UserEstatesQuery(userId); if (userId > 0) { + const { rows } = await UserEstatesQuery(userId); return res.json({ data: rows, }); diff --git a/server/test/index.test.js b/server/test/index.test.js index 09042bf..5c12361 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -19,15 +19,48 @@ describe('Tests Server', () => { describe('user estates', () => { test('get users estates', async () => { - const result = await supertest(app).get('/api/v1/users/3/estates'); - expect(result.status).toBe(200); - expect(result.body.data.length).toBe(1); + // const result = await supertest(app).get('/api/v1/users/3/estates'); + // expect(result.status).toBe(200); + // expect(result.body.data.length).toBe(1); + + const res = await supertest(app) + .get('/api/v1/users/3/estates') + .expect(200) + .expect('Content-Type', /json/); + + return expect(res.body).toEqual({ + data: [ + { + id: 3, + agent_id: 3, + title: 'rhoncus sed vestibulum', + price: '84726.00', + description: 'massa volutpat convallis morbi odio odio elementum eu interdum eu tincidunt in', + type: 'Buy', + category: 'House', + street: '0824 Mcguire Way', + city: 'Kungshamn', + region: 'Sweden', + bathrooms: 1, + bedrooms: 3, + rooms: 3, + space: '235', + approved: true, + rate: 5, + available: false, + }, + ], + }); }); }); describe('user estates', () => { test('get users estates', async () => { - const result = await supertest(app).get('/api/v1/users/three/estates'); - expect(result.status).toBe(404); + // const result = await supertest(app).get('/api/v1/users/three/estates'); + // expect(result.status).toBe(404); + const res = await supertest(app) + .get('/api/v1/users/three/estates') + .expect(404) + .expect('Content-Type', /json/); }); }); From 0fcc0c58c3a2e480f7ecd18a8761f3a567e3d785 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 16:55:47 +0300 Subject: [PATCH 43/47] remove some comments --- server/test/index.test.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/test/index.test.js b/server/test/index.test.js index 5c12361..446fdb7 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -19,10 +19,6 @@ describe('Tests Server', () => { describe('user estates', () => { test('get users estates', async () => { - // const result = await supertest(app).get('/api/v1/users/3/estates'); - // expect(result.status).toBe(200); - // expect(result.body.data.length).toBe(1); - const res = await supertest(app) .get('/api/v1/users/3/estates') .expect(200) @@ -56,8 +52,6 @@ describe('user estates', () => { describe('user estates', () => { test('get users estates', async () => { - // const result = await supertest(app).get('/api/v1/users/three/estates'); - // expect(result.status).toBe(404); const res = await supertest(app) .get('/api/v1/users/three/estates') .expect(404) From 71110ad58e45ed9ec21197b96a77962078c27e76 Mon Sep 17 00:00:00 2001 From: muhammadharoun Date: Wed, 27 Oct 2021 17:00:10 +0300 Subject: [PATCH 44/47] add toEqual for last test --- server/test/index.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/test/index.test.js b/server/test/index.test.js index 446fdb7..d5dd994 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -56,5 +56,8 @@ describe('user estates', () => { .get('/api/v1/users/three/estates') .expect(404) .expect('Content-Type', /json/); + return expect(res.body).toEqual({ + message: 'enter valid user id', + }); }); }); From 7cd0d0adb0a027c5d9511a95ba1d00867fa88c58 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Wed, 27 Oct 2021 21:52:11 +0300 Subject: [PATCH 45/47] resolve all changes requirment --- package.json | 3 ++- server/app.js | 10 +++++----- server/controllers/errors/serverError.js | 2 +- server/controllers/logout.js | 1 - server/controllers/users/userEstates.js | 4 ++-- server/database/connection.js | 1 - server/database/quieres/index.js | 4 ++-- server/routes/index.js | 3 --- 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index ed1260e..26c7405 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "start": "cross-env NODE_ENV=production node server", "dev": "cross-env NODE_ENV=development nodemon server", - "test": "cross-env NODE_ENV=test jest" + "test": "cross-env NODE_ENV=test jest", + "build:db": "NODE_ENV=test node server/database/data/build" }, "repository": { "type": "git", diff --git a/server/app.js b/server/app.js index f2fd85b..3d0aac1 100644 --- a/server/app.js +++ b/server/app.js @@ -2,7 +2,9 @@ const express = require('express'); const { join } = require('path'); const compression = require('compression'); const cookieParser = require('cookie-parser'); +const { notFoundError, serverError } = require('./controllers/errors'); const router = require('./routes'); +require('env2')('.env'); const { env: { PORT, NODE_ENV } } = process; @@ -17,15 +19,13 @@ app.use(cookieParser()); app.disable('x-powered-by'); app.use('/api/v1/', router); -if (NODE_ENV === 'development') { - app.get('/', (req, res) => { - res.json({ message: 'server running' }); - }); -} if (NODE_ENV === 'production') { app.use(express.static(join(__dirname, '..', 'client', 'build'))); app.get('*', (req, res) => { res.sendFile(join(__dirname, '..', 'client', 'build', 'index.html')); }); } +router.use(notFoundError); +router.use(serverError); + module.exports = app; diff --git a/server/controllers/errors/serverError.js b/server/controllers/errors/serverError.js index 46394ee..0266284 100644 --- a/server/controllers/errors/serverError.js +++ b/server/controllers/errors/serverError.js @@ -1,5 +1,5 @@ /* eslint-disable no-unused-vars */ -const serverError = (req, res, next, err) => { +const serverError = (err, req, res, next) => { res.status(500).json({ message: 'Server Error' }); }; diff --git a/server/controllers/logout.js b/server/controllers/logout.js index c497d9e..d04e524 100644 --- a/server/controllers/logout.js +++ b/server/controllers/logout.js @@ -1,5 +1,4 @@ const logout = (req, res) => { res.clearCookie('token'); - res.json({ message: 'logged out Succefully' }); }; module.exports = logout; diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index ebcc819..63622a3 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -1,11 +1,11 @@ -const { UserEstatesQuery } = require('../../database/quieres/index'); +const { userEstatesQuery } = require('../../database/quieres/index'); const userEstateshandler = async (req, res) => { const { userId } = req.params; try { if (userId > 0) { - const { rows } = await UserEstatesQuery(userId); + const { rows } = await userEstatesQuery(userId); return res.json({ data: rows, }); diff --git a/server/database/connection.js b/server/database/connection.js index 7ef7a43..e2c8673 100644 --- a/server/database/connection.js +++ b/server/database/connection.js @@ -1,4 +1,3 @@ -require('env2')('.env'); const { Pool } = require('pg'); const { diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js index 3eefb28..386595b 100644 --- a/server/database/quieres/index.js +++ b/server/database/quieres/index.js @@ -1,8 +1,8 @@ -const UserEstatesQuery = require('./UserEstatesQuiery'); +const userEstatesQuery = require('./userEstatesQuiery'); const getAllUsersQuery = require('./getAllUsersQuery'); module.exports = { getAllUsersQuery, - UserEstatesQuery, + userEstatesQuery, }; diff --git a/server/routes/index.js b/server/routes/index.js index b1ea1fc..92cf993 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -1,12 +1,9 @@ const router = require('express').Router(); -const { notFoundError, serverError } = require('../controllers/errors'); const { userEstateshandler } = require('../controllers'); const { getAllUsers, logout } = require('../controllers'); router.get('/users/:userId/estates', userEstateshandler); router.get('/users', getAllUsers); router.get('/logout', logout); -router.use(notFoundError); -router.use(serverError); module.exports = router; From 5f2fd2f7f76e0dc7d404cdede069eefe43b1d915 Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Thu, 28 Oct 2021 15:15:55 +0300 Subject: [PATCH 46/47] fix eslint and userEstateModule --- .eslintrc.json | 2 +- package.json | 2 +- server/app.js | 1 - server/controllers/users/userEstates.js | 2 +- .../quieres/{UserEstatesQuiery.js => userEstatesQuiery.js} | 0 server/index.js | 1 + 6 files changed, 4 insertions(+), 4 deletions(-) rename server/database/quieres/{UserEstatesQuiery.js => userEstatesQuiery.js} (100%) diff --git a/.eslintrc.json b/.eslintrc.json index c00798a..7276943 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "airbnb-base" ], "parserOptions": { - "ecmaVersion": "13" + "ecmaVersion": "latest" }, "rules": { } diff --git a/package.json b/package.json index 26c7405..c3dc9d5 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "cross-env NODE_ENV=production node server", "dev": "cross-env NODE_ENV=development nodemon server", "test": "cross-env NODE_ENV=test jest", - "build:db": "NODE_ENV=test node server/database/data/build" + "build:db": "NODE_ENV=development node server/database/config/build" }, "repository": { "type": "git", diff --git a/server/app.js b/server/app.js index 3d0aac1..7bc115b 100644 --- a/server/app.js +++ b/server/app.js @@ -4,7 +4,6 @@ const compression = require('compression'); const cookieParser = require('cookie-parser'); const { notFoundError, serverError } = require('./controllers/errors'); const router = require('./routes'); -require('env2')('.env'); const { env: { PORT, NODE_ENV } } = process; diff --git a/server/controllers/users/userEstates.js b/server/controllers/users/userEstates.js index 63622a3..5f7a1ae 100644 --- a/server/controllers/users/userEstates.js +++ b/server/controllers/users/userEstates.js @@ -10,7 +10,7 @@ const userEstateshandler = async (req, res) => { data: rows, }); } - res.status(404).json({ + return res.status(404).json({ message: 'enter valid user id', }); } catch (err) { diff --git a/server/database/quieres/UserEstatesQuiery.js b/server/database/quieres/userEstatesQuiery.js similarity index 100% rename from server/database/quieres/UserEstatesQuiery.js rename to server/database/quieres/userEstatesQuiery.js diff --git a/server/index.js b/server/index.js index 991b1f9..77625cc 100644 --- a/server/index.js +++ b/server/index.js @@ -1,3 +1,4 @@ +require('env2')('.env'); const app = require('./app'); const port = app.get('port'); From 98fdfa83c17929ef396648e82c40d0b679812f0e Mon Sep 17 00:00:00 2001 From: Muhammad Abdulhadi Date: Thu, 28 Oct 2021 16:20:23 +0300 Subject: [PATCH 47/47] Create build:db script --- .gitignore | 2 +- .vscode/settings.json | 2 +- README.md | 2 +- package.json | 2 +- server/database/config/build.js | 5 +++-- server/database/{ => config}/connection.js | 3 +++ server/database/config/databaseConfig.sql | 7 +++++++ server/database/config/index.js | 13 +++++++++++++ server/database/quieres/getAllUsersQuery.js | 2 +- server/database/quieres/userEstatesQuiery.js | 2 +- server/index.js | 1 - server/test/index.test.js | 4 ++-- 12 files changed, 34 insertions(+), 11 deletions(-) rename server/database/{ => config}/connection.js (95%) create mode 100644 server/database/config/databaseConfig.sql create mode 100644 server/database/config/index.js diff --git a/.gitignore b/.gitignore index 6fe20f0..5693cd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules .env -package-lock.json \ No newline at end of file +package-lock.json diff --git a/.vscode/settings.json b/.vscode/settings.json index c3a7563..6681eb0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,4 +4,4 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": true } - } \ No newline at end of file +} \ No newline at end of file diff --git a/README.md b/README.md index b0579fa..4a8a767 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Real Estate is an App that facilitates to access and rent or buy available homes ## Team Members :busts_in_silhouette::- 1. Mohammed haroon 2. MOhammed salah -3. ameera +3. Ameera Abed Alnaser Khalil 4. Elham Fadel diff --git a/package.json b/package.json index c3dc9d5..84ccd3e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "cross-env NODE_ENV=production node server", "dev": "cross-env NODE_ENV=development nodemon server", "test": "cross-env NODE_ENV=test jest", - "build:db": "NODE_ENV=development node server/database/config/build" + "build:db": "cross-env NODE_ENV=development node server/database/config" }, "repository": { "type": "git", diff --git a/server/database/config/build.js b/server/database/config/build.js index 93646ef..a35d117 100644 --- a/server/database/config/build.js +++ b/server/database/config/build.js @@ -1,11 +1,12 @@ const { readFileSync } = require('fs'); const { join } = require('path'); -const connection = require('../connection'); +const connection = require('./connection'); const dbBuild = () => { let sql = readFileSync(join(__dirname, 'build.sql')).toString(); sql += readFileSync(join(__dirname, 'fakeData.sql')).toString(); return connection.query(sql); }; -module.exports = { dbBuild }; + +module.exports = dbBuild; diff --git a/server/database/connection.js b/server/database/config/connection.js similarity index 95% rename from server/database/connection.js rename to server/database/config/connection.js index e2c8673..572fd03 100644 --- a/server/database/connection.js +++ b/server/database/config/connection.js @@ -1,3 +1,4 @@ +require('env2')('.env'); const { Pool } = require('pg'); const { @@ -17,8 +18,10 @@ switch (NODE_ENV) { default: throw new Error('There\'s no environment'); } + const options = { connectionString: dbUrl, ssl: { rejectUnauthorized: false }, }; + module.exports = new Pool(options); diff --git a/server/database/config/databaseConfig.sql b/server/database/config/databaseConfig.sql new file mode 100644 index 0000000..7e74e32 --- /dev/null +++ b/server/database/config/databaseConfig.sql @@ -0,0 +1,7 @@ +CREATE DATABASE housydev; +CREATE USER housyuser WITH superuser password '123456'; +ALTER DATABASE housydev OWNER TO housyuser; +-- test db +CREATE DATABASE housytest; +CREATE USER housyuser2 WITH superuser password '123456'; +ALTER DATABASE housytest OWNER TO housyuser2; \ No newline at end of file diff --git a/server/database/config/index.js b/server/database/config/index.js new file mode 100644 index 0000000..b975dc6 --- /dev/null +++ b/server/database/config/index.js @@ -0,0 +1,13 @@ +/* eslint-disable no-console */ +const connection = require('./connection'); +const dbBuild = require('./build'); + +(async () => { + try { + await dbBuild(); + console.log('Build Successfully'); + connection.end(); + } catch (e) { + console.log('Build Failed', e); + } +})(); diff --git a/server/database/quieres/getAllUsersQuery.js b/server/database/quieres/getAllUsersQuery.js index 24231b0..680e88c 100644 --- a/server/database/quieres/getAllUsersQuery.js +++ b/server/database/quieres/getAllUsersQuery.js @@ -1,4 +1,4 @@ -const connection = require('../connection'); +const connection = require('../config/connection'); const getAllUsersQuery = () => connection.query('SELECT * FROM agents'); diff --git a/server/database/quieres/userEstatesQuiery.js b/server/database/quieres/userEstatesQuiery.js index 811caa3..f1b86ed 100644 --- a/server/database/quieres/userEstatesQuiery.js +++ b/server/database/quieres/userEstatesQuiery.js @@ -1,3 +1,3 @@ -const connection = require('../connection'); +const connection = require('../config/connection'); module.exports = (userId) => connection.query('SELECT * FROM estates WHERE agent_id = $1', [userId]); diff --git a/server/index.js b/server/index.js index 77625cc..991b1f9 100644 --- a/server/index.js +++ b/server/index.js @@ -1,4 +1,3 @@ -require('env2')('.env'); const app = require('./app'); const port = app.get('port'); diff --git a/server/test/index.test.js b/server/test/index.test.js index d5dd994..fb575b4 100644 --- a/server/test/index.test.js +++ b/server/test/index.test.js @@ -1,8 +1,8 @@ /* eslint-disable no-undef */ const supertest = require('supertest'); const app = require('../app'); -const { dbBuild } = require('../database/config/build'); -const connection = require('../database/connection'); +const dbBuild = require('../database/config/build'); +const connection = require('../database/config/connection'); beforeEach(() => dbBuild()); afterAll(() => connection.end());