Skip to content

Commit

Permalink
Wrote insert.sql file. Chanfe README.md add link on READ_ME_INSTAL_LO…
Browse files Browse the repository at this point in the history
…CAL.md Add new photo to READ_ME_INSTAL_LOCAL.md for showing how to connect telegram bot.
  • Loading branch information
ZaharVeremchuk committed Apr 7, 2021
1 parent 9b83505 commit 037d501
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ $ bower install
- For all the possible languages that support syntax highlithing on GitHub (which is basically all of them), refer <a href="https://github.com/github/linguist/blob/master/lib/linguist/languages.yml" target="_blank">here</a>.

### How to run local

<a href="https://github.com/ita-social-projects/GreenCityUBS/blob/dev/READ_ME_INSTAL_LOCAL.md" target="_blank">For install click on READ_ME_INSTAL_LOCAL.md.</a>
### How to run Docker

---
Expand Down
7 changes: 5 additions & 2 deletions READMEINTRO.md → READ_ME_INSTAL_LOCAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ Though there are four GitHub projects ([GreenCity](https://github.com/ita-social


![env-vars](user_enviroment_variables.png)
Add also this fields inti User environment variables, ask in GreenCity group,
propertires to this fields.
![env-vars](telegram_1.png)

7. `Run`
7. `Run UbsApplication`


8. If you did everything correctly, you should be able to access swagger by this URL: http://localhost:8050/swagger-ui.html#/


9. You can insert data into your database for this you should run file insert.sql


Also all these variables you can set in Intellij Idea. For instance:
Expand Down
56 changes: 56 additions & 0 deletions insert.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
INSERT INTO users(id,current_points, uuid, violations, telegram_bot_id)
VALUES (1,1000,'uuid1',0,null),
(2,1000,'uuid2',0,null),
(3,1000,'uuid3',0,null),
(4,1000,'uuid4',0,null),
(5,1000,'uuid5',0,null),
(6,1000,'uuid6',0,null),
(7,1000,'uuid7',0,null),
(8,1000,'uuid8',0,null),
(9,1000,'uuid9',0,null),
(10,1000,'uuid10',0,null);

INSERT INTO ubs_user(id,email,first_name,last_name,phone_number,users_id,address_id)
VALUES (1,'[email protected]','Mike','Miopes','095634873',1,null),
(2,'[email protected]','Ozil','Golden','062124873',2,null),
(3,'[email protected]','Max','Basket','063634433',3,null),
(4,'[email protected]','Lio','Melor','044634543',4,null),
(5,'[email protected]','Jack','Grindon','095634433',5,null),
(6,'[email protected]','Katy','Perry','076623873',6,null),
(7,'[email protected]','Richard','Tolkon','085874873',7,null),
(8,'[email protected]','Oliver','Gastambide','065474873',8,null),
(9,'[email protected]','Gregor','Tutson','081704873',9,null),
(10,'[email protected]','Siona','Milletta','085874873',10,null);


INSERT INTO orders
VALUES (1,'order comment',null,null,null,'2021-03-13 10:03:38.289346','FORMED',0,null,1,1,null),
(2,'order comment',null,null,null,'2021-03-14 11:00:00.000000','FORMED',0,null,2,2,null),
(3,'order comment',null,null,null,'2021-03-15 12:00:00.000000','FORMED',0,null,3,3,null),
(4,'order comment',null,null,null,'2021-03-16 13:00:00.000000','FORMED',0,null,4,4,null),
(5,'order comment',null,null,null,'2021-03-17 14:00:00.000000','FORMED',0,null,5,5,null),
(6,'order comment',null,null,null,'2021-03-18 15:00:00.000000','FORMED',0,null,6,6,null),
(7,'order comment',null,null,null,'2021-03-19 16:00:00.000000','FORMED',0,null,7,7,null),
(8,'order comment',null,null,null,'2021-03-20 17:00:00.000000','FORMED',0,null,8,8,null),
(9,'order comment',null,null,null,'2021-03-21 18:00:00.000000','FORMED',0,null,7,7,null),
(10,'order comment',null,null,null,'2021-03-22 19:00:00.000000','FORMED',0,null,8,8,null);

INSERT INTO certificate (code,status,expiration_date,points,order_id,creation_date)
VALUES ('1234-1234','ACTIVE','2021-05-01',100,1,'2021-04-01'),
('1235-1235','ACTIVE','2021-05-02',200,1,'2021-04-02'),
('1236-1236','ACTIVE','2021-05-03',300,3,'2021-04-03'),
('1237-1237','ACTIVE','2021-05-04',400,4,'2021-04-04'),

('1238-1238','USED','2021-05-01',500,2,'2021-04-01'),
('1239-1239','USED','2021-05-02',600,6,'2021-04-02'),
('1240-1240','USED','2021-05-03',700,6,'2021-04-03'),

('1241-1241','EXPIRED','2021-04-05',800,5,'2021-03-05'),
('1242-1242','EXPIRED','2021-05-03',900,5,'2021-04-03'),
('1243-1243','EXPIRED','2021-05-04',100,7,'2021-04-04');

INSERT INTO bag (id,capacity,name,price)
VALUES (1,100,'Бавовняна сумка',400),
(2,100,'Березентова сумка',600),
(3,100,'Сумка з бамбукової тканини',400)

Binary file added telegram_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 037d501

Please sign in to comment.