Commit Graph

17 Commits

Author SHA1 Message Date
2b4d3bf7f5 sql_app: Implemented access list counter:
A counter is associated with every
	Iot Device. The counter is always increment
	when a user is allowed or disallowed to use
	the device, hence, ensuring coherency.
	It is also now exposed in the
	IotDoorPollingRequest schema, enabling the
	Iot Device to fetch the new access list.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-06 16:38:35 +03:00
244b7c6b91
sql_app: db: Fixed column copy warning.
A warning was raised whenever the user<->device
	relation was accessed. The assumption is that
	now the queries perform faster, having fixed
	this issue.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-05 17:10:35 +03:00
232ff82c46 sql_app: save last issued token in user record
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-05 16:25:20 +03:00
52a7cffce2 sql_app: Added access log request
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 19:02:54 +03:00
575ba9452a users/open: pass in time for door to stay open
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 14:58:30 +03:00
e9925d32b4 clear open_door attr from doors when read.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 14:36:29 +03:00
bae51c3f67 Added data storage tables and types
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 13:46:09 +03:00
34f27c32e8
users: Add open door command from user application
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-18 01:43:12 +03:00
22ecea44f6
sql_app: db: enforece not-null
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-13 09:52:37 +03:00
9a7e6a288f sql_app: db: IotEntity added bluetooth field
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-13 09:39:25 +03:00
fe3a193a4f sql_app: create and link iot device
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-13 08:34:12 +03:00
f1cbd6d265 jwt auth
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-13 05:24:06 +03:00
3153a7db8d sql_app: add username in regsiter
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-04 02:02:29 +03:00
866182c25e sql_app/models: fix inverted table links
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-03 15:51:36 +03:00
3922d659da
sql_app: models: correct many-to-many relation between iotdev and users
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-03-16 22:29:34 +03:00
0d66c6f50f
sql_app: another api app to test
In sql_app/main.py, new path fucntions are tested
	for database connections, quary.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-03-06 16:13:50 +03:00
b0dc22070e
sql_app: basic models and schemas from FastAPI docs
- Classes in models describe tables in database

	- Classes in schemas desribe pydantic models to
	read from the API.

	- database provides a connection and sessions to
	the database.

	- crud exposes the interface to the database, i.e.
	actions we can take from the application onto the
	database

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-03-03 15:49:26 +03:00