Commit Graph

24 Commits

Author SHA1 Message Date
fc9f1c5c05 file headers
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-16 02:18:43 +03:00
21d72f17b2 sql_app: fixed error while setting door state
Old code was taking state from device itself,
	meaning it never changes. Now it is set from
	the incoming request.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-09 22:41:07 +03:00
dcd2ff5b89 sql_app: Split doors and monitors
A alot of interface and database boiler plate

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-09 21:52:42 +03:00
0a4a560ac5 sql_app: fixed errors in room access log endpoints
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-08 13:26:41 +03:00
c2048d8dba sql_app: User can change password
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-08 12:00:12 +03:00
3bcb333df6
sql_app: Added state to Iot Door
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-07 18:58:23 +03:00
d9f3a9da4e
sql_app: Introduce force_close flag for Iot Door
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-07 15:48:28 +03:00
bf14c97cb6
sql_app: main: User access list now includes room sensor data
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-06-07 12:56:10 +03:00
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
36123b1090 sql_app: Access log for user (access history)
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 19:44:04 +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
bae51c3f67 Added data storage tables and types
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-23 13:46:09 +03:00
6e74778241 main: temp spelling
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-08 22:20:39 +03:00
dc4e3ef8d6 main: add iot functions for monitor and door
- Echo back for monitor for now.
   - Needs database tables and linkage

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-05-08 22:09:06 +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
59417427c3 main: Implement generation of IotDev Token
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-17 21:20:45 +03:00
17aa68ba9a
allow user: allow acces to room by name or id
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-14 01:37:30 +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
64edc98a76 sql_app/schema: fix type error
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-04-03 14:51:26 +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