Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28fd966167 | |||
| 47a3e33c03 |
+60
-26
@@ -1,6 +1,11 @@
|
|||||||
# Проєктування бази даних
|
# Проєктування системи
|
||||||
|
|
||||||
## BE модель
|
|
||||||
|
Вбудовування зображень діаграм здійснюється з використанням сервісу [plantuml.com](https://plantuml.com/).
|
||||||
|
|
||||||
|
В markdown-файлі використовується опис діаграми
|
||||||
|
|
||||||
|
```md
|
||||||
|
|
||||||
<center style="
|
<center style="
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
@@ -11,38 +16,67 @@
|
|||||||
|
|
||||||
@startuml
|
@startuml
|
||||||
|
|
||||||
entity Account
|
participant Client
|
||||||
entity Account.username <<TEXT>>
|
|
||||||
entity Account.password <<TEXT>>
|
|
||||||
|
|
||||||
entity Survey
|
participant SR as "Service Registry"
|
||||||
entity Survey.name <<TEXT>>
|
|
||||||
entity Survey.duration <<TEXT>>
|
|
||||||
entity Survey.isPaused <<BOOLEAN>>
|
|
||||||
entity Survey.isNamed <<BOOLEAN>>
|
|
||||||
|
|
||||||
entity Question
|
participant Service
|
||||||
entity Question.text <<TEXT>>
|
|
||||||
|
|
||||||
entity Responce
|
Service -> SR : register
|
||||||
entity Responce.value <<TEXT>>
|
SR -> SR
|
||||||
|
SR --> Service
|
||||||
|
...
|
||||||
|
|
||||||
Account.username --* Account
|
SR -> Service: heartbeat
|
||||||
Account.password --* Account
|
SR <-- Service: health
|
||||||
|
...
|
||||||
|
|
||||||
Survey.name --* Survey
|
Client -> SR: find
|
||||||
Survey.duration --* Survey
|
Client <-- SR: service endpoint
|
||||||
Survey.isPaused --* Survey
|
Client -> Service: request
|
||||||
Survey.isNamed --* Survey
|
Client <-- Service: response
|
||||||
|
|
||||||
Responce.value -u-* Responce
|
|
||||||
|
|
||||||
Question.text -u-* Question
|
|
||||||
|
|
||||||
Account "1,1" -- "0,*" Survey
|
@enduml
|
||||||
Survey "1,1" -- "0,*" Question
|
|
||||||
Question "1,1" -r- "0,*" Responce
|
</center>
|
||||||
Account "0,1" -r- "0,*" Responce
|
```
|
||||||
|
|
||||||
|
яка буде відображена наступним чином
|
||||||
|
|
||||||
|
<center style="
|
||||||
|
border-radius:4px;
|
||||||
|
border: 1px solid #cfd7e6;
|
||||||
|
box-shadow: 0 1px 3px 0 rgba(89,105,129,.05), 0 1px 1px 0 rgba(0,0,0,.025);
|
||||||
|
padding: 1em;"
|
||||||
|
>
|
||||||
|
|
||||||
|
@startuml
|
||||||
|
|
||||||
|
@startuml
|
||||||
|
|
||||||
|
participant Client
|
||||||
|
|
||||||
|
participant SR as "Service Registry"
|
||||||
|
|
||||||
|
participant Service
|
||||||
|
|
||||||
|
Service -> SR : register
|
||||||
|
SR -> SR
|
||||||
|
SR --> Service
|
||||||
|
...
|
||||||
|
|
||||||
|
SR -> Service: heartbeat
|
||||||
|
SR <-- Service: health
|
||||||
|
...
|
||||||
|
|
||||||
|
Client -> SR: find
|
||||||
|
Client <-- SR: service endpoint
|
||||||
|
Client -> Service: request
|
||||||
|
Client <-- Service: response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
|
|
||||||
|
|||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import updater
|
||||||
|
|
||||||
|
target_folder = "activities"
|
||||||
|
converter_args = "-a -nv"
|
||||||
|
|
||||||
|
updater.process(target_folder, converter_args)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import updater
|
||||||
|
|
||||||
|
target_folder = "tables"
|
||||||
|
converter_args = "-nv"
|
||||||
|
|
||||||
|
updater.process(target_folder, converter_args)
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
PYTHON_INTERPRETER = sys.executable
|
||||||
|
|
||||||
|
def process(target_folder, converter_args):
|
||||||
|
if os.path.exists(target_folder):
|
||||||
|
shutil.rmtree(target_folder)
|
||||||
|
|
||||||
|
os.mkdir(target_folder)
|
||||||
|
os.system(f"{PYTHON_INTERPRETER} convert.py use-cases/* {converter_args} -d {target_folder}/")
|
||||||
|
|
||||||
|
result_file = open(f"{target_folder}.md", "w")
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in os.listdir(target_folder):
|
||||||
|
with open(os.path.abspath(f"{target_folder}/{i}")) as f:
|
||||||
|
result_file.write(f.read())
|
||||||
|
result_file.write("\n")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"File {target_folder}/{i} has raised exception {e}")
|
||||||
|
|
||||||
|
result_file.close()
|
||||||
Reference in New Issue
Block a user