try.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Command = ['add', 'board', '<boardName>']
  2. tablePath = Command[2].uper()
  3. is_exist(tablePath, name=None)
  4. if name
  5. SELECT * FROM {tablePath} WHERE name={name}
  6. add event EV1 to KB4/CL2
  7. add event EV1 to KB4 / CL2
  8. [dev.init]
  9. CREATE TABLE Board(id INTEGER PRIMARY KEY AUTOINCREMENT, name, status)
  10. CREATE TABLE Class(id INTEGER PRIMARY KEY AUTOINCREMENT, name, usingBoard, status)
  11. CREATE TABLE Event(id INTEGER PRIMARY KEY AUTOINCREMENT, name, dscrp, creator, createdTime, classCreated, classCurrent, status)
  12. CREATE TABLE Stucked(id INTEGER PRIMARY KEY AUTOINCREMENT, boardId, eventId, stuckedTime, solvedTime, status)
  13. [type == board]
  14. /, /KB, /KB/CL, KB/CL/EV: add board <KB2> -> ok
  15. [type == class]
  16. /: add class <CL> -> err (功能上可行但逻辑上不允许)
  17. /: add class <CL> to <KB> -> ok
  18. /KB: add class <CL> -> ok
  19. /KB, /KB/CL, /KB/CL/EV: add class <CL> to <KB2>
  20. KB2 ie -> ok
  21. KB2 ie false, add KB2, add CL -> ok
  22. sec: KB2 not ie, create/cancel?[y/n]
  23. [type == event]
  24. /: add event <EV> -> err
  25. /: add event <EV> to <KB> -> ok
  26. sec: no class, class in KB, choose, input()
  27. /: add event <EV> to <KB>/<CL> -> ok
  28. /KB: add event <EV> -> ok
  29. /KB: add event <EV> to <KB2> -> ok
  30. KB2 ie, sec: no class, class in KB, choose, input() -> ok
  31. KB2 ne, add KB2, sec: no class, class in KB, choose, input() -> ok
  32. # maybe a safe/strick mode = true in config.toml
  33. /KB: add event <EV> to <CL> -> ok
  34. /KB: add event <EV> to <KB2>/<CL> -> ok
  35. /KB: add event <EV> to <KB>/<CL> -> ok
  36. /KB: add event <EV> to <KB>/<CL>/, <KB>/<CL>/<EV> -> err
  37. /KB/CL: add event <EV> -> ok
  38. /KB/CL: add event <EV> to <CL2>
  39. CL2 ie in KB, -> ok
  40. CL2 ne in KB, -> err
  41. /KB/CL/EV: add event <EV2> -> err
  42. /KB/CL/EV: add event <EV> to <KB> -> okz
  43. /KB/CL/EV: add event <EV> to <KB2> -> ok
  44. /KB/CL/EV: add event <EV> to <CL> -> ok
  45. /KB/CL/EV: add event <EV> to <CL2>
  46. whereis CL2
  47. /KB/CL/EV: add event <EV2> to <KB>/<CL>
  48. /: any thing
  49. /KB:
  50. KB -> ok
  51. CL -> ok
  52. EV -> ok
  53. /KB/CL:
  54. KB -> ok
  55. CL -> ok
  56. EV -> ok
  57. /KB/CL/EV:
  58. KB -> ok
  59. CL -> ok
  60. EV -> ok
  61. 等等, 后端的add不需要检查这些啊?!
  62. add board <KB1>, <KB2>, <KB3>, <KB4>