dx4 architecture
dengi
fundamental types
classes
db table
| name |
meaning |
| classid |
unique class id (uppercase, min 3 max 10) |
| userclassname |
use friendly name |
| caching |
0 | 1 toggles caching |
example
| classid |
userclassname |
caching |
9BPLETNEV |
9б |
1 |
admins
db table
| name |
meaning |
| adminId |
unique admin id, it's secret |
| adminName |
user friendly admin name |
| adminClass |
classid, that admin belongs to |
| adminPerms |
admin permisions, look table below |
permissions
| val |
meaning |
-1 |
unlimited, full access |
0 |
preserved for users |
1 |
allowed to make change for changes in schedule |
2 |
bells and permament schedule |
3 |
change class profile, and notes |
4 |
create and manage admins |
> Requests
You can request a change, if your level is lower, also you can accept those changes if your admin level can do this
example
| adminId |
adminName |
adminClass |
adminPerms |
ivanpletnev4 |
Ivan Pletnev |
9BPLETNEV |
-1 |
schedule (permanent)
db table
| name |
meaning |
| classId |
class belongs to |
| fromDate |
active from date (DD-MM-YY) |
| dayOfWeek |
day of week, num (0 - monday) |
| content |
json list content, look table below |
json content
| key |
meaning |
| num |
n of lesson in schedule, start with 1 |
| subject |
lesson subject |
| cabinet |
lesson cabinet |
example
| classId |
raspId |
dayOfWeek |
content |
9BPLETNEV |
3 |
0 |
[{"num":1, "subject":'физека🤬', "cabinet", 209},...] |
changes in schedule (zameni)
db table
| name |
meaning |
| classId |
class belongs to |
| forDay |
day date DD-MM-YY (i hope there wouldn't be y3k problem) |
| content |
json list content, look table below |
json list content
| key |
meaning |
| num |
n of lesson in schedule, start with 1 |
| subject |
lesson subject, or $function, look table below |
| cabinet |
lesson cabinet, if unused type 0 |
| t-begin ? |
lesson begin time, if empty same as before |
| t-end ? |
lesson end time, if empty same as before |
changes functions
| function |
meaning |
$rm-bef |
remove all lessons before, including this, eq. to old -3 |
$rm-aft |
remove all lessons after, including this, eq. to old -2 |
$no-lessons |
permanently sets to no lessons today |
$no-changes |
says that there is no changes today (when 100% sure) |
example
ko v toromu
| classId |
forDay |
forRaspId |
content |
9BPLETNEV |
20-10-25 |
0 |
[{"num":1, "subject":"$rm-bef", "cabinet":0},...] |
rings (zvonki)
| name |
meaning |
| classId |
class belongs to |
| fromDate |
active from date (DD-MM-YY) |
| content |
json list content, look table below |
json list content
| key |
meaning |
| num |
n of lesson |
| t-begin |
lesson begin time |
| t-end |
lesson end time |
example
| classId |
fromDay |
content |
9BPLETNEV |
20-10-25 |
[{"num":1, "t-begin:"9:00", t-end:"9:40"}...] |
api
/req_schedule POST
returns ready to show schedule
req
classId, date
res
{"num":1, "subject":'физека🤬', "cabinet": 209, "t-begin":"9:00", "t-begin": "9:40"}