198 lines
501 KiB
HTML
198 lines
501 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<title>Магистр — полная схема базы данных</title>
|
||
<style>
|
||
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{background:#f8fafc;color:#0f172a;font:13px/1.4 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;display:grid;grid-template-rows:auto minmax(0,1fr) 36px;grid-template-columns:minmax(0,1fr);height:100dvh}.sans{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.mono,code{font-family:'Cascadia Mono','SFMono-Regular',Consolas,'Noto Sans Mono',monospace}button,input,select{font:inherit}button,select,input{border:1px solid #cbd5e1;background:#fdfefe;color:#0f172a;border-radius:5px;height:34px}button{cursor:pointer;padding:0 12px;white-space:nowrap}button:hover{background:#eeedff;border-color:#4f46e5}button:focus-visible,input:focus-visible,select:focus-visible,.entity:focus-visible{outline:2px solid #4f46e5;outline-offset:2px}.toolbar{display:flex;align-items:center;gap:20px;min-height:76px;padding:12px 20px;border-bottom:1px solid #cbd5e1;background:#fdfefe}.brand{display:flex;align-items:center;gap:12px;flex-shrink:0}.logo{width:32px;height:32px;background:#4f46e5;color:#f8fafc;border-radius:5px;display:grid;place-items:center;font-size:20px;font-weight:600}.brand h1{font-size:15px;letter-spacing:-.02em;margin:0;font-weight:600}.brand p{font-size:11px;color:#475569;margin:3px 0 0}.controls{display:flex;align-items:center;gap:6px;margin-left:auto}.zoom-value{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;color:#475569}.search{width:250px;padding:0 10px}.workspace{height:auto;min-height:0;min-width:0;width:100%;position:relative;display:flex}.viewport{flex:1;min-width:0;overflow:auto;cursor:grab;overscroll-behavior:contain;background-color:#e8edf3;touch-action:pan-x pan-y}.viewport.dragging{cursor:grabbing;user-select:none}.canvas{position:relative;margin:20px;line-height:0;width:max-content;min-width:0}.canvas>svg{display:block;background:#f8fafc}.table-box{fill:#f8fafc;stroke:#475569;stroke-width:1.25}.entity{cursor:pointer;outline:none}.entity.selected .table-box,.entity:focus-visible .table-box{stroke:#4f46e5;stroke-width:3}.wire-under{fill:none;stroke:#f8fafc;stroke-width:5;stroke-linejoin:round}.wire{fill:none;stroke:#64748b;stroke-width:1.65;stroke-linejoin:round;pointer-events:none}.wire-hit{fill:none;stroke:transparent;stroke-width:10;cursor:crosshair}.relation.active .wire{stroke:#4f46e5;stroke-width:3}.relation.active .wire-under{stroke-width:7}.schema-focused .relation:not(.active){opacity:.16}.schema-focused .entity:not(.related):not(.selected){opacity:.38}.relation:hover .wire{stroke:#4f46e5;stroke-width:3}.inspector{width:350px;flex-shrink:0;background:#fdfefe;border-left:1px solid #cbd5e1;overflow:auto;padding:20px;line-height:1.6}.inspector[hidden]{display:none}.inspector h2{font-size:14px;overflow-wrap:anywhere;margin:0 0 4px}.inspector h3{font-size:12px;color:#475569;text-transform:uppercase;letter-spacing:.06em;margin:24px 0 12px}.inspector p{font-size:12px;color:#475569;margin:6px 0}.inspector .close{float:right;height:28px;margin:-6px -6px 8px 8px;padding:0 8px}.link-list{list-style:none;padding:0;margin:0}.link-list li{padding:10px 0;border-top:1px solid #e2e8f0}.link-list button{height:auto;text-align:left;border:0;border-radius:0;padding:0;background:transparent;color:#4338ca;display:block;overflow-wrap:anywhere;white-space:normal;font-size:11px}.link-list small{color:#475569;display:block;font-size:10px;padding-top:3px}.constraint{font-size:10px;overflow-wrap:anywhere;white-space:normal;color:#475569;display:block;padding:8px 0;border-top:1px solid #e2e8f0}.status{height:36px;display:flex;align-items:center;gap:16px;padding:0 20px;background:#fdfefe;border-top:1px solid #cbd5e1;font-size:11px;color:#475569}.status>span:first-child{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.source{white-space:nowrap}.hint{position:absolute;bottom:20px;left:20px;pointer-events:none;padding:8px 12px;background:#fdfefe;border:1px solid #cbd5e1;border-radius:5px;color:#475569;font-size:11px;max-width:calc(100% - 40px)}.help{margin-left:6px}.fallback{padding:16px;background:#eeedff;color:#0f172a;font-size:13px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
|
||
@media(max-width:1100px){.toolbar{gap:10px;flex-wrap:wrap}.controls{flex-wrap:wrap}.brand{margin-right:auto}.search{width:210px}.workspace{height:auto}.toolbar{min-height:116px}.help{display:none}}@media(max-width:640px){.toolbar{padding:10px 12px;gap:8px}.brand{width:100%}.controls{margin-left:0;width:100%;gap:4px}.search{flex:1;min-width:130px;width:auto}.controls button{padding:0 8px}.controls .reset{display:none}.brand h1{font-size:14px}.workspace{height:auto}.inspector{position:absolute;right:0;top:0;bottom:0;width:min(350px,88vw)}.source{display:none}.status{padding:0 12px}.hint{left:12px;bottom:12px;font-size:10px}}
|
||
@media print{html,body{overflow:visible;height:auto}.toolbar,.inspector,.status,.hint{display:none}.workspace,.viewport{height:auto;overflow:visible;display:block}.canvas{margin:0;width:100%!important;height:auto!important}.canvas>svg{width:100%!important;height:auto!important}.schema-focused .relation,.schema-focused .entity{opacity:1!important}}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<header class="toolbar">
|
||
<div class="brand"><span class="logo" aria-hidden="true">М</span><div><h1>Магистр · Полная схема БД</h1><p>46 таблиц · 387 столбцов · 105 внешних ключей</p></div></div>
|
||
<div class="controls">
|
||
<label for="search" class="sr-only">Найти таблицу</label><input id="search" class="search" type="search" list="table-names" placeholder="Найти таблицу…" autocomplete="off"><datalist id="table-names"></datalist>
|
||
<button id="zoom-out" aria-label="Уменьшить масштаб">−</button><output id="zoom-value" class="zoom-value" aria-live="polite">100%</output><button id="zoom-in" aria-label="Увеличить масштаб">+</button><button id="actual">100%</button><button id="fit">Вся схема</button><button id="clear" class="reset">Сбросить выделение</button>
|
||
</div>
|
||
</header>
|
||
<div class="workspace">
|
||
<main id="viewport" class="viewport" aria-label="Полотно полной схемы базы данных"><div id="canvas" class="canvas"><svg id="schema" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4864 3884" width="4864" height="3884" role="img" aria-labelledby="database-schema-title database-schema-desc"><title id="database-schema-title">Полная схема базы данных «Магистр»</title><desc id="database-schema-desc">Все 46 таблиц, 387 столбцов и 105 внешних ключей одной tenant-БД на едином полотне.</desc><defs><marker id="fk-arrow" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 1 1 L 7 4 L 1 7" fill="none" stroke="context-stroke" stroke-width="1.4"/></marker></defs><rect width="4864" height="3884" fill="#f8fafc"/><text x="64" y="44" font-size="20" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">МАГИСТР / ПОЛНАЯ ФИЗИЧЕСКАЯ СХЕМА</text><text x="64" y="72" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">46 таблиц · 387 столбцов · 105 FK · одна tenant-БД · источник: V1__init.sql</text><text x="64" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">ГРУППЫ И НАПРАВЛЕНИЯ</text><text x="768" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">УЧЕБНЫЙ КАЛЕНДАРЬ</text><text x="1472" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">ПЛАНЫ И ВРЕМЯ</text><text x="2176" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">ПОЛЬЗОВАТЕЛИ И КАФЕДРЫ</text><text x="2880" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">РАСПИСАНИЕ</text><text x="3584" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">ДИСЦИПЛИНЫ И РЕСУРСЫ</text><text x="4288" y="124" font-size="14" fill="#475569" font-weight="600" text-anchor="start" class="sans">ИЗМЕНЕНИЯ И ЗАЯВКИ</text><g id="relations"><g id="fk-1-0" class="relation" data-source="specialty_profiles" data-target="specialties" data-number="1"><title>FK01: specialty_profiles.(specialty_id) → specialties.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 576 724 L 592 724 Q 600 724 600 716 L 600 236 Q 600 228 592 228 L 576 228"/><path class="wire" d="M 576 724 L 592 724 Q 600 724 600 716 L 600 236 Q 600 228 592 228 L 576 228" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 724 L 592 724 Q 600 724 600 716 L 600 236 Q 600 228 592 228 L 576 228"/></g><g id="fk-2-0" class="relation" data-source="users" data-target="departments" data-number="2"><title>FK02: users.(department_id) → departments.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 2042 L 2752 2042 Q 2760 2042 2760 2034 L 2760 1064 Q 2760 1056 2752 1056 L 2688 1056"/><path class="wire" d="M 2688 2042 L 2752 2042 Q 2760 2042 2760 2034 L 2760 1064 Q 2760 1056 2752 1056 L 2688 1056" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 2042 L 2752 2042 Q 2760 2042 2760 2034 L 2760 1064 Q 2760 1056 2752 1056 L 2688 1056"/></g><g id="fk-3-0" class="relation" data-source="auth_refresh_tokens" data-target="users" data-number="3"><title>FK03: auth_refresh_tokens.(user_id) → users.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 2688 2498 L 2740 2498 Q 2748 2498 2748 2490 L 2748 1524 Q 2748 1516 2740 1516 L 2688 1516"/><path class="wire" d="M 2688 2498 L 2740 2498 Q 2748 2498 2748 2490 L 2748 1524 Q 2748 1516 2740 1516 L 2688 1516" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 2498 L 2740 2498 Q 2748 2498 2748 2490 L 2748 1524 Q 2748 1516 2740 1516 L 2688 1516"/></g><g id="fk-4-0" class="relation" data-source="teacher_department_assignments" data-target="users" data-number="4"><title>FK04: teacher_department_assignments.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 2954 L 2788 2954 Q 2796 2954 2796 2946 L 2796 1536 Q 2796 1528 2788 1528 L 2688 1528"/><path class="wire" d="M 2688 2954 L 2788 2954 Q 2796 2954 2796 2946 L 2796 1536 Q 2796 1528 2788 1528 L 2688 1528" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 2954 L 2788 2954 Q 2796 2954 2796 2946 L 2796 1536 Q 2796 1528 2788 1528 L 2688 1528"/></g><g id="fk-5-0" class="relation" data-source="teacher_department_assignments" data-target="departments" data-number="5"><title>FK05: teacher_department_assignments.(department_id) → departments.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 2982 L 2836 2982 Q 2844 2982 2844 2974 L 2844 1076 Q 2844 1068 2836 1068 L 2688 1068"/><path class="wire" d="M 2688 2982 L 2836 2982 Q 2844 2982 2844 2974 L 2844 1076 Q 2844 1068 2836 1068 L 2688 1068" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 2982 L 2836 2982 Q 2844 2982 2844 2974 L 2844 1076 Q 2844 1068 2836 1068 L 2688 1068"/></g><g id="fk-6-0" class="relation" data-source="teacher_department_assignments" data-target="users" data-number="6"><title>FK06: teacher_department_assignments.(created_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 3150 L 2824 3150 Q 2832 3150 2832 3142 L 2832 1548 Q 2832 1540 2824 1540 L 2688 1540"/><path class="wire" d="M 2688 3150 L 2824 3150 Q 2832 3150 2832 3142 L 2832 1548 Q 2832 1540 2824 1540 L 2688 1540" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 3150 L 2824 3150 Q 2832 3150 2832 3142 L 2832 1548 Q 2832 1540 2824 1540 L 2688 1540"/></g><g id="fk-7-0" class="relation" data-source="teacher_creation_requests" data-target="departments" data-number="7"><title>FK07: teacher_creation_requests.(department_id) → departments.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 3382 L 2848 3382 Q 2856 3382 2856 3374 L 2856 1088 Q 2856 1080 2848 1080 L 2688 1080"/><path class="wire" d="M 2688 3382 L 2848 3382 Q 2856 3382 2856 3374 L 2856 1088 Q 2856 1080 2848 1080 L 2688 1080" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 3382 L 2848 3382 Q 2856 3382 2856 3374 L 2856 1088 Q 2856 1080 2848 1080 L 2688 1080"/></g><g id="fk-8-0" class="relation" data-source="teacher_creation_requests" data-target="users" data-number="8"><title>FK08: teacher_creation_requests.(requested_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 3550 L 2776 3550 Q 2784 3550 2784 3542 L 2784 1830 Q 2784 1822 2776 1822 L 2720 1822 Q 2712 1822 2712 1814 L 2712 1560 Q 2712 1552 2704 1552 L 2688 1552"/><path class="wire" d="M 2688 3550 L 2776 3550 Q 2784 3550 2784 3542 L 2784 1830 Q 2784 1822 2776 1822 L 2720 1822 Q 2712 1822 2712 1814 L 2712 1560 Q 2712 1552 2704 1552 L 2688 1552" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 3550 L 2776 3550 Q 2784 3550 2784 3542 L 2784 1830 Q 2784 1822 2776 1822 L 2720 1822 Q 2712 1822 2712 1814 L 2712 1560 Q 2712 1552 2704 1552 L 2688 1552"/></g><g id="fk-9-0" class="relation" data-source="teacher_creation_requests" data-target="users" data-number="9"><title>FK09: teacher_creation_requests.(reviewed_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 3634 L 2800 3634 Q 2808 3634 2808 3626 L 2808 1644 Q 2808 1636 2800 1636 L 2780 1636 Q 2772 1636 2772 1628 L 2772 1572 Q 2772 1564 2764 1564 L 2688 1564"/><path class="wire" d="M 2688 3634 L 2800 3634 Q 2808 3634 2808 3626 L 2808 1644 Q 2808 1636 2800 1636 L 2780 1636 Q 2772 1636 2772 1628 L 2772 1572 Q 2772 1564 2764 1564 L 2688 1564" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 3634 L 2800 3634 Q 2808 3634 2808 3626 L 2808 1644 Q 2808 1636 2800 1636 L 2780 1636 Q 2772 1636 2772 1628 L 2772 1572 Q 2772 1564 2764 1564 L 2688 1564"/></g><g id="fk-10-0" class="relation" data-source="teacher_creation_requests" data-target="users" data-number="10"><title>FK10: teacher_creation_requests.(created_teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2688 3718 L 2812 3718 Q 2820 3718 2820 3710 L 2820 1632 Q 2820 1624 2812 1624 L 2744 1624 Q 2736 1624 2736 1616 L 2736 1584 Q 2736 1576 2728 1576 L 2688 1576"/><path class="wire" d="M 2688 3718 L 2812 3718 Q 2820 3718 2820 3710 L 2820 1632 Q 2820 1624 2812 1624 L 2744 1624 Q 2736 1624 2736 1616 L 2736 1584 Q 2736 1576 2728 1576 L 2688 1576" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 3718 L 2812 3718 Q 2820 3718 2820 3710 L 2820 1632 Q 2820 1624 2812 1624 L 2744 1624 Q 2736 1624 2736 1616 L 2736 1584 Q 2736 1576 2728 1576 L 2688 1576"/></g><g id="fk-11-0" class="relation" data-source="student_groups" data-target="education_forms" data-number="11"><title>FK11: student_groups.(education_form_id) → education_forms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 576 1794 L 592 1794 Q 600 1794 600 1786 L 600 1208 Q 600 1200 592 1200 L 576 1200"/><path class="wire" d="M 576 1794 L 592 1794 Q 600 1794 600 1786 L 600 1208 Q 600 1200 592 1200 L 576 1200" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1794 L 592 1794 Q 600 1794 600 1786 L 600 1208 Q 600 1200 592 1200 L 576 1200"/></g><g id="fk-12-0" class="relation" data-source="student_groups" data-target="departments" data-number="12"><title>FK12: student_groups.(department_id) → departments.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 576 1822 L 712 1822 Q 720 1822 720 1814 L 720 1196 Q 720 1188 728 1188 L 1440 1188 Q 1448 1188 1448 1180 L 1448 1082 Q 1448 1074 1456 1074 L 2176 1074"/><path class="wire" d="M 576 1822 L 712 1822 Q 720 1822 720 1814 L 720 1196 Q 720 1188 728 1188 L 1440 1188 Q 1448 1188 1448 1180 L 1448 1082 Q 1448 1074 1456 1074 L 2176 1074" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1822 L 712 1822 Q 720 1822 720 1814 L 720 1196 Q 720 1188 728 1188 L 1440 1188 Q 1448 1188 1448 1180 L 1448 1082 Q 1448 1074 1456 1074 L 2176 1074"/></g><g id="fk-13-0" class="relation" data-source="student_groups" data-target="specialties" data-number="13"><title>FK13: student_groups.(specialty_id) → specialties.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 576 1848 L 664 1848 Q 672 1848 672 1840 L 672 248 Q 672 240 664 240 L 576 240"/><path class="wire" d="M 576 1848 L 664 1848 Q 672 1848 672 1840 L 672 248 Q 672 240 664 240 L 576 240" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1848 L 664 1848 Q 672 1848 672 1840 L 672 248 Q 672 240 664 240 L 576 240"/></g><g id="fk-14-0" class="relation" data-source="student_groups" data-target="specialty_profiles" data-number="14"><title>FK14: student_groups.(specialty_profile_id, specialty_id) → specialty_profiles.(id, specialty_id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 576 1886 L 640 1886 Q 648 1886 648 1878 L 648 684 Q 648 676 640 676 L 576 676"/><path class="wire" d="M 576 1886 L 640 1886 Q 648 1886 648 1878 L 648 684 Q 648 676 640 676 L 576 676" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1886 L 640 1886 Q 648 1886 648 1878 L 648 684 Q 648 676 640 676 L 576 676"/></g><g id="fk-14-1" class="relation" data-source="student_groups" data-target="specialty_profiles" data-number="14"><title>FK14: student_groups.(specialty_profile_id, specialty_id) → specialty_profiles.(id, specialty_id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 576 1860 L 628 1860 Q 636 1860 636 1852 L 636 744 Q 636 736 628 736 L 576 736"/><path class="wire" d="M 576 1860 L 628 1860 Q 636 1860 636 1852 L 636 744 Q 636 736 628 736 L 576 736" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1860 L 628 1860 Q 636 1860 636 1852 L 636 744 Q 636 736 628 736 L 576 736"/></g><g id="fk-15-0" class="relation" data-source="subgroups" data-target="student_groups" data-number="15"><title>FK15: subgroups.(group_id) → student_groups.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 576 2342 L 604 2342 Q 612 2342 612 2334 L 612 1684 Q 612 1676 604 1676 L 576 1676"/><path class="wire" d="M 576 2342 L 604 2342 Q 612 2342 612 2334 L 612 1684 Q 612 1676 604 1676 L 576 1676" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 2342 L 604 2342 Q 612 2342 612 2334 L 612 1684 Q 612 1676 604 1676 L 576 1676"/></g><g id="fk-16-0" class="relation" data-source="subjects" data-target="departments" data-number="16"><title>FK16: subjects.(department_id) → departments.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3584 334 L 3484 334 Q 3476 334 3476 342 L 3476 1044 Q 3476 1052 3468 1052 L 2720 1052 Q 2712 1052 2712 1060 L 2712 1084 Q 2712 1092 2704 1092 L 2688 1092"/><path class="wire" d="M 3584 334 L 3484 334 Q 3476 334 3476 342 L 3476 1044 Q 3476 1052 3468 1052 L 2720 1052 Q 2712 1052 2712 1060 L 2712 1084 Q 2712 1092 2704 1092 L 2688 1092" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 334 L 3484 334 Q 3476 334 3476 342 L 3476 1044 Q 3476 1052 3468 1052 L 2720 1052 Q 2712 1052 2712 1060 L 2712 1084 Q 2712 1092 2704 1092 L 2688 1092"/></g><g id="fk-17-0" class="relation" data-source="subject_comments" data-target="subjects" data-number="17"><title>FK17: subject_comments.(subject_id) → subjects.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4096 1506 L 4148 1506 Q 4156 1506 4156 1498 L 4156 240 Q 4156 232 4148 232 L 4096 232"/><path class="wire" d="M 4096 1506 L 4148 1506 Q 4156 1506 4156 1498 L 4156 240 Q 4156 232 4148 232 L 4096 232" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4096 1506 L 4148 1506 Q 4156 1506 4156 1498 L 4156 240 Q 4156 232 4148 232 L 4096 232"/></g><g id="fk-18-0" class="relation" data-source="subject_comments" data-target="users" data-number="18"><title>FK18: subject_comments.(author_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3584 1534 L 2744 1534 Q 2736 1534 2736 1542 L 2736 1580 Q 2736 1588 2728 1588 L 2688 1588"/><path class="wire" d="M 3584 1534 L 2744 1534 Q 2736 1534 2736 1542 L 2736 1580 Q 2736 1588 2728 1588 L 2688 1588" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 1534 L 2744 1534 Q 2736 1534 2736 1542 L 2736 1580 Q 2736 1588 2728 1588 L 2688 1588"/></g><g id="fk-19-0" class="relation" data-source="classroom_equipments" data-target="classrooms" data-number="19"><title>FK19: classroom_equipments.(classroom_id) → classrooms.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4096 2838 L 4124 2838 Q 4132 2838 4132 2830 L 4132 1800 Q 4132 1792 4124 1792 L 4096 1792"/><path class="wire" d="M 4096 2838 L 4124 2838 Q 4132 2838 4132 2830 L 4132 1800 Q 4132 1792 4124 1792 L 4096 1792" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4096 2838 L 4124 2838 Q 4132 2838 4132 2830 L 4132 1800 Q 4132 1792 4124 1792 L 4096 1792"/></g><g id="fk-20-0" class="relation" data-source="classroom_equipments" data-target="equipments" data-number="20"><title>FK20: classroom_equipments.(equipment_id) → equipments.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4096 2866 L 4112 2866 Q 4120 2866 4120 2858 L 4120 2390 Q 4120 2382 4112 2382 L 4096 2382"/><path class="wire" d="M 4096 2866 L 4112 2866 Q 4120 2866 4120 2858 L 4120 2390 Q 4120 2382 4112 2382 L 4096 2382" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4096 2866 L 4112 2866 Q 4120 2866 4120 2858 L 4120 2390 Q 4120 2382 4112 2382 L 4096 2382"/></g><g id="fk-21-0" class="relation" data-source="teacher_subjects" data-target="users" data-number="21"><title>FK21: teacher_subjects.(user_id) → users.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3584 1106 L 3484 1106 Q 3476 1106 3476 1114 L 3476 1576 Q 3476 1584 3468 1584 L 2780 1584 Q 2772 1584 2772 1592 L 2772 1592 Q 2772 1600 2764 1600 L 2688 1600"/><path class="wire" d="M 3584 1106 L 3484 1106 Q 3476 1106 3476 1114 L 3476 1576 Q 3476 1584 3468 1584 L 2780 1584 Q 2772 1584 2772 1592 L 2772 1592 Q 2772 1600 2764 1600 L 2688 1600" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 1106 L 3484 1106 Q 3476 1106 3476 1114 L 3476 1576 Q 3476 1584 3468 1584 L 2780 1584 Q 2772 1584 2772 1592 L 2772 1592 Q 2772 1600 2764 1600 L 2688 1600"/></g><g id="fk-22-0" class="relation" data-source="teacher_subjects" data-target="subjects" data-number="22"><title>FK22: teacher_subjects.(subject_id) → subjects.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4096 1134 L 4124 1134 Q 4132 1134 4132 1126 L 4132 256 Q 4132 248 4124 248 L 4096 248"/><path class="wire" d="M 4096 1134 L 4124 1134 Q 4132 1134 4132 1126 L 4132 256 Q 4132 248 4124 248 L 4096 248" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4096 1134 L 4124 1134 Q 4132 1134 4132 1126 L 4132 256 Q 4132 248 4124 248 L 4096 248"/></g><g id="fk-23-0" class="relation" data-source="teacher_subjects" data-target="lesson_types" data-number="23"><title>FK23: teacher_subjects.(lesson_type_id) → lesson_types.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4096 1218 L 4112 1218 Q 4120 1218 4120 1210 L 4120 770 Q 4120 762 4112 762 L 4096 762"/><path class="wire" d="M 4096 1218 L 4112 1218 Q 4120 1218 4120 1210 L 4120 770 Q 4120 762 4112 762 L 4096 762" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4096 1218 L 4112 1218 Q 4120 1218 4120 1210 L 4120 770 Q 4120 762 4112 762 L 4096 762"/></g><g id="fk-24-0" class="relation" data-source="time_slots" data-target="time_slot_scopes" data-number="24"><title>FK24: time_slots.(time_slot_scope_id) → time_slot_scopes.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1984 1886 L 2000 1886 Q 2008 1886 2008 1878 L 2008 1452 Q 2008 1444 2000 1444 L 1984 1444"/><path class="wire" d="M 1984 1886 L 2000 1886 Q 2008 1886 2008 1878 L 2008 1452 Q 2008 1444 2000 1444 L 1984 1444" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 1886 L 2000 1886 Q 2008 1886 2008 1878 L 2008 1452 Q 2008 1444 2000 1444 L 1984 1444"/></g><g id="fk-25-0" class="relation" data-source="time_slot_date_assignments" data-target="time_slot_scopes" data-number="25"><title>FK25: time_slot_date_assignments.(time_slot_scope_id) → time_slot_scopes.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1984 2258 L 2012 2258 Q 2020 2258 2020 2250 L 2020 1464 Q 2020 1456 2012 1456 L 1984 1456"/><path class="wire" d="M 1984 2258 L 2012 2258 Q 2020 2258 2020 2250 L 2020 1464 Q 2020 1456 2012 1456 L 1984 1456" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 2258 L 2012 2258 Q 2020 2258 2020 2250 L 2020 1464 Q 2020 1456 2012 1456 L 1984 1456"/></g><g id="fk-26-0" class="relation" data-source="teacher_subjects" data-target="academic_years" data-number="26"><title>FK26: teacher_subjects.(academic_year_id) → academic_years.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3584 1162 L 3508 1162 Q 3500 1162 3500 1154 L 3500 644 Q 3500 636 3492 636 L 2720 636 Q 2712 636 2712 628 L 2712 520 Q 2712 512 2704 512 L 2052 512 Q 2044 512 2044 504 L 2044 416 Q 2044 408 2036 408 L 1348 408 Q 1340 408 1340 400 L 1340 236 Q 1340 228 1332 228 L 1280 228"/><path class="wire" d="M 3584 1162 L 3508 1162 Q 3500 1162 3500 1154 L 3500 644 Q 3500 636 3492 636 L 2720 636 Q 2712 636 2712 628 L 2712 520 Q 2712 512 2704 512 L 2052 512 Q 2044 512 2044 504 L 2044 416 Q 2044 408 2036 408 L 1348 408 Q 1340 408 1340 400 L 1340 236 Q 1340 228 1332 228 L 1280 228" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 1162 L 3508 1162 Q 3500 1162 3500 1154 L 3500 644 Q 3500 636 3492 636 L 2720 636 Q 2712 636 2712 628 L 2712 520 Q 2712 512 2704 512 L 2052 512 Q 2044 512 2044 504 L 2044 416 Q 2044 408 2036 408 L 1348 408 Q 1340 408 1340 400 L 1340 236 Q 1340 228 1332 228 L 1280 228"/></g><g id="fk-27-0" class="relation" data-source="semesters" data-target="academic_years" data-number="27"><title>FK27: semesters.(academic_year_id) → academic_years.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 610 L 1296 610 Q 1304 610 1304 602 L 1304 248 Q 1304 240 1296 240 L 1280 240"/><path class="wire" d="M 1280 610 L 1296 610 Q 1304 610 1304 602 L 1304 248 Q 1304 240 1296 240 L 1280 240" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 610 L 1296 610 Q 1304 610 1304 602 L 1304 248 Q 1304 240 1296 240 L 1280 240"/></g><g id="fk-28-0" class="relation" data-source="academic_calendars" data-target="academic_years" data-number="28"><title>FK28: academic_calendars.(academic_year_id) → academic_years.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 974 L 1308 974 Q 1316 974 1316 966 L 1316 260 Q 1316 252 1308 252 L 1280 252"/><path class="wire" d="M 1280 974 L 1308 974 Q 1316 974 1316 966 L 1316 260 Q 1316 252 1308 252 L 1280 252" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 974 L 1308 974 Q 1316 974 1316 966 L 1316 260 Q 1316 252 1308 252 L 1280 252"/></g><g id="fk-29-0" class="relation" data-source="academic_calendars" data-target="specialties" data-number="29"><title>FK29: academic_calendars.(specialty_id) → specialties.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 768 1000 L 632 1000 Q 624 1000 624 992 L 624 260 Q 624 252 616 252 L 576 252"/><path class="wire" d="M 768 1000 L 632 1000 Q 624 1000 624 992 L 624 260 Q 624 252 616 252 L 576 252" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 768 1000 L 632 1000 Q 624 1000 624 992 L 624 260 Q 624 252 616 252 L 576 252"/></g><g id="fk-30-0" class="relation" data-source="academic_calendars" data-target="education_forms" data-number="30"><title>FK30: academic_calendars.(study_form_id) → education_forms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 768 1066 L 608 1066 Q 600 1066 600 1074 L 600 1204 Q 600 1212 592 1212 L 576 1212"/><path class="wire" d="M 768 1066 L 608 1066 Q 600 1066 600 1074 L 600 1204 Q 600 1212 592 1212 L 576 1212" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 768 1066 L 608 1066 Q 600 1066 600 1074 L 600 1204 Q 600 1212 592 1212 L 576 1212"/></g><g id="fk-31-0" class="relation" data-source="academic_calendars" data-target="specialty_profiles" data-number="31"><title>FK31: academic_calendars.(specialty_profile_id, specialty_id) → specialty_profiles.(id, specialty_id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 768 1038 L 620 1038 Q 612 1038 612 1030 L 612 696 Q 612 688 604 688 L 576 688"/><path class="wire" d="M 768 1038 L 620 1038 Q 612 1038 612 1030 L 612 696 Q 612 688 604 688 L 576 688" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 768 1038 L 620 1038 Q 612 1038 612 1030 L 612 696 Q 612 688 604 688 L 576 688"/></g><g id="fk-31-1" class="relation" data-source="academic_calendars" data-target="specialty_profiles" data-number="31"><title>FK31: academic_calendars.(specialty_profile_id, specialty_id) → specialty_profiles.(id, specialty_id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 768 1012 L 608 1012 Q 600 1012 600 1004 L 600 756 Q 600 748 592 748 L 576 748"/><path class="wire" d="M 768 1012 L 608 1012 Q 600 1012 600 1004 L 600 756 Q 600 748 592 748 L 576 748" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 768 1012 L 608 1012 Q 600 1012 600 1004 L 600 756 Q 600 748 592 748 L 576 748"/></g><g id="fk-32-0" class="relation" data-source="academic_calendar_periods" data-target="academic_calendars" data-number="32"><title>FK32: academic_calendar_periods.(calendar_id) → academic_calendars.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 1754 L 1308 1754 Q 1316 1754 1316 1746 L 1316 982 Q 1316 976 1310 976 L 1310 976 Q 1304 976 1304 970 L 1304 904 Q 1304 896 1296 896 L 1280 896"/><path class="wire" d="M 1280 1754 L 1308 1754 Q 1316 1754 1316 1746 L 1316 982 Q 1316 976 1310 976 L 1310 976 Q 1304 976 1304 970 L 1304 904 Q 1304 896 1296 896 L 1280 896" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 1754 L 1308 1754 Q 1316 1754 1316 1746 L 1316 982 Q 1316 976 1310 976 L 1310 976 Q 1304 976 1304 970 L 1304 904 Q 1304 896 1296 896 L 1280 896"/></g><g id="fk-33-0" class="relation" data-source="academic_calendar_periods" data-target="academic_calendar_activity_types" data-number="33"><title>FK33: academic_calendar_periods.(activity_type_id) → academic_calendar_activity_types.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1280 1866 L 1296 1866 Q 1304 1866 1304 1858 L 1304 1362 Q 1304 1354 1296 1354 L 1280 1354"/><path class="wire" d="M 1280 1866 L 1296 1866 Q 1304 1866 1304 1858 L 1304 1362 Q 1304 1354 1296 1354 L 1280 1354" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 1866 L 1296 1866 Q 1304 1866 1304 1858 L 1304 1362 Q 1304 1354 1296 1354 L 1280 1354"/></g><g id="fk-34-0" class="relation" data-source="academic_calendar_subjects" data-target="academic_calendars" data-number="34"><title>FK34: academic_calendar_subjects.(calendar_id) → academic_calendars.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 2098 L 1332 2098 Q 1340 2098 1340 2090 L 1340 916 Q 1340 908 1332 908 L 1280 908"/><path class="wire" d="M 1280 2098 L 1332 2098 Q 1340 2098 1340 2090 L 1340 916 Q 1340 908 1332 908 L 1280 908" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 2098 L 1332 2098 Q 1340 2098 1340 2090 L 1340 916 Q 1340 908 1332 908 L 1280 908"/></g><g id="fk-35-0" class="relation" data-source="academic_calendar_subjects" data-target="subjects" data-number="35"><title>FK35: academic_calendar_subjects.(subject_id) → subjects.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1280 2154 L 1416 2154 Q 1424 2154 1424 2146 L 1424 1352 Q 1424 1344 1432 1344 L 2824 1344 Q 2832 1344 2832 1336 L 2832 646 Q 2832 638 2840 638 L 3528 638 Q 3536 638 3536 630 L 3536 236 Q 3536 228 3544 228 L 3584 228"/><path class="wire" d="M 1280 2154 L 1416 2154 Q 1424 2154 1424 2146 L 1424 1352 Q 1424 1344 1432 1344 L 2824 1344 Q 2832 1344 2832 1336 L 2832 646 Q 2832 638 2840 638 L 3528 638 Q 3536 638 3536 630 L 3536 236 Q 3536 228 3544 228 L 3584 228" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 2154 L 1416 2154 Q 1424 2154 1424 2146 L 1424 1352 Q 1424 1344 1432 1344 L 2824 1344 Q 2832 1344 2832 1336 L 2832 646 Q 2832 638 2840 638 L 3528 638 Q 3536 638 3536 630 L 3536 236 Q 3536 228 3544 228 L 3584 228"/></g><g id="fk-36-0" class="relation" data-source="student_group_calendar_assignments" data-target="student_groups" data-number="36"><title>FK36: student_group_calendar_assignments.(group_id) → student_groups.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 768 2414 L 632 2414 Q 624 2414 624 2406 L 624 1696 Q 624 1688 616 1688 L 576 1688"/><path class="wire" d="M 768 2414 L 632 2414 Q 624 2414 624 2406 L 624 1696 Q 624 1688 616 1688 L 576 1688" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 768 2414 L 632 2414 Q 624 2414 624 2406 L 624 1696 Q 624 1688 616 1688 L 576 1688"/></g><g id="fk-37-0" class="relation" data-source="student_group_calendar_assignments" data-target="academic_years" data-number="37"><title>FK37: student_group_calendar_assignments.(academic_year_id) → academic_years.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 2442 L 1368 2442 Q 1376 2442 1376 2434 L 1376 272 Q 1376 264 1368 264 L 1280 264"/><path class="wire" d="M 1280 2442 L 1368 2442 Q 1376 2442 1376 2434 L 1376 272 Q 1376 264 1368 264 L 1280 264" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 2442 L 1368 2442 Q 1376 2442 1376 2434 L 1376 272 Q 1376 264 1368 264 L 1280 264"/></g><g id="fk-38-0" class="relation" data-source="student_group_calendar_assignments" data-target="academic_calendars" data-number="38"><title>FK38: student_group_calendar_assignments.(calendar_id) → academic_calendars.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1280 2470 L 1344 2470 Q 1352 2470 1352 2462 L 1352 928 Q 1352 920 1344 920 L 1280 920"/><path class="wire" d="M 1280 2470 L 1344 2470 Q 1352 2470 1352 2462 L 1352 928 Q 1352 920 1344 920 L 1280 920" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1280 2470 L 1344 2470 Q 1352 2470 1352 2462 L 1352 928 Q 1352 920 1344 920 L 1280 920"/></g><g id="fk-39-0" class="relation" data-source="schedule_rules" data-target="subjects" data-number="39"><title>FK39: schedule_rules.(subject_id) → subjects.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3392 1222 L 3540 1222 Q 3548 1222 3548 1214 L 3548 248 Q 3548 240 3556 240 L 3584 240"/><path class="wire" d="M 3392 1222 L 3540 1222 Q 3548 1222 3548 1214 L 3548 248 Q 3548 240 3556 240 L 3584 240" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1222 L 3540 1222 Q 3548 1222 3548 1214 L 3548 248 Q 3548 240 3556 240 L 3584 240"/></g><g id="fk-40-0" class="relation" data-source="schedule_rules" data-target="semesters" data-number="40"><title>FK40: schedule_rules.(semester_id) → semesters.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 2880 1250 L 2732 1250 Q 2724 1250 2724 1242 L 2724 890 Q 2724 882 2716 882 L 2040 882 Q 2032 882 2032 874 L 2032 680 Q 2032 672 2024 672 L 1348 672 Q 1340 672 1340 664 L 1340 556 Q 1340 548 1332 548 L 1280 548"/><path class="wire" d="M 2880 1250 L 2732 1250 Q 2724 1250 2724 1242 L 2724 890 Q 2724 882 2716 882 L 2040 882 Q 2032 882 2032 874 L 2032 680 Q 2032 672 2024 672 L 1348 672 Q 1340 672 1340 664 L 1340 556 Q 1340 548 1332 548 L 1280 548" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 1250 L 2732 1250 Q 2724 1250 2724 1242 L 2724 890 Q 2724 882 2716 882 L 2040 882 Q 2032 882 2032 874 L 2032 680 Q 2032 672 2024 672 L 1348 672 Q 1340 672 1340 664 L 1340 556 Q 1340 548 1332 548 L 1280 548"/></g><g id="fk-41-0" class="relation" data-source="schedule_rules" data-target="users" data-number="41"><title>FK41: schedule_rules.(created_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 1418 L 2720 1418 Q 2712 1418 2712 1426 L 2712 1604 Q 2712 1612 2704 1612 L 2688 1612"/><path class="wire" d="M 2880 1418 L 2720 1418 Q 2712 1418 2712 1426 L 2712 1604 Q 2712 1612 2704 1612 L 2688 1612" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 1418 L 2720 1418 Q 2712 1418 2712 1426 L 2712 1604 Q 2712 1612 2704 1612 L 2688 1612"/></g><g id="fk-42-0" class="relation" data-source="schedule_rule_loads" data-target="schedule_rules" data-number="42"><title>FK42: schedule_rule_loads.(schedule_rule_id) → schedule_rules.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 1678 L 3408 1678 Q 3416 1678 3416 1670 L 3416 1152 Q 3416 1144 3408 1144 L 3392 1144"/><path class="wire" d="M 3392 1678 L 3408 1678 Q 3416 1678 3416 1670 L 3416 1152 Q 3416 1144 3408 1144 L 3392 1144" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1678 L 3408 1678 Q 3416 1678 3416 1670 L 3416 1152 Q 3416 1144 3408 1144 L 3392 1144"/></g><g id="fk-43-0" class="relation" data-source="schedule_rule_loads" data-target="lesson_types" data-number="43"><title>FK43: schedule_rule_loads.(lesson_type_code) → lesson_types.(code) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3392 1706 L 3552 1706 Q 3560 1706 3560 1698 L 3560 826 Q 3560 818 3568 818 L 3584 818"/><path class="wire" d="M 3392 1706 L 3552 1706 Q 3560 1706 3560 1698 L 3560 826 Q 3560 818 3568 818 L 3584 818" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1706 L 3552 1706 Q 3560 1706 3560 1698 L 3560 826 Q 3560 818 3568 818 L 3584 818"/></g><g id="fk-44-0" class="relation" data-source="schedule_rule_groups" data-target="schedule_rules" data-number="44"><title>FK44: schedule_rule_groups.(schedule_rule_id) → schedule_rules.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 1966 L 3420 1966 Q 3428 1966 3428 1958 L 3428 1164 Q 3428 1156 3420 1156 L 3392 1156"/><path class="wire" d="M 3392 1966 L 3420 1966 Q 3428 1966 3428 1958 L 3428 1164 Q 3428 1156 3420 1156 L 3392 1156" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1966 L 3420 1966 Q 3428 1966 3428 1958 L 3428 1164 Q 3428 1156 3420 1156 L 3392 1156"/></g><g id="fk-45-0" class="relation" data-source="schedule_rule_groups" data-target="student_groups" data-number="45"><title>FK45: schedule_rule_groups.(group_id) → student_groups.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 2880 1994 L 2732 1994 Q 2724 1994 2724 2002 L 2724 2288 Q 2724 2296 2716 2296 L 1312 2296 Q 1304 2296 1304 2288 L 1304 1916 Q 1304 1908 1296 1908 L 692 1908 Q 684 1908 684 1900 L 684 1708 Q 684 1700 676 1700 L 576 1700"/><path class="wire" d="M 2880 1994 L 2732 1994 Q 2724 1994 2724 2002 L 2724 2288 Q 2724 2296 2716 2296 L 1312 2296 Q 1304 2296 1304 2288 L 1304 1916 Q 1304 1908 1296 1908 L 692 1908 Q 684 1908 684 1900 L 684 1708 Q 684 1700 676 1700 L 576 1700" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 1994 L 2732 1994 Q 2724 1994 2724 2002 L 2724 2288 Q 2724 2296 2716 2296 L 1312 2296 Q 1304 2296 1304 2288 L 1304 1916 Q 1304 1908 1296 1908 L 692 1908 Q 684 1908 684 1900 L 684 1708 Q 684 1700 676 1700 L 576 1700"/></g><g id="fk-46-0" class="relation" data-source="schedule_rule_slots" data-target="schedule_rules" data-number="46"><title>FK46: schedule_rule_slots.(schedule_rule_id) → schedule_rules.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 2258 L 3432 2258 Q 3440 2258 3440 2250 L 3440 1176 Q 3440 1168 3432 1168 L 3392 1168"/><path class="wire" d="M 3392 2258 L 3432 2258 Q 3440 2258 3440 2250 L 3440 1176 Q 3440 1168 3432 1168 L 3392 1168" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 2258 L 3432 2258 Q 3440 2258 3440 2250 L 3440 1176 Q 3440 1168 3432 1168 L 3392 1168"/></g><g id="fk-47-0" class="relation" data-source="schedule_rule_slots" data-target="time_slots" data-number="47"><title>FK47: schedule_rule_slots.(time_slot_id) → time_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 2342 L 2040 2342 Q 2032 2342 2032 2334 L 2032 1832 Q 2032 1824 2024 1824 L 1984 1824"/><path class="wire" d="M 2880 2342 L 2040 2342 Q 2032 2342 2032 2334 L 2032 1832 Q 2032 1824 2024 1824 L 1984 1824" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 2342 L 2040 2342 Q 2032 2342 2032 2334 L 2032 1832 Q 2032 1824 2024 1824 L 1984 1824"/></g><g id="fk-48-0" class="relation" data-source="schedule_rule_slots" data-target="users" data-number="48"><title>FK48: schedule_rule_slots.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 2370 L 2744 2370 Q 2736 2370 2736 2362 L 2736 1632 Q 2736 1624 2728 1624 L 2688 1624"/><path class="wire" d="M 2880 2370 L 2744 2370 Q 2736 2370 2736 2362 L 2736 1632 Q 2736 1624 2728 1624 L 2688 1624" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 2370 L 2744 2370 Q 2736 2370 2736 2362 L 2736 1632 Q 2736 1624 2728 1624 L 2688 1624"/></g><g id="fk-49-0" class="relation" data-source="schedule_rule_slots" data-target="classrooms" data-number="49"><title>FK49: schedule_rule_slots.(classroom_id) → classrooms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3392 2398 L 3552 2398 Q 3560 2398 3560 2390 L 3560 1812 Q 3560 1804 3568 1804 L 3584 1804"/><path class="wire" d="M 3392 2398 L 3552 2398 Q 3560 2398 3560 2390 L 3560 1812 Q 3560 1804 3568 1804 L 3584 1804" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 2398 L 3552 2398 Q 3560 2398 3560 2390 L 3560 1812 Q 3560 1804 3568 1804 L 3584 1804"/></g><g id="fk-50-0" class="relation" data-source="schedule_rule_slots" data-target="lesson_types" data-number="50"><title>FK50: schedule_rule_slots.(lesson_type_id) → lesson_types.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 3392 2426 L 3528 2426 Q 3536 2426 3536 2418 L 3536 770 Q 3536 762 3544 762 L 3584 762"/><path class="wire" d="M 3392 2426 L 3528 2426 Q 3536 2426 3536 2418 L 3536 770 Q 3536 762 3544 762 L 3584 762" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 2426 L 3528 2426 Q 3536 2426 3536 2418 L 3536 770 Q 3536 762 3544 762 L 3584 762"/></g><g id="fk-51-0" class="relation" data-source="schedule_rule_slots" data-target="users" data-number="51"><title>FK51: schedule_rule_slots.(locked_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 2566 L 2780 2566 Q 2772 2566 2772 2558 L 2772 1644 Q 2772 1636 2764 1636 L 2688 1636"/><path class="wire" d="M 2880 2566 L 2780 2566 Q 2772 2566 2772 2558 L 2772 1644 Q 2772 1636 2764 1636 L 2688 1636" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 2566 L 2780 2566 Q 2772 2566 2772 2558 L 2772 1644 Q 2772 1636 2764 1636 L 2688 1636"/></g><g id="fk-52-0" class="relation" data-source="schedule_rule_slot_subgroups" data-target="schedule_rule_slots" data-number="52"><title>FK52: schedule_rule_slot_subgroups.(schedule_rule_slot_id) → schedule_rule_slots.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 2826 L 3408 2826 Q 3416 2826 3416 2818 L 3416 2204 Q 3416 2196 3408 2196 L 3392 2196"/><path class="wire" d="M 3392 2826 L 3408 2826 Q 3416 2826 3416 2818 L 3416 2204 Q 3416 2196 3408 2196 L 3392 2196" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 2826 L 3408 2826 Q 3416 2826 3416 2818 L 3416 2204 Q 3416 2196 3408 2196 L 3392 2196"/></g><g id="fk-53-0" class="relation" data-source="schedule_rule_slot_subgroups" data-target="subgroups" data-number="53"><title>FK53: schedule_rule_slot_subgroups.(subgroup_id) → subgroups.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 2880 2854 L 2720 2854 Q 2712 2854 2712 2846 L 2712 2768 Q 2712 2760 2704 2760 L 608 2760 Q 600 2760 600 2752 L 600 2322 Q 600 2314 592 2314 L 576 2314"/><path class="wire" d="M 2880 2854 L 2720 2854 Q 2712 2854 2712 2846 L 2712 2768 Q 2712 2760 2704 2760 L 608 2760 Q 600 2760 600 2752 L 600 2322 Q 600 2314 592 2314 L 576 2314" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 2854 L 2720 2854 Q 2712 2854 2712 2846 L 2712 2768 Q 2712 2760 2704 2760 L 608 2760 Q 600 2760 600 2752 L 600 2322 Q 600 2314 592 2314 L 576 2314"/></g><g id="fk-54-0" class="relation" data-source="schedule_overrides" data-target="schedule_rule_slots" data-number="54"><title>FK54: schedule_overrides.(base_rule_slot_id) → schedule_rule_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1830 L 4152 1830 Q 4144 1830 4144 1838 L 4144 2200 Q 4144 2208 4136 2208 L 3392 2208"/><path class="wire" d="M 4288 1830 L 4152 1830 Q 4144 1830 4144 1838 L 4144 2200 Q 4144 2208 4136 2208 L 3392 2208" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1830 L 4152 1830 Q 4144 1830 4144 1838 L 4144 2200 Q 4144 2208 4136 2208 L 3392 2208"/></g><g id="fk-55-0" class="relation" data-source="schedule_overrides" data-target="time_slots" data-number="55"><title>FK55: schedule_overrides.(new_time_slot_id) → time_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1942 L 4200 1942 Q 4192 1942 4192 1934 L 4192 1632 Q 4192 1624 4184 1624 L 3472 1624 Q 3464 1624 3464 1616 L 3464 1514 Q 3464 1506 3456 1506 L 2744 1506 Q 2736 1506 2736 1498 L 2736 1424 Q 2736 1416 2728 1416 L 2052 1416 Q 2044 1416 2044 1424 L 2044 1828 Q 2044 1836 2036 1836 L 1984 1836"/><path class="wire" d="M 4288 1942 L 4200 1942 Q 4192 1942 4192 1934 L 4192 1632 Q 4192 1624 4184 1624 L 3472 1624 Q 3464 1624 3464 1616 L 3464 1514 Q 3464 1506 3456 1506 L 2744 1506 Q 2736 1506 2736 1498 L 2736 1424 Q 2736 1416 2728 1416 L 2052 1416 Q 2044 1416 2044 1424 L 2044 1828 Q 2044 1836 2036 1836 L 1984 1836" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1942 L 4200 1942 Q 4192 1942 4192 1934 L 4192 1632 Q 4192 1624 4184 1624 L 3472 1624 Q 3464 1624 3464 1616 L 3464 1514 Q 3464 1506 3456 1506 L 2744 1506 Q 2736 1506 2736 1498 L 2736 1424 Q 2736 1416 2728 1416 L 2052 1416 Q 2044 1416 2044 1424 L 2044 1828 Q 2044 1836 2036 1836 L 1984 1836"/></g><g id="fk-56-0" class="relation" data-source="schedule_overrides" data-target="classrooms" data-number="56"><title>FK56: schedule_overrides.(new_classroom_id) → classrooms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1970 L 4128 1970 Q 4120 1970 4120 1962 L 4120 1812 Q 4120 1804 4112 1804 L 4096 1804"/><path class="wire" d="M 4288 1970 L 4128 1970 Q 4120 1970 4120 1962 L 4120 1812 Q 4120 1804 4112 1804 L 4096 1804" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1970 L 4128 1970 Q 4120 1970 4120 1962 L 4120 1812 Q 4120 1804 4112 1804 L 4096 1804"/></g><g id="fk-57-0" class="relation" data-source="schedule_overrides" data-target="users" data-number="57"><title>FK57: schedule_overrides.(new_teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1998 L 4164 1998 Q 4156 1998 4156 1990 L 4156 1628 Q 4156 1620 4148 1620 L 3460 1620 Q 3452 1620 3452 1612 L 3452 1584 Q 3452 1576 3444 1576 L 2864 1576 Q 2856 1576 2856 1584 L 2856 1640 Q 2856 1648 2848 1648 L 2688 1648"/><path class="wire" d="M 4288 1998 L 4164 1998 Q 4156 1998 4156 1990 L 4156 1628 Q 4156 1620 4148 1620 L 3460 1620 Q 3452 1620 3452 1612 L 3452 1584 Q 3452 1576 3444 1576 L 2864 1576 Q 2856 1576 2856 1584 L 2856 1640 Q 2856 1648 2848 1648 L 2688 1648" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1998 L 4164 1998 Q 4156 1998 4156 1990 L 4156 1628 Q 4156 1620 4148 1620 L 3460 1620 Q 3452 1620 3452 1612 L 3452 1584 Q 3452 1576 3444 1576 L 2864 1576 Q 2856 1576 2856 1584 L 2856 1640 Q 2856 1648 2848 1648 L 2688 1648"/></g><g id="fk-58-0" class="relation" data-source="schedule_overrides" data-target="users" data-number="58"><title>FK58: schedule_overrides.(created_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 2082 L 4176 2082 Q 4168 2082 4168 2074 L 4168 1704 Q 4168 1696 4160 1696 L 3460 1696 Q 3452 1696 3452 1704 L 3452 1784 Q 3452 1792 3444 1792 L 2864 1792 Q 2856 1792 2856 1784 L 2856 1668 Q 2856 1660 2848 1660 L 2688 1660"/><path class="wire" d="M 4288 2082 L 4176 2082 Q 4168 2082 4168 2074 L 4168 1704 Q 4168 1696 4160 1696 L 3460 1696 Q 3452 1696 3452 1704 L 3452 1784 Q 3452 1792 3444 1792 L 2864 1792 Q 2856 1792 2856 1784 L 2856 1668 Q 2856 1660 2848 1660 L 2688 1660" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 2082 L 4176 2082 Q 4168 2082 4168 2074 L 4168 1704 Q 4168 1696 4160 1696 L 3460 1696 Q 3452 1696 3452 1704 L 3452 1784 Q 3452 1792 3444 1792 L 2864 1792 Q 2856 1792 2856 1784 L 2856 1668 Q 2856 1660 2848 1660 L 2688 1660"/></g><g id="fk-59-0" class="relation" data-source="teacher_absences" data-target="users" data-number="59"><title>FK59: teacher_absences.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 2342 L 4128 2342 Q 4120 2342 4120 2334 L 4120 2220 Q 4120 2212 4112 2212 L 3472 2212 Q 3464 2212 3464 2204 L 3464 1812 Q 3464 1804 3456 1804 L 2840 1804 Q 2832 1804 2832 1796 L 2832 1680 Q 2832 1672 2824 1672 L 2688 1672"/><path class="wire" d="M 4288 2342 L 4128 2342 Q 4120 2342 4120 2334 L 4120 2220 Q 4120 2212 4112 2212 L 3472 2212 Q 3464 2212 3464 2204 L 3464 1812 Q 3464 1804 3456 1804 L 2840 1804 Q 2832 1804 2832 1796 L 2832 1680 Q 2832 1672 2824 1672 L 2688 1672" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 2342 L 4128 2342 Q 4120 2342 4120 2334 L 4120 2220 Q 4120 2212 4112 2212 L 3472 2212 Q 3464 2212 3464 2204 L 3464 1812 Q 3464 1804 3456 1804 L 2840 1804 Q 2832 1804 2832 1796 L 2832 1680 Q 2832 1672 2824 1672 L 2688 1672"/></g><g id="fk-60-0" class="relation" data-source="teacher_absences" data-target="users" data-number="60"><title>FK60: teacher_absences.(requested_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 2482 L 4164 2482 Q 4156 2482 4156 2474 L 4156 2224 Q 4156 2216 4148 2216 L 3484 2216 Q 3476 2216 3476 2208 L 3476 1820 Q 3476 1812 3468 1812 L 2720 1812 Q 2712 1812 2712 1804 L 2712 1692 Q 2712 1684 2704 1684 L 2688 1684"/><path class="wire" d="M 4288 2482 L 4164 2482 Q 4156 2482 4156 2474 L 4156 2224 Q 4156 2216 4148 2216 L 3484 2216 Q 3476 2216 3476 2208 L 3476 1820 Q 3476 1812 3468 1812 L 2720 1812 Q 2712 1812 2712 1804 L 2712 1692 Q 2712 1684 2704 1684 L 2688 1684" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 2482 L 4164 2482 Q 4156 2482 4156 2474 L 4156 2224 Q 4156 2216 4148 2216 L 3484 2216 Q 3476 2216 3476 2208 L 3476 1820 Q 3476 1812 3468 1812 L 2720 1812 Q 2712 1812 2712 1804 L 2712 1692 Q 2712 1684 2704 1684 L 2688 1684"/></g><g id="fk-61-0" class="relation" data-source="teacher_absences" data-target="users" data-number="61"><title>FK61: teacher_absences.(reviewed_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 2510 L 4176 2510 Q 4168 2510 4168 2502 L 4168 2232 Q 4168 2224 4160 2224 L 3508 2224 Q 3500 2224 3500 2216 L 3500 1824 Q 3500 1816 3492 1816 L 2792 1816 Q 2784 1816 2784 1808 L 2784 1704 Q 2784 1696 2776 1696 L 2688 1696"/><path class="wire" d="M 4288 2510 L 4176 2510 Q 4168 2510 4168 2502 L 4168 2232 Q 4168 2224 4160 2224 L 3508 2224 Q 3500 2224 3500 2216 L 3500 1824 Q 3500 1816 3492 1816 L 2792 1816 Q 2784 1816 2784 1808 L 2784 1704 Q 2784 1696 2776 1696 L 2688 1696" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 2510 L 4176 2510 Q 4168 2510 4168 2502 L 4168 2232 Q 4168 2224 4160 2224 L 3508 2224 Q 3500 2224 3500 2216 L 3500 1824 Q 3500 1816 3492 1816 L 2792 1816 Q 2784 1816 2784 1808 L 2784 1704 Q 2784 1696 2776 1696 L 2688 1696"/></g><g id="fk-62-0" class="relation" data-source="teacher_absence_decisions" data-target="teacher_absences" data-number="62"><title>FK62: teacher_absence_decisions.(absence_id) → teacher_absences.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4800 2854 L 4816 2854 Q 4824 2854 4824 2846 L 4824 2322 Q 4824 2314 4816 2314 L 4800 2314"/><path class="wire" d="M 4800 2854 L 4816 2854 Q 4824 2854 4824 2846 L 4824 2322 Q 4824 2314 4816 2314 L 4800 2314" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4800 2854 L 4816 2854 Q 4824 2854 4824 2846 L 4824 2322 Q 4824 2314 4816 2314 L 4800 2314"/></g><g id="fk-63-0" class="relation" data-source="teacher_absence_decisions" data-target="schedule_rule_slots" data-number="63"><title>FK63: teacher_absence_decisions.(base_rule_slot_id) → schedule_rule_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 2882 L 4152 2882 Q 4144 2882 4144 2874 L 4144 2228 Q 4144 2220 4136 2220 L 3392 2220"/><path class="wire" d="M 4288 2882 L 4152 2882 Q 4144 2882 4144 2874 L 4144 2228 Q 4144 2220 4136 2220 L 3392 2220" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 2882 L 4152 2882 Q 4144 2882 4144 2874 L 4144 2228 Q 4144 2220 4136 2220 L 3392 2220"/></g><g id="fk-64-0" class="relation" data-source="teacher_absence_decisions" data-target="schedule_overrides" data-number="64"><title>FK64: teacher_absence_decisions.(schedule_override_id) → schedule_overrides.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 4800 2994 L 4828 2994 Q 4836 2994 4836 2986 L 4836 1800 Q 4836 1792 4828 1792 L 4800 1792"/><path class="wire" d="M 4800 2994 L 4828 2994 Q 4836 2994 4836 2986 L 4836 1800 Q 4836 1792 4828 1792 L 4800 1792" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4800 2994 L 4828 2994 Q 4836 2994 4836 2986 L 4836 1800 Q 4836 1792 4828 1792 L 4800 1792"/></g><g id="fk-65-0" class="relation" data-source="teacher_absence_decisions" data-target="users" data-number="65"><title>FK65: teacher_absence_decisions.(decided_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 3050 L 3520 3050 Q 3512 3050 3512 3042 L 3512 1832 Q 3512 1824 3504 1824 L 2744 1824 Q 2736 1824 2736 1816 L 2736 1716 Q 2736 1708 2728 1708 L 2688 1708"/><path class="wire" d="M 4288 3050 L 3520 3050 Q 3512 3050 3512 3042 L 3512 1832 Q 3512 1824 3504 1824 L 2744 1824 Q 2736 1824 2736 1816 L 2736 1716 Q 2736 1708 2728 1708 L 2688 1708" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 3050 L 3520 3050 Q 3512 3050 3512 3042 L 3512 1832 Q 3512 1824 3504 1824 L 2744 1824 Q 2736 1824 2736 1816 L 2736 1716 Q 2736 1708 2728 1708 L 2688 1708"/></g><g id="fk-66-0" class="relation" data-source="teacher_preferences" data-target="users" data-number="66"><title>FK66: teacher_preferences.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 258 L 4224 258 Q 4216 258 4216 266 L 4216 1368 Q 4216 1376 4208 1376 L 3508 1376 Q 3500 1376 3500 1384 L 3500 1556 Q 3500 1564 3492 1564 L 2804 1564 Q 2796 1564 2796 1572 L 2796 1712 Q 2796 1720 2788 1720 L 2688 1720"/><path class="wire" d="M 4288 258 L 4224 258 Q 4216 258 4216 266 L 4216 1368 Q 4216 1376 4208 1376 L 3508 1376 Q 3500 1376 3500 1384 L 3500 1556 Q 3500 1564 3492 1564 L 2804 1564 Q 2796 1564 2796 1572 L 2796 1712 Q 2796 1720 2788 1720 L 2688 1720" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 258 L 4224 258 Q 4216 258 4216 266 L 4216 1368 Q 4216 1376 4208 1376 L 3508 1376 Q 3500 1376 3500 1384 L 3500 1556 Q 3500 1564 3492 1564 L 2804 1564 Q 2796 1564 2796 1572 L 2796 1712 Q 2796 1720 2788 1720 L 2688 1720"/></g><g id="fk-67-0" class="relation" data-source="teacher_preferences" data-target="semesters" data-number="67"><title>FK67: teacher_preferences.(semester_id) → semesters.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 286 L 4128 286 Q 4120 286 4120 278 L 4120 136 Q 4120 128 4112 128 L 1360 128 Q 1352 128 1352 136 L 1352 552 Q 1352 560 1344 560 L 1280 560"/><path class="wire" d="M 4288 286 L 4128 286 Q 4120 286 4120 278 L 4120 136 Q 4120 128 4112 128 L 1360 128 Q 1352 128 1352 136 L 1352 552 Q 1352 560 1344 560 L 1280 560" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 286 L 4128 286 Q 4120 286 4120 278 L 4120 136 Q 4120 128 4112 128 L 1360 128 Q 1352 128 1352 136 L 1352 552 Q 1352 560 1344 560 L 1280 560"/></g><g id="fk-68-0" class="relation" data-source="teacher_preferences" data-target="time_slots" data-number="68"><title>FK68: teacher_preferences.(time_slot_id) → time_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 370 L 4176 370 Q 4168 370 4168 378 L 4168 972 Q 4168 980 4160 980 L 2756 980 Q 2748 980 2748 988 L 2748 1396 Q 2748 1404 2740 1404 L 2076 1404 Q 2068 1404 2068 1412 L 2068 1840 Q 2068 1848 2060 1848 L 1984 1848"/><path class="wire" d="M 4288 370 L 4176 370 Q 4168 370 4168 378 L 4168 972 Q 4168 980 4160 980 L 2756 980 Q 2748 980 2748 988 L 2748 1396 Q 2748 1404 2740 1404 L 2076 1404 Q 2068 1404 2068 1412 L 2068 1840 Q 2068 1848 2060 1848 L 1984 1848" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 370 L 4176 370 Q 4168 370 4168 378 L 4168 972 Q 4168 980 4160 980 L 2756 980 Q 2748 980 2748 988 L 2748 1396 Q 2748 1404 2740 1404 L 2076 1404 Q 2068 1404 2068 1412 L 2068 1840 Q 2068 1848 2060 1848 L 1984 1848"/></g><g id="fk-69-0" class="relation" data-source="teacher_preferences" data-target="users" data-number="69"><title>FK69: teacher_preferences.(requested_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 482 L 4200 482 Q 4192 482 4192 490 L 4192 1372 Q 4192 1380 4184 1380 L 3460 1380 Q 3452 1380 3452 1388 L 3452 1564 Q 3452 1572 3444 1572 L 2732 1572 Q 2724 1572 2724 1580 L 2724 1724 Q 2724 1732 2716 1732 L 2688 1732"/><path class="wire" d="M 4288 482 L 4200 482 Q 4192 482 4192 490 L 4192 1372 Q 4192 1380 4184 1380 L 3460 1380 Q 3452 1380 3452 1388 L 3452 1564 Q 3452 1572 3444 1572 L 2732 1572 Q 2724 1572 2724 1580 L 2724 1724 Q 2724 1732 2716 1732 L 2688 1732" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 482 L 4200 482 Q 4192 482 4192 490 L 4192 1372 Q 4192 1380 4184 1380 L 3460 1380 Q 3452 1380 3452 1388 L 3452 1564 Q 3452 1572 3444 1572 L 2732 1572 Q 2724 1572 2724 1580 L 2724 1724 Q 2724 1732 2716 1732 L 2688 1732"/></g><g id="fk-70-0" class="relation" data-source="teacher_preferences" data-target="users" data-number="70"><title>FK70: teacher_preferences.(reviewed_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 510 L 4152 510 Q 4144 510 4144 518 L 4144 976 Q 4144 984 4136 984 L 2780 984 Q 2772 984 2772 992 L 2772 1736 Q 2772 1744 2764 1744 L 2688 1744"/><path class="wire" d="M 4288 510 L 4152 510 Q 4144 510 4144 518 L 4144 976 Q 4144 984 4136 984 L 2780 984 Q 2772 984 2772 992 L 2772 1736 Q 2772 1744 2764 1744 L 2688 1744" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 510 L 4152 510 Q 4144 510 4144 518 L 4144 976 Q 4144 984 4136 984 L 2780 984 Q 2772 984 2772 992 L 2772 1736 Q 2772 1744 2764 1744 L 2688 1744"/></g><g id="fk-71-0" class="relation" data-source="teacher_change_requests" data-target="users" data-number="71"><title>FK71: teacher_change_requests.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 854 L 4212 854 Q 4204 854 4204 862 L 4204 1680 Q 4204 1688 4196 1688 L 3520 1688 Q 3512 1688 3512 1696 L 3512 1814 Q 3512 1822 3504 1822 L 2804 1822 Q 2796 1822 2796 1814 L 2796 1764 Q 2796 1756 2788 1756 L 2688 1756"/><path class="wire" d="M 4288 854 L 4212 854 Q 4204 854 4204 862 L 4204 1680 Q 4204 1688 4196 1688 L 3520 1688 Q 3512 1688 3512 1696 L 3512 1814 Q 3512 1822 3504 1822 L 2804 1822 Q 2796 1822 2796 1814 L 2796 1764 Q 2796 1756 2788 1756 L 2688 1756" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 854 L 4212 854 Q 4204 854 4204 862 L 4204 1680 Q 4204 1688 4196 1688 L 3520 1688 Q 3512 1688 3512 1696 L 3512 1814 Q 3512 1822 3504 1822 L 2804 1822 Q 2796 1822 2796 1814 L 2796 1764 Q 2796 1756 2788 1756 L 2688 1756"/></g><g id="fk-72-0" class="relation" data-source="teacher_change_requests" data-target="schedule_rule_slots" data-number="72"><title>FK72: teacher_change_requests.(base_rule_slot_id) → schedule_rule_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 882 L 4188 882 Q 4180 882 4180 890 L 4180 2224 Q 4180 2232 4172 2232 L 3392 2232"/><path class="wire" d="M 4288 882 L 4188 882 Q 4180 882 4180 890 L 4180 2224 Q 4180 2232 4172 2232 L 3392 2232" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 882 L 4188 882 Q 4180 882 4180 890 L 4180 2224 Q 4180 2232 4172 2232 L 3392 2232"/></g><g id="fk-73-0" class="relation" data-source="teacher_change_requests" data-target="time_slots" data-number="73"><title>FK73: teacher_change_requests.(requested_time_slot_id) → time_slots.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 994 L 4174 994 Q 4168 994 4168 988 L 4168 988 Q 4168 982 4162 982 L 2744 982 Q 2736 982 2736 990 L 2736 1404 Q 2736 1412 2728 1412 L 2064 1412 Q 2056 1412 2056 1420 L 2056 1852 Q 2056 1860 2048 1860 L 1984 1860"/><path class="wire" d="M 4288 994 L 4174 994 Q 4168 994 4168 988 L 4168 988 Q 4168 982 4162 982 L 2744 982 Q 2736 982 2736 990 L 2736 1404 Q 2736 1412 2728 1412 L 2064 1412 Q 2056 1412 2056 1420 L 2056 1852 Q 2056 1860 2048 1860 L 1984 1860" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 994 L 4174 994 Q 4168 994 4168 988 L 4168 988 Q 4168 982 4162 982 L 2744 982 Q 2736 982 2736 990 L 2736 1404 Q 2736 1412 2728 1412 L 2064 1412 Q 2056 1412 2056 1420 L 2056 1852 Q 2056 1860 2048 1860 L 1984 1860"/></g><g id="fk-74-0" class="relation" data-source="teacher_change_requests" data-target="classrooms" data-number="74"><title>FK74: teacher_change_requests.(requested_classroom_id) → classrooms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1022 L 4152 1022 Q 4144 1022 4144 1030 L 4144 1808 Q 4144 1816 4136 1816 L 4096 1816"/><path class="wire" d="M 4288 1022 L 4152 1022 Q 4144 1022 4144 1030 L 4144 1808 Q 4144 1816 4136 1816 L 4096 1816" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1022 L 4152 1022 Q 4144 1022 4144 1030 L 4144 1808 Q 4144 1816 4136 1816 L 4096 1816"/></g><g id="fk-75-0" class="relation" data-source="teacher_change_requests" data-target="users" data-number="75"><title>FK75: teacher_change_requests.(reviewed_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1106 L 4176 1106 Q 4168 1106 4168 1114 L 4168 1684 Q 4168 1692 4160 1692 L 3472 1692 Q 3464 1692 3464 1700 L 3464 1792 Q 3464 1800 3456 1800 L 2864 1800 Q 2856 1800 2856 1792 L 2856 1776 Q 2856 1768 2848 1768 L 2688 1768"/><path class="wire" d="M 4288 1106 L 4176 1106 Q 4168 1106 4168 1114 L 4168 1684 Q 4168 1692 4160 1692 L 3472 1692 Q 3464 1692 3464 1700 L 3464 1792 Q 3464 1800 3456 1800 L 2864 1800 Q 2856 1800 2856 1792 L 2856 1776 Q 2856 1768 2848 1768 L 2688 1768" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1106 L 4176 1106 Q 4168 1106 4168 1114 L 4168 1684 Q 4168 1692 4160 1692 L 3472 1692 Q 3464 1692 3464 1700 L 3464 1792 Q 3464 1800 3456 1800 L 2864 1800 Q 2856 1800 2856 1792 L 2856 1776 Q 2856 1768 2848 1768 L 2688 1768"/></g><g id="fk-76-0" class="relation" data-source="teacher_change_requests" data-target="schedule_overrides" data-number="76"><title>FK76: teacher_change_requests.(applied_override_id) → schedule_overrides.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 4800 1190 L 4816 1190 Q 4824 1190 4824 1198 L 4824 1796 Q 4824 1804 4816 1804 L 4800 1804"/><path class="wire" d="M 4800 1190 L 4816 1190 Q 4824 1190 4824 1198 L 4824 1796 Q 4824 1804 4816 1804 L 4800 1804" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4800 1190 L 4816 1190 Q 4824 1190 4824 1198 L 4824 1796 Q 4824 1804 4816 1804 L 4800 1804"/></g><g id="fk-77-0" class="relation" data-source="teacher_change_request_history" data-target="teacher_change_requests" data-number="77"><title>FK77: teacher_change_request_history.(request_id) → teacher_change_requests.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 4800 1478 L 4828 1478 Q 4836 1478 4836 1470 L 4836 834 Q 4836 826 4828 826 L 4800 826"/><path class="wire" d="M 4800 1478 L 4828 1478 Q 4836 1478 4836 1470 L 4836 834 Q 4836 826 4828 826 L 4800 826" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4800 1478 L 4828 1478 Q 4836 1478 4836 1470 L 4836 834 Q 4836 826 4828 826 L 4800 826"/></g><g id="fk-78-0" class="relation" data-source="teacher_change_request_history" data-target="users" data-number="78"><title>FK78: teacher_change_request_history.(actor_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 4288 1562 L 4128 1562 Q 4120 1562 4120 1570 L 4120 1692 Q 4120 1700 4112 1700 L 3424 1700 Q 3416 1700 3416 1708 L 3416 1786 Q 3416 1794 3408 1794 L 2719 1794 Q 2712 1794 2712 1787 L 2712 1787 Q 2712 1780 2705 1780 L 2688 1780"/><path class="wire" d="M 4288 1562 L 4128 1562 Q 4120 1562 4120 1570 L 4120 1692 Q 4120 1700 4112 1700 L 3424 1700 Q 3416 1700 3416 1708 L 3416 1786 Q 3416 1794 3408 1794 L 2719 1794 Q 2712 1794 2712 1787 L 2712 1787 Q 2712 1780 2705 1780 L 2688 1780" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 4288 1562 L 4128 1562 Q 4120 1562 4120 1570 L 4120 1692 Q 4120 1700 4112 1700 L 3424 1700 Q 3416 1700 3416 1708 L 3416 1786 Q 3416 1794 3408 1794 L 2719 1794 Q 2712 1794 2712 1787 L 2712 1787 Q 2712 1780 2705 1780 L 2688 1780"/></g><g id="fk-79-0" class="relation" data-source="schedule_versions" data-target="semesters" data-number="79"><title>FK79: schedule_versions.(semester_id) → semesters.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 2880 290 L 2720 290 Q 2712 290 2712 298 L 2712 502 Q 2712 510 2704 510 L 2040 510 Q 2032 510 2032 502 L 2032 494 Q 2032 486 2024 486 L 1336 486 Q 1328 486 1328 494 L 1328 564 Q 1328 572 1320 572 L 1280 572"/><path class="wire" d="M 2880 290 L 2720 290 Q 2712 290 2712 298 L 2712 502 Q 2712 510 2704 510 L 2040 510 Q 2032 510 2032 502 L 2032 494 Q 2032 486 2024 486 L 1336 486 Q 1328 486 1328 494 L 1328 564 Q 1328 572 1320 572 L 1280 572" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 290 L 2720 290 Q 2712 290 2712 298 L 2712 502 Q 2712 510 2704 510 L 2040 510 Q 2032 510 2032 502 L 2032 494 Q 2032 486 2024 486 L 1336 486 Q 1328 486 1328 494 L 1328 564 Q 1328 572 1320 572 L 1280 572"/></g><g id="fk-80-0" class="relation" data-source="schedule_versions" data-target="schedule_versions" data-number="80"><title>FK80: schedule_versions.(based_on_version_id) → schedule_versions.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 3392 402 L 3408 402 Q 3416 402 3416 394 L 3416 236 Q 3416 228 3408 228 L 3392 228"/><path class="wire" d="M 3392 402 L 3408 402 Q 3416 402 3416 394 L 3416 236 Q 3416 228 3408 228 L 3392 228" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 402 L 3408 402 Q 3416 402 3416 394 L 3416 236 Q 3416 228 3408 228 L 3392 228"/></g><g id="fk-81-0" class="relation" data-source="schedule_versions" data-target="schedule_versions" data-number="81"><title>FK81: schedule_versions.(restored_from_version_id) → schedule_versions.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 3392 430 L 3420 430 Q 3428 430 3428 422 L 3428 248 Q 3428 240 3420 240 L 3392 240"/><path class="wire" d="M 3392 430 L 3420 430 Q 3428 430 3428 422 L 3428 248 Q 3428 240 3420 240 L 3392 240" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 430 L 3420 430 Q 3428 430 3428 422 L 3428 248 Q 3428 240 3420 240 L 3392 240"/></g><g id="fk-82-0" class="relation" data-source="schedule_versions" data-target="users" data-number="82"><title>FK82: schedule_versions.(created_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 486 L 2828 486 Q 2820 486 2820 494 L 2820 1784 Q 2820 1792 2812 1792 L 2688 1792"/><path class="wire" d="M 2880 486 L 2828 486 Q 2820 486 2820 494 L 2820 1784 Q 2820 1792 2812 1792 L 2688 1792" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 486 L 2828 486 Q 2820 486 2820 494 L 2820 1784 Q 2820 1792 2812 1792 L 2688 1792"/></g><g id="fk-83-0" class="relation" data-source="schedule_versions" data-target="users" data-number="83"><title>FK83: schedule_versions.(published_by) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 542 L 2816 542 Q 2808 542 2808 550 L 2808 1796 Q 2808 1804 2800 1804 L 2688 1804"/><path class="wire" d="M 2880 542 L 2816 542 Q 2808 542 2808 550 L 2808 1796 Q 2808 1804 2800 1804 L 2688 1804" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 542 L 2816 542 Q 2808 542 2808 550 L 2808 1796 Q 2808 1804 2800 1804 L 2688 1804"/></g><g id="fk-84-0" class="relation" data-source="schedule_rules" data-target="schedule_versions" data-number="84"><title>FK84: schedule_rules.(schedule_version_id, semester_id) → schedule_versions.(id, semester_id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 1474 L 3456 1474 Q 3464 1474 3464 1466 L 3464 260 Q 3464 252 3456 252 L 3392 252"/><path class="wire" d="M 3392 1474 L 3456 1474 Q 3464 1474 3464 1466 L 3464 260 Q 3464 252 3456 252 L 3392 252" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1474 L 3456 1474 Q 3464 1474 3464 1466 L 3464 260 Q 3464 252 3456 252 L 3392 252"/></g><g id="fk-84-1" class="relation" data-source="schedule_rules" data-target="schedule_versions" data-number="84"><title>FK84: schedule_rules.(schedule_version_id, semester_id) → schedule_versions.(id, semester_id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 1250 L 3444 1250 Q 3452 1250 3452 1242 L 3452 298 Q 3452 290 3444 290 L 3392 290"/><path class="wire" d="M 3392 1250 L 3444 1250 Q 3452 1250 3452 1242 L 3452 298 Q 3452 290 3444 290 L 3392 290" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 1250 L 3444 1250 Q 3452 1250 3452 1242 L 3452 298 Q 3452 290 3444 290 L 3392 290"/></g><g id="fk-85-0" class="relation" data-source="schedule_version_history" data-target="schedule_versions" data-number="85"><title>FK85: schedule_version_history.(version_id) → schedule_versions.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 3392 830 L 3432 830 Q 3440 830 3440 822 L 3440 272 Q 3440 264 3432 264 L 3392 264"/><path class="wire" d="M 3392 830 L 3432 830 Q 3440 830 3440 822 L 3440 272 Q 3440 264 3432 264 L 3392 264" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3392 830 L 3432 830 Q 3440 830 3440 822 L 3440 272 Q 3440 264 3432 264 L 3392 264"/></g><g id="fk-86-0" class="relation" data-source="schedule_version_history" data-target="users" data-number="86"><title>FK86: schedule_version_history.(actor_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 2880 886 L 2792 886 Q 2784 886 2784 894 L 2784 1808 Q 2784 1816 2776 1816 L 2688 1816"/><path class="wire" d="M 2880 886 L 2792 886 Q 2784 886 2784 894 L 2784 1808 Q 2784 1816 2776 1816 L 2688 1816" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2880 886 L 2792 886 Q 2784 886 2784 894 L 2784 1808 Q 2784 1816 2776 1816 L 2688 1816"/></g><g id="fk-87-0" class="relation" data-source="study_plans" data-target="specialty_profiles" data-number="87"><title>FK87: study_plans.(specialty_profile_id) → specialty_profiles.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1472 294 L 1336 294 Q 1328 294 1328 302 L 1328 448 Q 1328 456 1320 456 L 644 456 Q 636 456 636 464 L 636 692 Q 636 700 628 700 L 576 700"/><path class="wire" d="M 1472 294 L 1336 294 Q 1328 294 1328 302 L 1328 448 Q 1328 456 1320 456 L 644 456 Q 636 456 636 464 L 636 692 Q 636 700 628 700 L 576 700" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1472 294 L 1336 294 Q 1328 294 1328 302 L 1328 448 Q 1328 456 1320 456 L 644 456 Q 636 456 636 464 L 636 692 Q 636 700 628 700 L 576 700"/></g><g id="fk-88-0" class="relation" data-source="study_plans" data-target="education_forms" data-number="88"><title>FK88: study_plans.(education_form_id) → education_forms.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1472 322 L 1372 322 Q 1364 322 1364 330 L 1364 1216 Q 1364 1224 1356 1224 L 576 1224"/><path class="wire" d="M 1472 322 L 1372 322 Q 1364 322 1364 330 L 1364 1216 Q 1364 1224 1356 1224 L 576 1224" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1472 322 L 1372 322 Q 1364 322 1364 330 L 1364 1216 Q 1364 1224 1356 1224 L 576 1224"/></g><g id="fk-89-0" class="relation" data-source="study_plan_subjects" data-target="study_plans" data-number="89"><title>FK89: study_plan_subjects.(plan_id) → study_plans.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1984 610 L 2000 610 Q 2008 610 2008 602 L 2008 236 Q 2008 228 2000 228 L 1984 228"/><path class="wire" d="M 1984 610 L 2000 610 Q 2008 610 2008 602 L 2008 236 Q 2008 228 2000 228 L 1984 228" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 610 L 2000 610 Q 2008 610 2008 602 L 2008 236 Q 2008 228 2000 228 L 1984 228"/></g><g id="fk-90-0" class="relation" data-source="study_plan_subjects" data-target="subjects" data-number="90"><title>FK90: study_plan_subjects.(subject_id) → subjects.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1984 638 L 2144 638 Q 2152 638 2152 630 L 2152 596 Q 2152 588 2160 588 L 2848 588 Q 2856 588 2856 596 L 2856 624 Q 2856 632 2864 632 L 3552 632 Q 3560 632 3560 624 L 3560 260 Q 3560 252 3568 252 L 3584 252"/><path class="wire" d="M 1984 638 L 2144 638 Q 2152 638 2152 630 L 2152 596 Q 2152 588 2160 588 L 2848 588 Q 2856 588 2856 596 L 2856 624 Q 2856 632 2864 632 L 3552 632 Q 3560 632 3560 624 L 3560 260 Q 3560 252 3568 252 L 3584 252" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 638 L 2144 638 Q 2152 638 2152 630 L 2152 596 Q 2152 588 2160 588 L 2848 588 Q 2856 588 2856 596 L 2856 624 Q 2856 632 2864 632 L 3552 632 Q 3560 632 3560 624 L 3560 260 Q 3560 252 3568 252 L 3584 252"/></g><g id="fk-91-0" class="relation" data-source="study_plan_loads" data-target="study_plan_subjects" data-number="91"><title>FK91: study_plan_loads.(plan_subject_id) → study_plan_subjects.(id) · ON DELETE CASCADE</title><path class="wire-under" d="M 1984 870 L 2000 870 Q 2008 870 2008 862 L 2008 590 Q 2008 582 2000 582 L 1984 582"/><path class="wire" d="M 1984 870 L 2000 870 Q 2008 870 2008 862 L 2008 590 Q 2008 582 2000 582 L 1984 582" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 870 L 2000 870 Q 2008 870 2008 862 L 2008 590 Q 2008 582 2000 582 L 1984 582"/></g><g id="fk-92-0" class="relation" data-source="study_plan_loads" data-target="users" data-number="92"><title>FK92: study_plan_loads.(teacher_id) → users.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1984 982 L 2144 982 Q 2152 982 2152 990 L 2152 1550.86 Q 2152 1558.86 2160 1558.86 L 2176 1558.86"/><path class="wire" d="M 1984 982 L 2144 982 Q 2152 982 2152 990 L 2152 1550.86 Q 2152 1558.86 2160 1558.86 L 2176 1558.86" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 982 L 2144 982 Q 2152 982 2152 990 L 2152 1550.86 Q 2152 1558.86 2160 1558.86 L 2176 1558.86"/></g><g id="fk-93-0" class="relation" data-source="student_group_plan_assignments" data-target="student_groups" data-number="93"><title>FK93: student_group_plan_assignments.(group_id) → student_groups.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1472 1186 L 668 1186 Q 660 1186 660 1194 L 660 1704 Q 660 1712 652 1712 L 576 1712"/><path class="wire" d="M 1472 1186 L 668 1186 Q 660 1186 660 1194 L 660 1704 Q 660 1712 652 1712 L 576 1712" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1472 1186 L 668 1186 Q 660 1186 660 1194 L 660 1704 Q 660 1712 652 1712 L 576 1712"/></g><g id="fk-94-0" class="relation" data-source="student_group_plan_assignments" data-target="semesters" data-number="94"><title>FK94: student_group_plan_assignments.(semester_id) → semesters.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1472 1214 L 1336 1214 Q 1328 1214 1328 1206 L 1328 592 Q 1328 584 1320 584 L 1280 584"/><path class="wire" d="M 1472 1214 L 1336 1214 Q 1328 1214 1328 1206 L 1328 592 Q 1328 584 1320 584 L 1280 584" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1472 1214 L 1336 1214 Q 1328 1214 1328 1206 L 1328 592 Q 1328 584 1320 584 L 1280 584"/></g><g id="fk-95-0" class="relation" data-source="student_group_plan_assignments" data-target="study_plans" data-number="95"><title>FK95: student_group_plan_assignments.(plan_id) → study_plans.(id) · ON DELETE NO ACTION</title><path class="wire-under" d="M 1984 1242 L 2012 1242 Q 2020 1242 2020 1234 L 2020 248 Q 2020 240 2012 240 L 1984 240"/><path class="wire" d="M 1984 1242 L 2012 1242 Q 2020 1242 2020 1234 L 2020 248 Q 2020 240 2012 240 L 1984 240" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 1984 1242 L 2012 1242 Q 2020 1242 2020 1234 L 2020 248 Q 2020 240 2012 240 L 1984 240"/></g><g id="fk-96-0" class="relation" data-source="departments" data-target="users" data-number="96"><title>FK96: departments.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 2688 1286 L 2716 1286 Q 2724 1286 2724 1294 L 2724 1820 Q 2724 1828 2716 1828 L 2688 1828"/><path class="wire" d="M 2688 1286 L 2716 1286 Q 2724 1286 2724 1294 L 2724 1820 Q 2724 1828 2716 1828 L 2688 1828" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 1286 L 2716 1286 Q 2724 1286 2724 1294 L 2724 1820 Q 2724 1828 2716 1828 L 2688 1828"/></g><g id="fk-97-0" class="relation" data-source="specialties" data-target="users" data-number="97"><title>FK97: specialties.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 576 446 L 2132 446 Q 2140 446 2140 454 L 2140 1605.71 Q 2140 1613.71 2148 1613.71 L 2176 1613.71"/><path class="wire" d="M 576 446 L 2132 446 Q 2140 446 2140 454 L 2140 1605.71 Q 2140 1613.71 2148 1613.71 L 2176 1613.71" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 446 L 2132 446 Q 2140 446 2140 454 L 2140 1605.71 Q 2140 1613.71 2148 1613.71 L 2176 1613.71"/></g><g id="fk-98-0" class="relation" data-source="specialty_profiles" data-target="users" data-number="98"><title>FK98: specialty_profiles.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 576 970 L 724 970 Q 732 970 732 978 L 732 1620 Q 732 1628 740 1628 L 1428 1628 Q 1436 1628 1436 1636 L 1436 1660.57 Q 1436 1668.57 1444 1668.57 L 2176 1668.57"/><path class="wire" d="M 576 970 L 724 970 Q 732 970 732 978 L 732 1620 Q 732 1628 740 1628 L 1428 1628 Q 1436 1628 1436 1636 L 1436 1660.57 Q 1436 1668.57 1444 1668.57 L 2176 1668.57" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 970 L 724 970 Q 732 970 732 978 L 732 1620 Q 732 1628 740 1628 L 1428 1628 Q 1436 1628 1436 1636 L 1436 1660.57 Q 1436 1668.57 1444 1668.57 L 2176 1668.57"/></g><g id="fk-99-0" class="relation" data-source="users" data-target="users" data-number="99"><title>FK99: users.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 2688 2238 L 2704 2238 Q 2712 2238 2712 2230 L 2712 1848 Q 2712 1840 2704 1840 L 2688 1840"/><path class="wire" d="M 2688 2238 L 2704 2238 Q 2712 2238 2712 2230 L 2712 1848 Q 2712 1840 2704 1840 L 2688 1840" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 2688 2238 L 2704 2238 Q 2712 2238 2712 2230 L 2712 1848 Q 2712 1840 2704 1840 L 2688 1840"/></g><g id="fk-100-0" class="relation" data-source="education_forms" data-target="users" data-number="100"><title>FK100: education_forms.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 576 1446 L 736 1446 Q 744 1446 744 1454 L 744 1624 Q 744 1632 752 1632 L 1440 1632 Q 1448 1632 1448 1640 L 1448 1715.43 Q 1448 1723.43 1456 1723.43 L 2176 1723.43"/><path class="wire" d="M 576 1446 L 736 1446 Q 744 1446 744 1454 L 744 1624 Q 744 1632 752 1632 L 1440 1632 Q 1448 1632 1448 1640 L 1448 1715.43 Q 1448 1723.43 1456 1723.43 L 2176 1723.43" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 1446 L 736 1446 Q 744 1446 744 1454 L 744 1624 Q 744 1632 752 1632 L 1440 1632 Q 1448 1632 1448 1640 L 1448 1715.43 Q 1448 1723.43 1456 1723.43 L 2176 1723.43"/></g><g id="fk-101-0" class="relation" data-source="student_groups" data-target="users" data-number="101"><title>FK101: student_groups.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 576 2082 L 736 2082 Q 744 2082 744 2074 L 744 1912 Q 744 1904 752 1904 L 1440 1904 Q 1448 1904 1448 1896 L 1448 1740 Q 1448 1732 1456 1732 L 2144 1732 Q 2152 1732 2152 1740 L 2152 1770.29 Q 2152 1778.29 2160 1778.29 L 2176 1778.29"/><path class="wire" d="M 576 2082 L 736 2082 Q 744 2082 744 2074 L 744 1912 Q 744 1904 752 1904 L 1440 1904 Q 1448 1904 1448 1896 L 1448 1740 Q 1448 1732 1456 1732 L 2144 1732 Q 2152 1732 2152 1740 L 2152 1770.29 Q 2152 1778.29 2160 1778.29 L 2176 1778.29" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 2082 L 736 2082 Q 744 2082 744 2074 L 744 1912 Q 744 1904 752 1904 L 1440 1904 Q 1448 1904 1448 1896 L 1448 1740 Q 1448 1732 1456 1732 L 2144 1732 Q 2152 1732 2152 1740 L 2152 1770.29 Q 2152 1778.29 2160 1778.29 L 2176 1778.29"/></g><g id="fk-102-0" class="relation" data-source="subgroups" data-target="users" data-number="102"><title>FK102: subgroups.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 576 2538 L 2144 2538 Q 2152 2538 2152 2530 L 2152 1841.14 Q 2152 1833.14 2160 1833.14 L 2176 1833.14"/><path class="wire" d="M 576 2538 L 2144 2538 Q 2152 2538 2152 2530 L 2152 1841.14 Q 2152 1833.14 2160 1833.14 L 2176 1833.14" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 576 2538 L 2144 2538 Q 2152 2538 2152 2530 L 2152 1841.14 Q 2152 1833.14 2160 1833.14 L 2176 1833.14"/></g><g id="fk-103-0" class="relation" data-source="subjects" data-target="users" data-number="103"><title>FK103: subjects.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 3584 530 L 3496 530 Q 3488 530 3488 538 L 3488 1844 Q 3488 1852 3480 1852 L 2688 1852"/><path class="wire" d="M 3584 530 L 3496 530 Q 3488 530 3488 538 L 3488 1844 Q 3488 1852 3480 1852 L 2688 1852" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 530 L 3496 530 Q 3488 530 3488 538 L 3488 1844 Q 3488 1852 3480 1852 L 2688 1852"/></g><g id="fk-104-0" class="relation" data-source="equipments" data-target="users" data-number="104"><title>FK104: equipments.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 3584 2606 L 3460 2606 Q 3452 2606 3452 2598 L 3452 1872 Q 3452 1864 3444 1864 L 2688 1864"/><path class="wire" d="M 3584 2606 L 3460 2606 Q 3452 2606 3452 2598 L 3452 1872 Q 3452 1864 3444 1864 L 2688 1864" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 2606 L 3460 2606 Q 3452 2606 3452 2598 L 3452 1872 Q 3452 1864 3444 1864 L 2688 1864"/></g><g id="fk-105-0" class="relation" data-source="classrooms" data-target="users" data-number="105"><title>FK105: classrooms.(archived_by) → users.(id) · ON DELETE SET NULL</title><path class="wire-under" d="M 3584 2150 L 3424 2150 Q 3416 2150 3416 2142 L 3416 2032 Q 3416 2024 3408 2024 L 2732 2024 Q 2724 2024 2724 2016 L 2724 1884 Q 2724 1876 2716 1876 L 2688 1876"/><path class="wire" d="M 3584 2150 L 3424 2150 Q 3416 2150 3416 2142 L 3416 2032 Q 3416 2024 3408 2024 L 2732 2024 Q 2724 2024 2724 2016 L 2724 1884 Q 2724 1876 2716 1876 L 2688 1876" marker-end="url(#fk-arrow)"/><path class="wire-hit" d="M 3584 2150 L 3424 2150 Q 3416 2150 3416 2142 L 3416 2032 Q 3416 2024 3408 2024 L 2732 2024 Q 2724 2024 2724 2016 L 2724 1884 Q 2724 1876 2716 1876 L 2688 1876"/></g></g><g id="tables"><g class="entity" id="table-departments" data-table="departments" tabindex="0" role="button" aria-label="departments: Кафедры"><title>departments: Кафедры
|
||
9 столбцов · 1 исходящих и 5 входящих FK</title><rect class="table-box" x="2176" y="980" width="512" height="348" rx="6"/><path d="M 2182 980 H 2682 Q 2688 980 2688 986 V 1044 H 2176 V 986 Q 2176 980 2182 980 Z" fill="#e8edf3"/><text x="2192" y="1006" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">departments</text><text x="2192" y="1028" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Кафедры</text><g data-column="id" data-row-top="1044" data-row-height="60"><title>id BIGSERIAL UNIQUE PRIMARY KEY NOT NULL</title><rect x="2177" y="1044" width="510" height="60" fill="#eef2f7"/><text x="2188" y="1078.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·UQ</text><text x="2258" y="1078.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="1078.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="1078.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1104" data-row-height="28"><title>name VARCHAR(255) NOT NULL</title><rect x="2177" y="1104" width="510" height="28" fill="#f8fafc"/><text x="2258" y="1122.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="2644" y="1122.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="1122.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="code" data-row-top="1132" data-row-height="28"><title>code BIGINT UNIQUE NOT NULL</title><rect x="2177" y="1132" width="510" height="28" fill="#eef2f7"/><text x="2188" y="1150.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="2258" y="1150.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">code</text><text x="2644" y="1150.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="1150.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="1160" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="2177" y="1160" width="510" height="28" fill="#f8fafc"/><text x="2258" y="1178.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="2644" y="1178.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="2670" y="1178.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="1188" data-row-height="28"><title>active_from DATE</title><rect x="2177" y="1188" width="510" height="28" fill="#eef2f7"/><text x="2258" y="1206.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="2644" y="1206.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="1206.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="1216" data-row-height="28"><title>active_to DATE</title><rect x="2177" y="1216" width="510" height="28" fill="#f8fafc"/><text x="2258" y="1234.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="2644" y="1234.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="1234.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="1244" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="2177" y="1244" width="510" height="28" fill="#eef2f7"/><text x="2258" y="1262.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="2644" y="1262.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="1262.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="1272" data-row-height="28"><title>archived_by BIGINT</title><rect x="2177" y="1272" width="510" height="28" fill="#f8fafc"/><text x="2188" y="1290.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK96</text><text x="2258" y="1290.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="2644" y="1290.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="1290.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="1300" data-row-height="28"><title>archive_reason TEXT</title><rect x="2177" y="1300" width="510" height="28" fill="#eef2f7"/><text x="2258" y="1318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="2644" y="1318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="2670" y="1318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-specialties" data-table="specialties" tabindex="0" role="button" aria-label="specialties: Направления подготовки"><title>specialties: Направления подготовки
|
||
9 столбцов · 1 исходящих и 3 входящих FK</title><rect class="table-box" x="64" y="152" width="512" height="336" rx="6"/><path d="M 70 152 H 570 Q 576 152 576 158 V 216 H 64 V 158 Q 64 152 70 152 Z" fill="#e8edf3"/><text x="80" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">specialties</text><text x="80" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Направления подготовки</text><g data-column="id" data-row-top="216" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="65" y="216" width="510" height="48" fill="#eef2f7"/><text x="76" y="244.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="146" y="244.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="532" y="244.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="558" y="244.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="264" data-row-height="28"><title>name VARCHAR(255) NOT NULL</title><rect x="65" y="264" width="510" height="28" fill="#f8fafc"/><text x="146" y="282.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="532" y="282.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="558" y="282.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_code" data-row-top="292" data-row-height="28"><title>specialty_code VARCHAR(255) UNIQUE NOT NULL</title><rect x="65" y="292" width="510" height="28" fill="#eef2f7"/><text x="76" y="310.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="146" y="310.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_code</text><text x="532" y="310.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="558" y="310.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="320" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="65" y="320" width="510" height="28" fill="#f8fafc"/><text x="146" y="338.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="532" y="338.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="558" y="338.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="348" data-row-height="28"><title>active_from DATE</title><rect x="65" y="348" width="510" height="28" fill="#eef2f7"/><text x="146" y="366.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="532" y="366.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="366.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="376" data-row-height="28"><title>active_to DATE</title><rect x="65" y="376" width="510" height="28" fill="#f8fafc"/><text x="146" y="394.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="532" y="394.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="394.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="404" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="65" y="404" width="510" height="28" fill="#eef2f7"/><text x="146" y="422.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="532" y="422.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="422.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="432" data-row-height="28"><title>archived_by BIGINT</title><rect x="65" y="432" width="510" height="28" fill="#f8fafc"/><text x="76" y="450.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK97</text><text x="146" y="450.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="532" y="450.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="450.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="460" data-row-height="28"><title>archive_reason TEXT</title><rect x="65" y="460" width="510" height="28" fill="#eef2f7"/><text x="146" y="478.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="532" y="478.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="478.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-specialty_profiles" data-table="specialty_profiles" tabindex="0" role="button" aria-label="specialty_profiles: Профили подготовки"><title>specialty_profiles: Профили подготовки
|
||
11 столбцов · 2 исходящих и 3 входящих FK</title><rect class="table-box" x="64" y="600" width="512" height="412" rx="6"/><path d="M 70 600 H 570 Q 576 600 576 606 V 664 H 64 V 606 Q 64 600 70 600 Z" fill="#e8edf3"/><text x="80" y="626" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">specialty_profiles</text><text x="80" y="648" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Профили подготовки</text><g data-column="id" data-row-top="664" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="65" y="664" width="510" height="48" fill="#eef2f7"/><text x="76" y="692.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="146" y="692.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="532" y="692.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="558" y="692.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_id" data-row-top="712" data-row-height="48"><title>specialty_id BIGINT NOT NULL REFERENCES specialties(id) ON DELETE CASCADE</title><rect x="65" y="712" width="510" height="48" fill="#f8fafc"/><text x="76" y="740.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK01</text><text x="146" y="740.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_id</text><text x="532" y="740.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="740.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="760" data-row-height="28"><title>name VARCHAR(500) NOT NULL</title><rect x="65" y="760" width="510" height="28" fill="#eef2f7"/><text x="146" y="778.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="532" y="778.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(500)</text><text x="558" y="778.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="description" data-row-top="788" data-row-height="28"><title>description TEXT</title><rect x="65" y="788" width="510" height="28" fill="#f8fafc"/><text x="146" y="806.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="532" y="806.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="806.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="816" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="65" y="816" width="510" height="28" fill="#eef2f7"/><text x="146" y="834.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="532" y="834.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="834.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="844" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="65" y="844" width="510" height="28" fill="#f8fafc"/><text x="146" y="862.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="532" y="862.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="558" y="862.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="872" data-row-height="28"><title>active_from DATE</title><rect x="65" y="872" width="510" height="28" fill="#eef2f7"/><text x="146" y="890.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="532" y="890.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="890.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="900" data-row-height="28"><title>active_to DATE</title><rect x="65" y="900" width="510" height="28" fill="#f8fafc"/><text x="146" y="918.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="532" y="918.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="918.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="928" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="65" y="928" width="510" height="28" fill="#eef2f7"/><text x="146" y="946.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="532" y="946.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="946.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="956" data-row-height="28"><title>archived_by BIGINT</title><rect x="65" y="956" width="510" height="28" fill="#f8fafc"/><text x="76" y="974.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK98</text><text x="146" y="974.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="532" y="974.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="974.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="984" data-row-height="28"><title>archive_reason TEXT</title><rect x="65" y="984" width="510" height="28" fill="#eef2f7"/><text x="146" y="1002.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="532" y="1002.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="1002.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-users" data-table="users" tabindex="0" role="button" aria-label="users: Пользователи"><title>users: Пользователи
|
||
15 столбцов · 2 исходящих и 37 входящих FK</title><rect class="table-box" x="2176" y="1440" width="512" height="840" rx="6"/><path d="M 2182 1440 H 2682 Q 2688 1440 2688 1446 V 1504 H 2176 V 1446 Q 2176 1440 2182 1440 Z" fill="#eeedff"/><text x="2192" y="1466" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">users</text><text x="2192" y="1488" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Пользователи</text><g data-column="id" data-row-top="1504" data-row-height="384"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="1504" width="510" height="384" fill="#eef2f7"/><text x="2188" y="1700.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="1700.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="1700.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="1700.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="username" data-row-top="1888" data-row-height="28"><title>username VARCHAR(50) UNIQUE NOT NULL</title><rect x="2177" y="1888" width="510" height="28" fill="#f8fafc"/><text x="2188" y="1906.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="2258" y="1906.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">username</text><text x="2644" y="1906.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="2670" y="1906.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="password" data-row-top="1916" data-row-height="28"><title>password VARCHAR(255) NOT NULL</title><rect x="2177" y="1916" width="510" height="28" fill="#eef2f7"/><text x="2258" y="1934.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">password</text><text x="2644" y="1934.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="1934.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="role" data-row-top="1944" data-row-height="28"><title>role VARCHAR(30) NOT NULL DEFAULT 'STUDENT'</title><rect x="2177" y="1944" width="510" height="28" fill="#f8fafc"/><text x="2258" y="1962.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">role</text><text x="2644" y="1962.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="2670" y="1962.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="full_name" data-row-top="1972" data-row-height="28"><title>full_name VARCHAR(255) NOT NULL</title><rect x="2177" y="1972" width="510" height="28" fill="#eef2f7"/><text x="2258" y="1990.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">full_name</text><text x="2644" y="1990.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="1990.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="job_title" data-row-top="2000" data-row-height="28"><title>job_title VARCHAR(255) NOT NULL</title><rect x="2177" y="2000" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2018.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">job_title</text><text x="2644" y="2018.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="2018.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="department_id" data-row-top="2028" data-row-height="28"><title>department_id BIGINT NOT NULL REFERENCES departments(id)</title><rect x="2177" y="2028" width="510" height="28" fill="#eef2f7"/><text x="2188" y="2046.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK02</text><text x="2258" y="2046.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">department_id</text><text x="2644" y="2046.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="2046.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="2056" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="2056" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2074.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="2644" y="2074.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2074.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="updated_at" data-row-top="2084" data-row-height="28"><title>updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="2084" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2102.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="2644" y="2102.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2102.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="2112" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="2177" y="2112" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2130.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="2644" y="2130.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="2670" y="2130.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="2140" data-row-height="28"><title>active_from DATE</title><rect x="2177" y="2140" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2158.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="2644" y="2158.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="2158.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="2168" data-row-height="28"><title>active_to DATE</title><rect x="2177" y="2168" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2186.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="2644" y="2186.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="2186.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="2196" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="2177" y="2196" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2214.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="2644" y="2214.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2214.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="2224" data-row-height="28"><title>archived_by BIGINT</title><rect x="2177" y="2224" width="510" height="28" fill="#f8fafc"/><text x="2188" y="2242.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK99</text><text x="2258" y="2242.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="2644" y="2242.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="2242.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="2252" data-row-height="28"><title>archive_reason TEXT</title><rect x="2177" y="2252" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2270.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="2644" y="2270.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="2670" y="2270.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-auth_refresh_tokens" data-table="auth_refresh_tokens" tabindex="0" role="button" aria-label="auth_refresh_tokens: Refresh-токены"><title>auth_refresh_tokens: Refresh-токены
|
||
10 столбцов · 1 исходящих и 0 входящих FK</title><rect class="table-box" x="2176" y="2392" width="512" height="344" rx="6"/><path d="M 2182 2392 H 2682 Q 2688 2392 2688 2398 V 2456 H 2176 V 2398 Q 2176 2392 2182 2392 Z" fill="#e8edf3"/><text x="2192" y="2418" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">auth_refresh_tokens</text><text x="2192" y="2440" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Refresh-токены</text><g data-column="id" data-row-top="2456" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="2456" width="510" height="28" fill="#eef2f7"/><text x="2188" y="2474.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="2474.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="2474.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="2474.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="user_id" data-row-top="2484" data-row-height="28"><title>user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE</title><rect x="2177" y="2484" width="510" height="28" fill="#f8fafc"/><text x="2188" y="2502.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK03</text><text x="2258" y="2502.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">user_id</text><text x="2644" y="2502.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="2502.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="tenant" data-row-top="2512" data-row-height="28"><title>tenant VARCHAR(100) NOT NULL</title><rect x="2177" y="2512" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2530.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">tenant</text><text x="2644" y="2530.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="2670" y="2530.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="token_hash" data-row-top="2540" data-row-height="28"><title>token_hash VARCHAR(64) UNIQUE NOT NULL</title><rect x="2177" y="2540" width="510" height="28" fill="#f8fafc"/><text x="2188" y="2558.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="2258" y="2558.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">token_hash</text><text x="2644" y="2558.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(64)</text><text x="2670" y="2558.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="issued_at" data-row-top="2568" data-row-height="28"><title>issued_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="2568" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2586.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">issued_at</text><text x="2644" y="2586.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2586.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="expires_at" data-row-top="2596" data-row-height="28"><title>expires_at TIMESTAMPTZ NOT NULL</title><rect x="2177" y="2596" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2614.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">expires_at</text><text x="2644" y="2614.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2614.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="revoked_at" data-row-top="2624" data-row-height="28"><title>revoked_at TIMESTAMPTZ</title><rect x="2177" y="2624" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2642.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">revoked_at</text><text x="2644" y="2642.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="2642.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="rotated_to_token_hash" data-row-top="2652" data-row-height="28"><title>rotated_to_token_hash VARCHAR(64)</title><rect x="2177" y="2652" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2670.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">rotated_to_token_hash</text><text x="2644" y="2670.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(64)</text><text x="2670" y="2670.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="user_agent" data-row-top="2680" data-row-height="28"><title>user_agent VARCHAR(512)</title><rect x="2177" y="2680" width="510" height="28" fill="#eef2f7"/><text x="2258" y="2698.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">user_agent</text><text x="2644" y="2698.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(512)</text><text x="2670" y="2698.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="ip_address" data-row-top="2708" data-row-height="28"><title>ip_address VARCHAR(64)</title><rect x="2177" y="2708" width="510" height="28" fill="#f8fafc"/><text x="2258" y="2726.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">ip_address</text><text x="2644" y="2726.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(64)</text><text x="2670" y="2726.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-auth_login_rate_limits" data-table="auth_login_rate_limits" tabindex="0" role="button" aria-label="auth_login_rate_limits: Ограничение попыток входа"><title>auth_login_rate_limits: Ограничение попыток входа
|
||
10 столбцов · 0 исходящих и 0 входящих FK</title><rect class="table-box" x="2176" y="152" width="512" height="344" rx="6"/><path d="M 2182 152 H 2682 Q 2688 152 2688 158 V 216 H 2176 V 158 Q 2176 152 2182 152 Z" fill="#e8edf3"/><text x="2192" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">auth_login_rate_limits</text><text x="2192" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Ограничение попыток входа</text><g data-column="id" data-row-top="216" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="216" width="510" height="28" fill="#eef2f7"/><text x="2188" y="234.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="234.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="234.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="234.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="tenant" data-row-top="244" data-row-height="28"><title>tenant VARCHAR(100) NOT NULL</title><rect x="2177" y="244" width="510" height="28" fill="#f8fafc"/><text x="2258" y="262.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">tenant</text><text x="2644" y="262.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="2670" y="262.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="username_normalized" data-row-top="272" data-row-height="28"><title>username_normalized VARCHAR(100) NOT NULL</title><rect x="2177" y="272" width="510" height="28" fill="#eef2f7"/><text x="2258" y="290.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">username_normalized</text><text x="2644" y="290.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="2670" y="290.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="client_ip" data-row-top="300" data-row-height="28"><title>client_ip VARCHAR(64) NOT NULL</title><rect x="2177" y="300" width="510" height="28" fill="#f8fafc"/><text x="2258" y="318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">client_ip</text><text x="2644" y="318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(64)</text><text x="2670" y="318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="failure_count" data-row-top="328" data-row-height="28"><title>failure_count INTEGER NOT NULL DEFAULT 0</title><rect x="2177" y="328" width="510" height="28" fill="#eef2f7"/><text x="2258" y="346.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">failure_count</text><text x="2644" y="346.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">integer</text><text x="2670" y="346.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="window_started_at" data-row-top="356" data-row-height="28"><title>window_started_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="356" width="510" height="28" fill="#f8fafc"/><text x="2258" y="374.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">window_started_at</text><text x="2644" y="374.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="374.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="last_failure_at" data-row-top="384" data-row-height="28"><title>last_failure_at TIMESTAMPTZ</title><rect x="2177" y="384" width="510" height="28" fill="#eef2f7"/><text x="2258" y="402.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">last_failure_at</text><text x="2644" y="402.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="402.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="blocked_until" data-row-top="412" data-row-height="28"><title>blocked_until TIMESTAMPTZ</title><rect x="2177" y="412" width="510" height="28" fill="#f8fafc"/><text x="2258" y="430.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">blocked_until</text><text x="2644" y="430.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="430.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="440" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="440" width="510" height="28" fill="#eef2f7"/><text x="2258" y="458.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="2644" y="458.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="458.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="updated_at" data-row-top="468" data-row-height="28"><title>updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="468" width="510" height="28" fill="#f8fafc"/><text x="2258" y="486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="2644" y="486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-auth_login_attempt_audit" data-table="auth_login_attempt_audit" tabindex="0" role="button" aria-label="auth_login_attempt_audit: Аудит неудачных входов"><title>auth_login_attempt_audit: Аудит неудачных входов
|
||
7 столбцов · 0 исходящих и 0 входящих FK</title><rect class="table-box" x="2176" y="608" width="512" height="260" rx="6"/><path d="M 2182 608 H 2682 Q 2688 608 2688 614 V 672 H 2176 V 614 Q 2176 608 2182 608 Z" fill="#e8edf3"/><text x="2192" y="634" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">auth_login_attempt_audit</text><text x="2192" y="656" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Аудит неудачных входов</text><g data-column="id" data-row-top="672" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="672" width="510" height="28" fill="#eef2f7"/><text x="2188" y="690.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="690.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="690.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="690.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="tenant" data-row-top="700" data-row-height="28"><title>tenant VARCHAR(100) NOT NULL</title><rect x="2177" y="700" width="510" height="28" fill="#f8fafc"/><text x="2258" y="718.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">tenant</text><text x="2644" y="718.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="2670" y="718.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="username_normalized" data-row-top="728" data-row-height="28"><title>username_normalized VARCHAR(100) NOT NULL</title><rect x="2177" y="728" width="510" height="28" fill="#eef2f7"/><text x="2258" y="746.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">username_normalized</text><text x="2644" y="746.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="2670" y="746.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="client_ip" data-row-top="756" data-row-height="28"><title>client_ip VARCHAR(64) NOT NULL</title><rect x="2177" y="756" width="510" height="28" fill="#f8fafc"/><text x="2258" y="774.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">client_ip</text><text x="2644" y="774.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(64)</text><text x="2670" y="774.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="outcome" data-row-top="784" data-row-height="28"><title>outcome VARCHAR(20) NOT NULL</title><rect x="2177" y="784" width="510" height="28" fill="#eef2f7"/><text x="2258" y="802.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">outcome</text><text x="2644" y="802.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="2670" y="802.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="occurred_at" data-row-top="812" data-row-height="28"><title>occurred_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="812" width="510" height="28" fill="#f8fafc"/><text x="2258" y="830.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">occurred_at</text><text x="2644" y="830.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="830.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="retry_after_seconds" data-row-top="840" data-row-height="28"><title>retry_after_seconds INTEGER</title><rect x="2177" y="840" width="510" height="28" fill="#eef2f7"/><text x="2258" y="858.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">retry_after_seconds</text><text x="2644" y="858.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">integer</text><text x="2670" y="858.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-teacher_department_assignments" data-table="teacher_department_assignments" tabindex="0" role="button" aria-label="teacher_department_assignments: История принадлежности к кафедрам"><title>teacher_department_assignments: История принадлежности к кафедрам
|
||
9 столбцов · 3 исходящих и 0 входящих FK</title><rect class="table-box" x="2176" y="2848" width="512" height="316" rx="6"/><path d="M 2182 2848 H 2682 Q 2688 2848 2688 2854 V 2912 H 2176 V 2854 Q 2176 2848 2182 2848 Z" fill="#e8edf3"/><text x="2192" y="2874" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_department_assignments</text><text x="2192" y="2896" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">История принадлежности к кафедрам</text><g data-column="id" data-row-top="2912" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="2912" width="510" height="28" fill="#eef2f7"/><text x="2188" y="2930.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="2930.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="2930.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="2930.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="2940" data-row-height="28"><title>teacher_id BIGINT NOT NULL REFERENCES users(id)</title><rect x="2177" y="2940" width="510" height="28" fill="#f8fafc"/><text x="2188" y="2958.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK04</text><text x="2258" y="2958.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="2644" y="2958.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="2958.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="department_id" data-row-top="2968" data-row-height="28"><title>department_id BIGINT NOT NULL REFERENCES departments(id)</title><rect x="2177" y="2968" width="510" height="28" fill="#eef2f7"/><text x="2188" y="2986.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK05</text><text x="2258" y="2986.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">department_id</text><text x="2644" y="2986.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="2986.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="valid_from" data-row-top="2996" data-row-height="28"><title>valid_from DATE NOT NULL</title><rect x="2177" y="2996" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3014.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">valid_from</text><text x="2644" y="3014.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="3014.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="valid_to" data-row-top="3024" data-row-height="28"><title>valid_to DATE</title><rect x="2177" y="3024" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3042.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">valid_to</text><text x="2644" y="3042.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="2670" y="3042.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="is_primary" data-row-top="3052" data-row-height="28"><title>is_primary BOOLEAN NOT NULL DEFAULT TRUE</title><rect x="2177" y="3052" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3070.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">is_primary</text><text x="2644" y="3070.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="2670" y="3070.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="comment" data-row-top="3080" data-row-height="28"><title>comment TEXT</title><rect x="2177" y="3080" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3098.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="2644" y="3098.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="2670" y="3098.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="3108" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="3108" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3126.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="2644" y="3126.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="3126.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_by" data-row-top="3136" data-row-height="28"><title>created_by BIGINT REFERENCES users(id)</title><rect x="2177" y="3136" width="510" height="28" fill="#eef2f7"/><text x="2188" y="3154.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK06</text><text x="2258" y="3154.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_by</text><text x="2644" y="3154.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="3154.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-teacher_creation_requests" data-table="teacher_creation_requests" tabindex="0" role="button" aria-label="teacher_creation_requests: Заявки на создание преподавателя"><title>teacher_creation_requests: Заявки на создание преподавателя
|
||
14 столбцов · 4 исходящих и 0 входящих FK</title><rect class="table-box" x="2176" y="3276" width="512" height="456" rx="6"/><path d="M 2182 3276 H 2682 Q 2688 3276 2688 3282 V 3340 H 2176 V 3282 Q 2176 3276 2182 3276 Z" fill="#e8edf3"/><text x="2192" y="3302" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_creation_requests</text><text x="2192" y="3324" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Заявки на создание преподавателя</text><g data-column="id" data-row-top="3340" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2177" y="3340" width="510" height="28" fill="#eef2f7"/><text x="2188" y="3358.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2258" y="3358.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="2644" y="3358.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="2670" y="3358.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="department_id" data-row-top="3368" data-row-height="28"><title>department_id BIGINT NOT NULL REFERENCES departments(id)</title><rect x="2177" y="3368" width="510" height="28" fill="#f8fafc"/><text x="2188" y="3386.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK07</text><text x="2258" y="3386.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">department_id</text><text x="2644" y="3386.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="3386.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="username" data-row-top="3396" data-row-height="28"><title>username VARCHAR(50) NOT NULL</title><rect x="2177" y="3396" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3414.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">username</text><text x="2644" y="3414.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="2670" y="3414.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="full_name" data-row-top="3424" data-row-height="28"><title>full_name VARCHAR(255) NOT NULL</title><rect x="2177" y="3424" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3442.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">full_name</text><text x="2644" y="3442.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="3442.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="job_title" data-row-top="3452" data-row-height="28"><title>job_title VARCHAR(255) NOT NULL</title><rect x="2177" y="3452" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3470.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">job_title</text><text x="2644" y="3470.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="2670" y="3470.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="comment" data-row-top="3480" data-row-height="28"><title>comment TEXT</title><rect x="2177" y="3480" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3498.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="2644" y="3498.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="2670" y="3498.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="3508" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'PENDING'</title><rect x="2177" y="3508" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3526.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="2644" y="3526.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="2670" y="3526.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="requested_by" data-row-top="3536" data-row-height="28"><title>requested_by BIGINT REFERENCES users(id)</title><rect x="2177" y="3536" width="510" height="28" fill="#f8fafc"/><text x="2188" y="3554.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK08</text><text x="2258" y="3554.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">requested_by</text><text x="2644" y="3554.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="3554.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="3564" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="3564" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3582.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="2644" y="3582.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="3582.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="updated_at" data-row-top="3592" data-row-height="28"><title>updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2177" y="3592" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3610.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="2644" y="3610.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="3610.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="reviewed_by" data-row-top="3620" data-row-height="28"><title>reviewed_by BIGINT REFERENCES users(id)</title><rect x="2177" y="3620" width="510" height="28" fill="#eef2f7"/><text x="2188" y="3638.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK09</text><text x="2258" y="3638.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_by</text><text x="2644" y="3638.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="3638.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_at" data-row-top="3648" data-row-height="28"><title>reviewed_at TIMESTAMPTZ</title><rect x="2177" y="3648" width="510" height="28" fill="#f8fafc"/><text x="2258" y="3666.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_at</text><text x="2644" y="3666.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="2670" y="3666.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="review_comment" data-row-top="3676" data-row-height="28"><title>review_comment TEXT</title><rect x="2177" y="3676" width="510" height="28" fill="#eef2f7"/><text x="2258" y="3694.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">review_comment</text><text x="2644" y="3694.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="2670" y="3694.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_teacher_id" data-row-top="3704" data-row-height="28"><title>created_teacher_id BIGINT REFERENCES users(id)</title><rect x="2177" y="3704" width="510" height="28" fill="#f8fafc"/><text x="2188" y="3722.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK10</text><text x="2258" y="3722.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_teacher_id</text><text x="2644" y="3722.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="2670" y="3722.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-education_forms" data-table="education_forms" tabindex="0" role="button" aria-label="education_forms: Формы обучения"><title>education_forms: Формы обучения
|
||
10 столбцов · 1 исходящих и 3 входящих FK</title><rect class="table-box" x="64" y="1124" width="512" height="364" rx="6"/><path d="M 70 1124 H 570 Q 576 1124 576 1130 V 1188 H 64 V 1130 Q 64 1124 70 1124 Z" fill="#e8edf3"/><text x="80" y="1150" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">education_forms</text><text x="80" y="1172" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Формы обучения</text><g data-column="id" data-row-top="1188" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="65" y="1188" width="510" height="48" fill="#eef2f7"/><text x="76" y="1216.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="146" y="1216.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="532" y="1216.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="558" y="1216.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1236" data-row-height="28"><title>name VARCHAR(100) UNIQUE NOT NULL</title><rect x="65" y="1236" width="510" height="28" fill="#f8fafc"/><text x="76" y="1254.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="146" y="1254.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="532" y="1254.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="558" y="1254.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="description" data-row-top="1264" data-row-height="28"><title>description TEXT</title><rect x="65" y="1264" width="510" height="28" fill="#eef2f7"/><text x="146" y="1282.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="532" y="1282.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="1282.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="1292" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="65" y="1292" width="510" height="28" fill="#f8fafc"/><text x="146" y="1310.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="532" y="1310.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="1310.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="1320" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="65" y="1320" width="510" height="28" fill="#eef2f7"/><text x="146" y="1338.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="532" y="1338.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="558" y="1338.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="1348" data-row-height="28"><title>active_from DATE</title><rect x="65" y="1348" width="510" height="28" fill="#f8fafc"/><text x="146" y="1366.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="532" y="1366.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="1366.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="1376" data-row-height="28"><title>active_to DATE</title><rect x="65" y="1376" width="510" height="28" fill="#eef2f7"/><text x="146" y="1394.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="532" y="1394.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="1394.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="1404" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="65" y="1404" width="510" height="28" fill="#f8fafc"/><text x="146" y="1422.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="532" y="1422.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="1422.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="1432" data-row-height="28"><title>archived_by BIGINT</title><rect x="65" y="1432" width="510" height="28" fill="#eef2f7"/><text x="76" y="1450.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK100</text><text x="146" y="1450.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="532" y="1450.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1450.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="1460" data-row-height="28"><title>archive_reason TEXT</title><rect x="65" y="1460" width="510" height="28" fill="#f8fafc"/><text x="146" y="1478.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="532" y="1478.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="1478.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-student_groups" data-table="student_groups" tabindex="0" role="button" aria-label="student_groups: Студенческие группы"><title>student_groups: Студенческие группы
|
||
15 столбцов · 5 исходящих и 4 входящих FK</title><rect class="table-box" x="64" y="1600" width="512" height="524" rx="6"/><path d="M 70 1600 H 570 Q 576 1600 576 1606 V 1664 H 64 V 1606 Q 64 1600 70 1600 Z" fill="#e8edf3"/><text x="80" y="1626" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">student_groups</text><text x="80" y="1648" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Студенческие группы</text><g data-column="id" data-row-top="1664" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="65" y="1664" width="510" height="60" fill="#eef2f7"/><text x="76" y="1698.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="146" y="1698.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="532" y="1698.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="558" y="1698.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1724" data-row-height="28"><title>name VARCHAR(100) NOT NULL</title><rect x="65" y="1724" width="510" height="28" fill="#f8fafc"/><text x="146" y="1742.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="532" y="1742.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="558" y="1742.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="group_size" data-row-top="1752" data-row-height="28"><title>group_size BIGINT NOT NULL CONSTRAINT chk_student_groups_group_size_positive CHECK (group_size > 0)</title><rect x="65" y="1752" width="510" height="28" fill="#eef2f7"/><text x="146" y="1770.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">group_size</text><text x="532" y="1770.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1770.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="education_form_id" data-row-top="1780" data-row-height="28"><title>education_form_id BIGINT NOT NULL REFERENCES education_forms(id)</title><rect x="65" y="1780" width="510" height="28" fill="#f8fafc"/><text x="76" y="1798.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK11</text><text x="146" y="1798.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">education_form_id</text><text x="532" y="1798.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1798.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="department_id" data-row-top="1808" data-row-height="28"><title>department_id BIGINT NOT NULL REFERENCES departments(id)</title><rect x="65" y="1808" width="510" height="28" fill="#eef2f7"/><text x="76" y="1826.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK12</text><text x="146" y="1826.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">department_id</text><text x="532" y="1826.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1826.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_id" data-row-top="1836" data-row-height="36"><title>specialty_id BIGINT NOT NULL REFERENCES specialties(id)</title><rect x="65" y="1836" width="510" height="36" fill="#f8fafc"/><text x="76" y="1858.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK13·FK14</text><text x="146" y="1858.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_id</text><text x="532" y="1858.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1858.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_profile_id" data-row-top="1872" data-row-height="28"><title>specialty_profile_id BIGINT NOT NULL</title><rect x="65" y="1872" width="510" height="28" fill="#eef2f7"/><text x="76" y="1890.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK14</text><text x="146" y="1890.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_profile_id</text><text x="532" y="1890.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1890.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="year_start_study" data-row-top="1900" data-row-height="28"><title>year_start_study BIGINT NOT NULL CONSTRAINT chk_student_groups_year_start_positive CHECK (year_start_study > 0)</title><rect x="65" y="1900" width="510" height="28" fill="#f8fafc"/><text x="146" y="1918.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">year_start_study</text><text x="532" y="1918.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="1918.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="1928" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="65" y="1928" width="510" height="28" fill="#eef2f7"/><text x="146" y="1946.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="532" y="1946.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="1946.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="1956" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="65" y="1956" width="510" height="28" fill="#f8fafc"/><text x="146" y="1974.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="532" y="1974.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="558" y="1974.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="1984" data-row-height="28"><title>active_from DATE</title><rect x="65" y="1984" width="510" height="28" fill="#eef2f7"/><text x="146" y="2002.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="532" y="2002.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="2002.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="2012" data-row-height="28"><title>active_to DATE</title><rect x="65" y="2012" width="510" height="28" fill="#f8fafc"/><text x="146" y="2030.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="532" y="2030.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="2030.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="2040" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="65" y="2040" width="510" height="28" fill="#eef2f7"/><text x="146" y="2058.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="532" y="2058.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="2058.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="2068" data-row-height="28"><title>archived_by BIGINT</title><rect x="65" y="2068" width="510" height="28" fill="#f8fafc"/><text x="76" y="2086.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK101</text><text x="146" y="2086.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="532" y="2086.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="2086.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="2096" data-row-height="28"><title>archive_reason TEXT</title><rect x="65" y="2096" width="510" height="28" fill="#eef2f7"/><text x="146" y="2114.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="532" y="2114.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="2114.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-subgroups" data-table="subgroups" tabindex="0" role="button" aria-label="subgroups: Подгруппы"><title>subgroups: Подгруппы
|
||
10 столбцов · 2 исходящих и 1 входящих FK</title><rect class="table-box" x="64" y="2236" width="512" height="344" rx="6"/><path d="M 70 2236 H 570 Q 576 2236 576 2242 V 2300 H 64 V 2242 Q 64 2236 70 2236 Z" fill="#e8edf3"/><text x="80" y="2262" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">subgroups</text><text x="80" y="2284" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Подгруппы</text><g data-column="id" data-row-top="2300" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="65" y="2300" width="510" height="28" fill="#eef2f7"/><text x="76" y="2318.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="146" y="2318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="532" y="2318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="558" y="2318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="group_id" data-row-top="2328" data-row-height="28"><title>group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE</title><rect x="65" y="2328" width="510" height="28" fill="#f8fafc"/><text x="76" y="2346.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK15</text><text x="146" y="2346.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">group_id</text><text x="532" y="2346.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="2346.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="2356" data-row-height="28"><title>name VARCHAR(100) NOT NULL</title><rect x="65" y="2356" width="510" height="28" fill="#eef2f7"/><text x="146" y="2374.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="532" y="2374.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(100)</text><text x="558" y="2374.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="student_capacity" data-row-top="2384" data-row-height="28"><title>student_capacity INT NOT NULL CONSTRAINT chk_subgroups_student_capacity_positive CHECK (student_capacity > 0)</title><rect x="65" y="2384" width="510" height="28" fill="#f8fafc"/><text x="146" y="2402.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">student_capacity</text><text x="532" y="2402.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="558" y="2402.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="2412" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="65" y="2412" width="510" height="28" fill="#eef2f7"/><text x="146" y="2430.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="532" y="2430.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="558" y="2430.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="2440" data-row-height="28"><title>active_from DATE</title><rect x="65" y="2440" width="510" height="28" fill="#f8fafc"/><text x="146" y="2458.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="532" y="2458.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="2458.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="2468" data-row-height="28"><title>active_to DATE</title><rect x="65" y="2468" width="510" height="28" fill="#eef2f7"/><text x="146" y="2486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="532" y="2486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="558" y="2486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="2496" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="65" y="2496" width="510" height="28" fill="#f8fafc"/><text x="146" y="2514.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="532" y="2514.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="558" y="2514.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="2524" data-row-height="28"><title>archived_by BIGINT</title><rect x="65" y="2524" width="510" height="28" fill="#eef2f7"/><text x="76" y="2542.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK102</text><text x="146" y="2542.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="532" y="2542.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="558" y="2542.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="2552" data-row-height="28"><title>archive_reason TEXT</title><rect x="65" y="2552" width="510" height="28" fill="#f8fafc"/><text x="146" y="2570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="532" y="2570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="558" y="2570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-subjects" data-table="subjects" tabindex="0" role="button" aria-label="subjects: Дисциплины"><title>subjects: Дисциплины
|
||
12 столбцов · 2 исходящих и 5 входящих FK</title><rect class="table-box" x="3584" y="152" width="512" height="420" rx="6"/><path d="M 3590 152 H 4090 Q 4096 152 4096 158 V 216 H 3584 V 158 Q 3584 152 3590 152 Z" fill="#e8edf3"/><text x="3600" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">subjects</text><text x="3600" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Дисциплины</text><g data-column="id" data-row-top="216" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="216" width="510" height="48" fill="#eef2f7"/><text x="3596" y="244.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="244.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="244.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="244.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="264" data-row-height="28"><title>name VARCHAR(200) NOT NULL</title><rect x="3585" y="264" width="510" height="28" fill="#f8fafc"/><text x="3666" y="282.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="4052" y="282.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(200)</text><text x="4078" y="282.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="code" data-row-top="292" data-row-height="28"><title>code VARCHAR(20)</title><rect x="3585" y="292" width="510" height="28" fill="#eef2f7"/><text x="3666" y="310.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">code</text><text x="4052" y="310.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4078" y="310.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="department_id" data-row-top="320" data-row-height="28"><title>department_id BIGINT NOT NULL REFERENCES departments(id)</title><rect x="3585" y="320" width="510" height="28" fill="#f8fafc"/><text x="3596" y="338.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK16</text><text x="3666" y="338.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">department_id</text><text x="4052" y="338.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="338.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="description" data-row-top="348" data-row-height="28"><title>description TEXT</title><rect x="3585" y="348" width="510" height="28" fill="#eef2f7"/><text x="3666" y="366.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="4052" y="366.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="366.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="376" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="3585" y="376" width="510" height="28" fill="#f8fafc"/><text x="3666" y="394.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4052" y="394.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="394.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="404" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="3585" y="404" width="510" height="28" fill="#eef2f7"/><text x="3666" y="422.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4052" y="422.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4078" y="422.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="432" data-row-height="28"><title>active_from DATE</title><rect x="3585" y="432" width="510" height="28" fill="#f8fafc"/><text x="3666" y="450.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="4052" y="450.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="450.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="460" data-row-height="28"><title>active_to DATE</title><rect x="3585" y="460" width="510" height="28" fill="#eef2f7"/><text x="3666" y="478.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="4052" y="478.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="478.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="488" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="3585" y="488" width="510" height="28" fill="#f8fafc"/><text x="3666" y="506.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="4052" y="506.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="506.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="516" data-row-height="28"><title>archived_by BIGINT</title><rect x="3585" y="516" width="510" height="28" fill="#eef2f7"/><text x="3596" y="534.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK103</text><text x="3666" y="534.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="4052" y="534.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="534.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="544" data-row-height="28"><title>archive_reason TEXT</title><rect x="3585" y="544" width="510" height="28" fill="#f8fafc"/><text x="3666" y="562.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="4052" y="562.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="562.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-subject_comments" data-table="subject_comments" tabindex="0" role="button" aria-label="subject_comments: Комментарии к дисциплинам"><title>subject_comments: Комментарии к дисциплинам
|
||
5 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="3584" y="1400" width="512" height="204" rx="6"/><path d="M 3590 1400 H 4090 Q 4096 1400 4096 1406 V 1464 H 3584 V 1406 Q 3584 1400 3590 1400 Z" fill="#e8edf3"/><text x="3600" y="1426" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">subject_comments</text><text x="3600" y="1448" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Комментарии к дисциплинам</text><g data-column="id" data-row-top="1464" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="1464" width="510" height="28" fill="#eef2f7"/><text x="3596" y="1482.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="1482.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="1482.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="1482.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subject_id" data-row-top="1492" data-row-height="28"><title>subject_id BIGINT NOT NULL REFERENCES subjects(id)</title><rect x="3585" y="1492" width="510" height="28" fill="#f8fafc"/><text x="3596" y="1510.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK17</text><text x="3666" y="1510.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subject_id</text><text x="4052" y="1510.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1510.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="author_id" data-row-top="1520" data-row-height="28"><title>author_id BIGINT REFERENCES users(id)</title><rect x="3585" y="1520" width="510" height="28" fill="#eef2f7"/><text x="3596" y="1538.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK18</text><text x="3666" y="1538.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">author_id</text><text x="4052" y="1538.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1538.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="comment" data-row-top="1548" data-row-height="28"><title>comment TEXT NOT NULL</title><rect x="3585" y="1548" width="510" height="28" fill="#f8fafc"/><text x="3666" y="1566.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="4052" y="1566.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="1566.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="1576" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="3585" y="1576" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1594.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4052" y="1594.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="1594.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-lesson_types" data-table="lesson_types" tabindex="0" role="button" aria-label="lesson_types: Виды занятий"><title>lesson_types: Виды занятий
|
||
5 столбцов · 0 исходящих и 3 входящих FK</title><rect class="table-box" x="3584" y="684" width="512" height="204" rx="6"/><path d="M 3590 684 H 4090 Q 4096 684 4096 690 V 748 H 3584 V 690 Q 3584 684 3590 684 Z" fill="#e8edf3"/><text x="3600" y="710" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">lesson_types</text><text x="3600" y="732" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Виды занятий</text><g data-column="id" data-row-top="748" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="748" width="510" height="28" fill="#eef2f7"/><text x="3596" y="766.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="766.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="766.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="766.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="776" data-row-height="28"><title>name VARCHAR(50) UNIQUE NOT NULL</title><rect x="3585" y="776" width="510" height="28" fill="#f8fafc"/><text x="3596" y="794.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="3666" y="794.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="4052" y="794.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="794.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="code" data-row-top="804" data-row-height="28"><title>code VARCHAR(30) NOT NULL UNIQUE CONSTRAINT chk_lesson_types_code CHECK (code ~ '^[A-Z][A-Z0-9_]*$')</title><rect x="3585" y="804" width="510" height="28" fill="#eef2f7"/><text x="3596" y="822.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="3666" y="822.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">code</text><text x="4052" y="822.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="4078" y="822.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="color_code" data-row-top="832" data-row-height="28"><title>color_code VARCHAR(7) DEFAULT '#3788d8'</title><rect x="3585" y="832" width="510" height="28" fill="#f8fafc"/><text x="3666" y="850.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">color_code</text><text x="4052" y="850.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(7)</text><text x="4078" y="850.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="duration_minutes" data-row-top="860" data-row-height="28"><title>duration_minutes INT DEFAULT 90</title><rect x="3585" y="860" width="510" height="28" fill="#eef2f7"/><text x="3666" y="878.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">duration_minutes</text><text x="4052" y="878.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="878.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-equipments" data-table="equipments" tabindex="0" role="button" aria-label="equipments: Оборудование"><title>equipments: Оборудование
|
||
10 столбцов · 1 исходящих и 1 входящих FK</title><rect class="table-box" x="3584" y="2304" width="512" height="344" rx="6"/><path d="M 3590 2304 H 4090 Q 4096 2304 4096 2310 V 2368 H 3584 V 2310 Q 3584 2304 3590 2304 Z" fill="#e8edf3"/><text x="3600" y="2330" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">equipments</text><text x="3600" y="2352" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Оборудование</text><g data-column="id" data-row-top="2368" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="2368" width="510" height="28" fill="#eef2f7"/><text x="3596" y="2386.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="2386.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="2386.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="2386.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="2396" data-row-height="28"><title>name VARCHAR(50) UNIQUE NOT NULL</title><rect x="3585" y="2396" width="510" height="28" fill="#f8fafc"/><text x="3596" y="2414.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="3666" y="2414.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="4052" y="2414.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="2414.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="description" data-row-top="2424" data-row-height="28"><title>description TEXT</title><rect x="3585" y="2424" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2442.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="4052" y="2442.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="2442.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="inventory_number" data-row-top="2452" data-row-height="28"><title>inventory_number VARCHAR(50)</title><rect x="3585" y="2452" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2470.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">inventory_number</text><text x="4052" y="2470.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="2470.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="2480" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="3585" y="2480" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2498.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4052" y="2498.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4078" y="2498.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="2508" data-row-height="28"><title>active_from DATE</title><rect x="3585" y="2508" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2526.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="4052" y="2526.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="2526.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="2536" data-row-height="28"><title>active_to DATE</title><rect x="3585" y="2536" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2554.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="4052" y="2554.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="2554.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="2564" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="3585" y="2564" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2582.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="4052" y="2582.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="2582.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="2592" data-row-height="28"><title>archived_by BIGINT</title><rect x="3585" y="2592" width="510" height="28" fill="#eef2f7"/><text x="3596" y="2610.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK104</text><text x="3666" y="2610.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="4052" y="2610.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="2610.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="2620" data-row-height="28"><title>archive_reason TEXT</title><rect x="3585" y="2620" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2638.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="4052" y="2638.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="2638.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-classrooms" data-table="classrooms" tabindex="0" role="button" aria-label="classrooms: Аудитории"><title>classrooms: Аудитории
|
||
14 столбцов · 1 исходящих и 4 входящих FK</title><rect class="table-box" x="3584" y="1716" width="512" height="476" rx="6"/><path d="M 3590 1716 H 4090 Q 4096 1716 4096 1722 V 1780 H 3584 V 1722 Q 3584 1716 3590 1716 Z" fill="#e8edf3"/><text x="3600" y="1742" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">classrooms</text><text x="3600" y="1764" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Аудитории</text><g data-column="id" data-row-top="1780" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="1780" width="510" height="48" fill="#eef2f7"/><text x="3596" y="1808.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="1808.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="1808.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="1808.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1828" data-row-height="28"><title>name VARCHAR(50) UNIQUE NOT NULL</title><rect x="3585" y="1828" width="510" height="28" fill="#f8fafc"/><text x="3596" y="1846.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="3666" y="1846.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="4052" y="1846.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="1846.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="capacity" data-row-top="1856" data-row-height="28"><title>capacity INT NOT NULL CHECK (capacity > 0)</title><rect x="3585" y="1856" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1874.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">capacity</text><text x="4052" y="1874.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="1874.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="building" data-row-top="1884" data-row-height="28"><title>building VARCHAR(50)</title><rect x="3585" y="1884" width="510" height="28" fill="#f8fafc"/><text x="3666" y="1902.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">building</text><text x="4052" y="1902.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="1902.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="floor" data-row-top="1912" data-row-height="28"><title>floor INT</title><rect x="3585" y="1912" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1930.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">floor</text><text x="4052" y="1930.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="1930.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="is_available" data-row-top="1940" data-row-height="28"><title>is_available BOOLEAN DEFAULT TRUE</title><rect x="3585" y="1940" width="510" height="28" fill="#f8fafc"/><text x="3666" y="1958.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">is_available</text><text x="4052" y="1958.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="4078" y="1958.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="description" data-row-top="1968" data-row-height="28"><title>description TEXT</title><rect x="3585" y="1968" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1986.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="4052" y="1986.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="1986.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="1996" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="3585" y="1996" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2014.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4052" y="2014.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="2014.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="2024" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="3585" y="2024" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2042.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4052" y="2042.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4078" y="2042.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="active_from" data-row-top="2052" data-row-height="28"><title>active_from DATE</title><rect x="3585" y="2052" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2070.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_from</text><text x="4052" y="2070.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="2070.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="active_to" data-row-top="2080" data-row-height="28"><title>active_to DATE</title><rect x="3585" y="2080" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2098.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">active_to</text><text x="4052" y="2098.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4078" y="2098.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="2108" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="3585" y="2108" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2126.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="4052" y="2126.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4078" y="2126.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_by" data-row-top="2136" data-row-height="28"><title>archived_by BIGINT</title><rect x="3585" y="2136" width="510" height="28" fill="#eef2f7"/><text x="3596" y="2154.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK105</text><text x="3666" y="2154.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_by</text><text x="4052" y="2154.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="2154.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archive_reason" data-row-top="2164" data-row-height="28"><title>archive_reason TEXT</title><rect x="3585" y="2164" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2182.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archive_reason</text><text x="4052" y="2182.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="2182.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-classroom_equipments" data-table="classroom_equipments" tabindex="0" role="button" aria-label="classroom_equipments: Оснащение аудиторий"><title>classroom_equipments: Оснащение аудиторий
|
||
4 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="3584" y="2760" width="512" height="176" rx="6"/><path d="M 3590 2760 H 4090 Q 4096 2760 4096 2766 V 2824 H 3584 V 2766 Q 3584 2760 3590 2760 Z" fill="#e8edf3"/><text x="3600" y="2786" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">classroom_equipments</text><text x="3600" y="2808" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Оснащение аудиторий</text><g data-column="classroom_id" data-row-top="2824" data-row-height="28"><title>classroom_id BIGINT NOT NULL REFERENCES classrooms(id) ON DELETE CASCADE</title><rect x="3585" y="2824" width="510" height="28" fill="#eef2f7"/><text x="3596" y="2842.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK19</text><text x="3666" y="2842.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">classroom_id</text><text x="4052" y="2842.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="2842.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="equipment_id" data-row-top="2852" data-row-height="28"><title>equipment_id BIGINT NOT NULL REFERENCES equipments(id) ON DELETE CASCADE</title><rect x="3585" y="2852" width="510" height="28" fill="#f8fafc"/><text x="3596" y="2870.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK20</text><text x="3666" y="2870.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">equipment_id</text><text x="4052" y="2870.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="2870.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="quantity" data-row-top="2880" data-row-height="28"><title>quantity INT NOT NULL DEFAULT 1 CHECK (quantity > 0)</title><rect x="3585" y="2880" width="510" height="28" fill="#eef2f7"/><text x="3666" y="2898.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">quantity</text><text x="4052" y="2898.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="2898.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="notes" data-row-top="2908" data-row-height="28"><title>notes TEXT</title><rect x="3585" y="2908" width="510" height="28" fill="#f8fafc"/><text x="3666" y="2926.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">notes</text><text x="4052" y="2926.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4078" y="2926.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-teacher_subjects" data-table="teacher_subjects" tabindex="0" role="button" aria-label="teacher_subjects: Закрепление дисциплин за преподавателями"><title>teacher_subjects: Закрепление дисциплин за преподавателями
|
||
8 столбцов · 4 исходящих и 0 входящих FK</title><rect class="table-box" x="3584" y="1000" width="512" height="288" rx="6"/><path d="M 3590 1000 H 4090 Q 4096 1000 4096 1006 V 1064 H 3584 V 1006 Q 3584 1000 3590 1000 Z" fill="#e8edf3"/><text x="3600" y="1026" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_subjects</text><text x="3600" y="1048" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Закрепление дисциплин за преподавателями</text><g data-column="id" data-row-top="1064" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="3585" y="1064" width="510" height="28" fill="#eef2f7"/><text x="3596" y="1082.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="3666" y="1082.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4052" y="1082.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4078" y="1082.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="user_id" data-row-top="1092" data-row-height="28"><title>user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE</title><rect x="3585" y="1092" width="510" height="28" fill="#f8fafc"/><text x="3596" y="1110.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK21</text><text x="3666" y="1110.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">user_id</text><text x="4052" y="1110.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1110.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subject_id" data-row-top="1120" data-row-height="28"><title>subject_id BIGINT NOT NULL REFERENCES subjects(id) ON DELETE CASCADE</title><rect x="3585" y="1120" width="510" height="28" fill="#eef2f7"/><text x="3596" y="1138.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK22</text><text x="3666" y="1138.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subject_id</text><text x="4052" y="1138.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1138.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_year_id" data-row-top="1148" data-row-height="28"><title>academic_year_id BIGINT</title><rect x="3585" y="1148" width="510" height="28" fill="#f8fafc"/><text x="3596" y="1166.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK26</text><text x="3666" y="1166.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_year_id</text><text x="4052" y="1166.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1166.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="semester_number" data-row-top="1176" data-row-height="28"><title>semester_number INT</title><rect x="3585" y="1176" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1194.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_number</text><text x="4052" y="1194.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="1194.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="lesson_type_id" data-row-top="1204" data-row-height="28"><title>lesson_type_id BIGINT NOT NULL REFERENCES lesson_types(id) ON DELETE CASCADE</title><rect x="3585" y="1204" width="510" height="28" fill="#f8fafc"/><text x="3596" y="1222.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK23</text><text x="3666" y="1222.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_type_id</text><text x="4052" y="1222.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4078" y="1222.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="qualification_level" data-row-top="1232" data-row-height="28"><title>qualification_level VARCHAR(50)</title><rect x="3585" y="1232" width="510" height="28" fill="#eef2f7"/><text x="3666" y="1250.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">qualification_level</text><text x="4052" y="1250.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="4078" y="1250.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="experience_years" data-row-top="1260" data-row-height="28"><title>experience_years INT</title><rect x="3585" y="1260" width="510" height="28" fill="#f8fafc"/><text x="3666" y="1278.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">experience_years</text><text x="4052" y="1278.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="4078" y="1278.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-time_slot_scopes" data-table="time_slot_scopes" tabindex="0" role="button" aria-label="time_slot_scopes: Наборы звонков"><title>time_slot_scopes: Наборы звонков
|
||
7 столбцов · 0 исходящих и 2 входящих FK</title><rect class="table-box" x="1472" y="1368" width="512" height="268" rx="6"/><path d="M 1478 1368 H 1978 Q 1984 1368 1984 1374 V 1432 H 1472 V 1374 Q 1472 1368 1478 1368 Z" fill="#e8edf3"/><text x="1488" y="1394" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">time_slot_scopes</text><text x="1488" y="1416" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Наборы звонков</text><g data-column="id" data-row-top="1432" data-row-height="36"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="1432" width="510" height="36" fill="#eef2f7"/><text x="1484" y="1454.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="1454.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="1454.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="1454.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="code" data-row-top="1468" data-row-height="28"><title>code VARCHAR(50) NOT NULL UNIQUE</title><rect x="1473" y="1468" width="510" height="28" fill="#f8fafc"/><text x="1484" y="1486.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="1554" y="1486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">code</text><text x="1940" y="1486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(50)</text><text x="1966" y="1486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1496" data-row-height="28"><title>name VARCHAR(120) NOT NULL</title><rect x="1473" y="1496" width="510" height="28" fill="#eef2f7"/><text x="1554" y="1514.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="1940" y="1514.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(120)</text><text x="1966" y="1514.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="apply_mode" data-row-top="1524" data-row-height="28"><title>apply_mode VARCHAR(20) NOT NULL</title><rect x="1473" y="1524" width="510" height="28" fill="#f8fafc"/><text x="1554" y="1542.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">apply_mode</text><text x="1940" y="1542.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="1966" y="1542.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="day_of_week" data-row-top="1552" data-row-height="28"><title>day_of_week INT NULL</title><rect x="1473" y="1552" width="510" height="28" fill="#eef2f7"/><text x="1554" y="1570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">day_of_week</text><text x="1940" y="1570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="1570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="system_scope" data-row-top="1580" data-row-height="28"><title>system_scope BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="1473" y="1580" width="510" height="28" fill="#f8fafc"/><text x="1554" y="1598.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">system_scope</text><text x="1940" y="1598.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="1966" y="1598.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="display_order" data-row-top="1608" data-row-height="28"><title>display_order INT NOT NULL DEFAULT 100</title><rect x="1473" y="1608" width="510" height="28" fill="#eef2f7"/><text x="1554" y="1626.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">display_order</text><text x="1940" y="1626.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="1626.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-time_slots" data-table="time_slots" tabindex="0" role="button" aria-label="time_slots: Временные слоты"><title>time_slots: Временные слоты
|
||
6 столбцов · 1 исходящих и 4 входящих FK</title><rect class="table-box" x="1472" y="1748" width="512" height="264" rx="6"/><path d="M 1478 1748 H 1978 Q 1984 1748 1984 1754 V 1812 H 1472 V 1754 Q 1472 1748 1478 1748 Z" fill="#e8edf3"/><text x="1488" y="1774" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">time_slots</text><text x="1488" y="1796" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Временные слоты</text><g data-column="id" data-row-top="1812" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="1812" width="510" height="60" fill="#eef2f7"/><text x="1484" y="1846.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="1846.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="1846.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="1846.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="time_slot_scope_id" data-row-top="1872" data-row-height="28"><title>time_slot_scope_id BIGINT NOT NULL REFERENCES time_slot_scopes(id) ON DELETE CASCADE</title><rect x="1473" y="1872" width="510" height="28" fill="#f8fafc"/><text x="1484" y="1890.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK24</text><text x="1554" y="1890.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">time_slot_scope_id</text><text x="1940" y="1890.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="1890.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="order_number" data-row-top="1900" data-row-height="28"><title>order_number INT NOT NULL</title><rect x="1473" y="1900" width="510" height="28" fill="#eef2f7"/><text x="1554" y="1918.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">order_number</text><text x="1940" y="1918.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="1918.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_time" data-row-top="1928" data-row-height="28"><title>start_time TIME NOT NULL</title><rect x="1473" y="1928" width="510" height="28" fill="#f8fafc"/><text x="1554" y="1946.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_time</text><text x="1940" y="1946.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">time</text><text x="1966" y="1946.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="end_time" data-row-top="1956" data-row-height="28"><title>end_time TIME NOT NULL</title><rect x="1473" y="1956" width="510" height="28" fill="#eef2f7"/><text x="1554" y="1974.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">end_time</text><text x="1940" y="1974.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">time</text><text x="1966" y="1974.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="duration_minutes" data-row-top="1984" data-row-height="28"><title>duration_minutes INT NOT NULL</title><rect x="1473" y="1984" width="510" height="28" fill="#f8fafc"/><text x="1554" y="2002.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">duration_minutes</text><text x="1940" y="2002.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="2002.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-time_slot_date_assignments" data-table="time_slot_date_assignments" tabindex="0" role="button" aria-label="time_slot_date_assignments: Наборы звонков по датам"><title>time_slot_date_assignments: Наборы звонков по датам
|
||
3 столбцов · 1 исходящих и 0 входящих FK</title><rect class="table-box" x="1472" y="2124" width="512" height="148" rx="6"/><path d="M 1478 2124 H 1978 Q 1984 2124 1984 2130 V 2188 H 1472 V 2130 Q 1472 2124 1478 2124 Z" fill="#e8edf3"/><text x="1488" y="2150" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">time_slot_date_assignments</text><text x="1488" y="2172" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Наборы звонков по датам</text><g data-column="id" data-row-top="2188" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="2188" width="510" height="28" fill="#eef2f7"/><text x="1484" y="2206.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="2206.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="2206.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="2206.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="assignment_date" data-row-top="2216" data-row-height="28"><title>assignment_date DATE NOT NULL UNIQUE</title><rect x="1473" y="2216" width="510" height="28" fill="#f8fafc"/><text x="1484" y="2234.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="1554" y="2234.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">assignment_date</text><text x="1940" y="2234.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1966" y="2234.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="time_slot_scope_id" data-row-top="2244" data-row-height="28"><title>time_slot_scope_id BIGINT NOT NULL REFERENCES time_slot_scopes(id) ON DELETE CASCADE</title><rect x="1473" y="2244" width="510" height="28" fill="#eef2f7"/><text x="1484" y="2262.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK25</text><text x="1554" y="2262.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">time_slot_scope_id</text><text x="1940" y="2262.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="2262.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-academic_years" data-table="academic_years" tabindex="0" role="button" aria-label="academic_years: Учебные годы"><title>academic_years: Учебные годы
|
||
4 столбцов · 0 исходящих и 4 входящих FK</title><rect class="table-box" x="768" y="152" width="512" height="208" rx="6"/><path d="M 774 152 H 1274 Q 1280 152 1280 158 V 216 H 768 V 158 Q 768 152 774 152 Z" fill="#e8edf3"/><text x="784" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">academic_years</text><text x="784" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Учебные годы</text><g data-column="id" data-row-top="216" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="216" width="510" height="60" fill="#eef2f7"/><text x="780" y="250.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="250.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="250.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="250.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="title" data-row-top="276" data-row-height="28"><title>title VARCHAR(20) NOT NULL UNIQUE</title><rect x="769" y="276" width="510" height="28" fill="#f8fafc"/><text x="780" y="294.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="850" y="294.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">title</text><text x="1236" y="294.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="1262" y="294.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_date" data-row-top="304" data-row-height="28"><title>start_date DATE NOT NULL</title><rect x="769" y="304" width="510" height="28" fill="#eef2f7"/><text x="850" y="322.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_date</text><text x="1236" y="322.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="322.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="end_date" data-row-top="332" data-row-height="28"><title>end_date DATE NOT NULL</title><rect x="769" y="332" width="510" height="28" fill="#f8fafc"/><text x="850" y="350.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">end_date</text><text x="1236" y="350.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="350.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-semesters" data-table="semesters" tabindex="0" role="button" aria-label="semesters: Семестры"><title>semesters: Семестры
|
||
5 столбцов · 1 исходящих и 4 входящих FK</title><rect class="table-box" x="768" y="472" width="512" height="236" rx="6"/><path d="M 774 472 H 1274 Q 1280 472 1280 478 V 536 H 768 V 478 Q 768 472 774 472 Z" fill="#e8edf3"/><text x="784" y="498" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">semesters</text><text x="784" y="520" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Семестры</text><g data-column="id" data-row-top="536" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="536" width="510" height="60" fill="#eef2f7"/><text x="780" y="570.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_year_id" data-row-top="596" data-row-height="28"><title>academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE</title><rect x="769" y="596" width="510" height="28" fill="#f8fafc"/><text x="780" y="614.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK27</text><text x="850" y="614.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_year_id</text><text x="1236" y="614.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="614.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_type" data-row-top="624" data-row-height="28"><title>semester_type VARCHAR(20) NOT NULL</title><rect x="769" y="624" width="510" height="28" fill="#eef2f7"/><text x="850" y="642.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_type</text><text x="1236" y="642.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="1262" y="642.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_date" data-row-top="652" data-row-height="28"><title>start_date DATE NOT NULL</title><rect x="769" y="652" width="510" height="28" fill="#f8fafc"/><text x="850" y="670.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_date</text><text x="1236" y="670.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="670.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="end_date" data-row-top="680" data-row-height="28"><title>end_date DATE NOT NULL</title><rect x="769" y="680" width="510" height="28" fill="#eef2f7"/><text x="850" y="698.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">end_date</text><text x="1236" y="698.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="698.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-academic_calendar_activity_types" data-table="academic_calendar_activity_types" tabindex="0" role="button" aria-label="academic_calendar_activity_types: Виды учебной активности"><title>academic_calendar_activity_types: Виды учебной активности
|
||
7 столбцов · 0 исходящих и 1 входящих FK</title><rect class="table-box" x="768" y="1276" width="512" height="260" rx="6"/><path d="M 774 1276 H 1274 Q 1280 1276 1280 1282 V 1340 H 768 V 1282 Q 768 1276 774 1276 Z" fill="#e8edf3"/><text x="784" y="1302" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">academic_calendar_activity_types</text><text x="784" y="1324" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Виды учебной активности</text><g data-column="id" data-row-top="1340" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="1340" width="510" height="28" fill="#eef2f7"/><text x="780" y="1358.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="1358.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="1358.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="1358.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="code" data-row-top="1368" data-row-height="28"><title>code VARCHAR(10) UNIQUE NOT NULL</title><rect x="769" y="1368" width="510" height="28" fill="#f8fafc"/><text x="780" y="1386.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">UQ</text><text x="850" y="1386.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">code</text><text x="1236" y="1386.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(10)</text><text x="1262" y="1386.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="1396" data-row-height="28"><title>name VARCHAR(255) NOT NULL</title><rect x="769" y="1396" width="510" height="28" fill="#eef2f7"/><text x="850" y="1414.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="1236" y="1414.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="1262" y="1414.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="allow_schedule" data-row-top="1424" data-row-height="28"><title>allow_schedule BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="769" y="1424" width="510" height="28" fill="#f8fafc"/><text x="850" y="1442.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">allow_schedule</text><text x="1236" y="1442.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="1262" y="1442.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="color_code" data-row-top="1452" data-row-height="28"><title>color_code VARCHAR(7) NOT NULL DEFAULT '#64748b'</title><rect x="769" y="1452" width="510" height="28" fill="#eef2f7"/><text x="850" y="1470.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">color_code</text><text x="1236" y="1470.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(7)</text><text x="1262" y="1470.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="display_order" data-row-top="1480" data-row-height="28"><title>display_order INT NOT NULL DEFAULT 100</title><rect x="769" y="1480" width="510" height="28" fill="#f8fafc"/><text x="850" y="1498.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">display_order</text><text x="1236" y="1498.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1262" y="1498.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="description" data-row-top="1508" data-row-height="28"><title>description TEXT</title><rect x="769" y="1508" width="510" height="28" fill="#eef2f7"/><text x="850" y="1526.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">description</text><text x="1236" y="1526.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="1262" y="1526.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-academic_calendars" data-table="academic_calendars" tabindex="0" role="button" aria-label="academic_calendars: Учебные календари"><title>academic_calendars: Учебные календари
|
||
9 столбцов · 4 исходящих и 3 входящих FK</title><rect class="table-box" x="768" y="820" width="512" height="344" rx="6"/><path d="M 774 820 H 1274 Q 1280 820 1280 826 V 884 H 768 V 826 Q 768 820 774 820 Z" fill="#e8edf3"/><text x="784" y="846" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">academic_calendars</text><text x="784" y="868" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Учебные календари</text><g data-column="id" data-row-top="884" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="884" width="510" height="48" fill="#eef2f7"/><text x="780" y="912.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="912.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="912.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="912.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="title" data-row-top="932" data-row-height="28"><title>title VARCHAR(255) NOT NULL</title><rect x="769" y="932" width="510" height="28" fill="#f8fafc"/><text x="850" y="950.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">title</text><text x="1236" y="950.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="1262" y="950.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_year_id" data-row-top="960" data-row-height="28"><title>academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE</title><rect x="769" y="960" width="510" height="28" fill="#eef2f7"/><text x="780" y="978.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK28</text><text x="850" y="978.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_year_id</text><text x="1236" y="978.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="978.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_id" data-row-top="988" data-row-height="36"><title>specialty_id BIGINT NOT NULL REFERENCES specialties(id)</title><rect x="769" y="988" width="510" height="36" fill="#f8fafc"/><text x="780" y="1010.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK29·FK31</text><text x="850" y="1010.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_id</text><text x="1236" y="1010.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="1010.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_profile_id" data-row-top="1024" data-row-height="28"><title>specialty_profile_id BIGINT NOT NULL</title><rect x="769" y="1024" width="510" height="28" fill="#eef2f7"/><text x="780" y="1042.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK31</text><text x="850" y="1042.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_profile_id</text><text x="1236" y="1042.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="1042.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="study_form_id" data-row-top="1052" data-row-height="28"><title>study_form_id BIGINT NOT NULL REFERENCES education_forms(id)</title><rect x="769" y="1052" width="510" height="28" fill="#f8fafc"/><text x="780" y="1070.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK30</text><text x="850" y="1070.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">study_form_id</text><text x="1236" y="1070.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="1070.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="course_count" data-row-top="1080" data-row-height="28"><title>course_count INT NOT NULL DEFAULT 4</title><rect x="769" y="1080" width="510" height="28" fill="#eef2f7"/><text x="850" y="1098.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">course_count</text><text x="1236" y="1098.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1262" y="1098.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="1108" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="769" y="1108" width="510" height="28" fill="#f8fafc"/><text x="850" y="1126.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="1236" y="1126.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="1262" y="1126.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="updated_at" data-row-top="1136" data-row-height="28"><title>updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="769" y="1136" width="510" height="28" fill="#eef2f7"/><text x="850" y="1154.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="1236" y="1154.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="1262" y="1154.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-academic_calendar_periods" data-table="academic_calendar_periods" tabindex="0" role="button" aria-label="academic_calendar_periods: Календарные периоды"><title>academic_calendar_periods: Календарные периоды
|
||
6 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="768" y="1648" width="512" height="232" rx="6"/><path d="M 774 1648 H 1274 Q 1280 1648 1280 1654 V 1712 H 768 V 1654 Q 768 1648 774 1648 Z" fill="#e8edf3"/><text x="784" y="1674" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">academic_calendar_periods</text><text x="784" y="1696" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Календарные периоды</text><g data-column="id" data-row-top="1712" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="1712" width="510" height="28" fill="#eef2f7"/><text x="780" y="1730.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="1730.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="1730.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="1730.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="calendar_id" data-row-top="1740" data-row-height="28"><title>calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE</title><rect x="769" y="1740" width="510" height="28" fill="#f8fafc"/><text x="780" y="1758.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK32</text><text x="850" y="1758.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">calendar_id</text><text x="1236" y="1758.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="1758.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="course_number" data-row-top="1768" data-row-height="28"><title>course_number INT NOT NULL</title><rect x="769" y="1768" width="510" height="28" fill="#eef2f7"/><text x="850" y="1786.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">course_number</text><text x="1236" y="1786.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1262" y="1786.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_date" data-row-top="1796" data-row-height="28"><title>start_date DATE NOT NULL</title><rect x="769" y="1796" width="510" height="28" fill="#f8fafc"/><text x="850" y="1814.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_date</text><text x="1236" y="1814.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="1814.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="end_date" data-row-top="1824" data-row-height="28"><title>end_date DATE NOT NULL</title><rect x="769" y="1824" width="510" height="28" fill="#eef2f7"/><text x="850" y="1842.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">end_date</text><text x="1236" y="1842.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="1262" y="1842.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="activity_type_id" data-row-top="1852" data-row-height="28"><title>activity_type_id BIGINT NOT NULL REFERENCES academic_calendar_activity_types(id)</title><rect x="769" y="1852" width="510" height="28" fill="#f8fafc"/><text x="780" y="1870.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK33</text><text x="850" y="1870.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">activity_type_id</text><text x="1236" y="1870.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="1870.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-academic_calendar_subjects" data-table="academic_calendar_subjects" tabindex="0" role="button" aria-label="academic_calendar_subjects: Дисциплины календаря"><title>academic_calendar_subjects: Дисциплины календаря
|
||
5 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="768" y="1992" width="512" height="204" rx="6"/><path d="M 774 1992 H 1274 Q 1280 1992 1280 1998 V 2056 H 768 V 1998 Q 768 1992 774 1992 Z" fill="#e8edf3"/><text x="784" y="2018" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">academic_calendar_subjects</text><text x="784" y="2040" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Дисциплины календаря</text><g data-column="id" data-row-top="2056" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="2056" width="510" height="28" fill="#eef2f7"/><text x="780" y="2074.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="2074.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="2074.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="2074.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="calendar_id" data-row-top="2084" data-row-height="28"><title>calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE</title><rect x="769" y="2084" width="510" height="28" fill="#f8fafc"/><text x="780" y="2102.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK34</text><text x="850" y="2102.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">calendar_id</text><text x="1236" y="2102.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="2102.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_number" data-row-top="2112" data-row-height="28"><title>semester_number INT NOT NULL</title><rect x="769" y="2112" width="510" height="28" fill="#eef2f7"/><text x="850" y="2130.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_number</text><text x="1236" y="2130.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1262" y="2130.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subject_id" data-row-top="2140" data-row-height="28"><title>subject_id BIGINT NOT NULL REFERENCES subjects(id)</title><rect x="769" y="2140" width="510" height="28" fill="#f8fafc"/><text x="780" y="2158.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK35</text><text x="850" y="2158.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subject_id</text><text x="1236" y="2158.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="2158.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="2168" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="769" y="2168" width="510" height="28" fill="#eef2f7"/><text x="850" y="2186.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="1236" y="2186.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="1262" y="2186.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-student_group_calendar_assignments" data-table="student_group_calendar_assignments" tabindex="0" role="button" aria-label="student_group_calendar_assignments: Назначения календарей группам"><title>student_group_calendar_assignments: Назначения календарей группам
|
||
5 столбцов · 3 исходящих и 0 входящих FK</title><rect class="table-box" x="768" y="2308" width="512" height="204" rx="6"/><path d="M 774 2308 H 1274 Q 1280 2308 1280 2314 V 2372 H 768 V 2314 Q 768 2308 774 2308 Z" fill="#e8edf3"/><text x="784" y="2334" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">student_group_calendar_assignments</text><text x="784" y="2356" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Назначения календарей группам</text><g data-column="id" data-row-top="2372" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="769" y="2372" width="510" height="28" fill="#eef2f7"/><text x="780" y="2390.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="850" y="2390.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1236" y="2390.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1262" y="2390.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="group_id" data-row-top="2400" data-row-height="28"><title>group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE</title><rect x="769" y="2400" width="510" height="28" fill="#f8fafc"/><text x="780" y="2418.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK36</text><text x="850" y="2418.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">group_id</text><text x="1236" y="2418.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="2418.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_year_id" data-row-top="2428" data-row-height="28"><title>academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE</title><rect x="769" y="2428" width="510" height="28" fill="#eef2f7"/><text x="780" y="2446.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK37</text><text x="850" y="2446.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_year_id</text><text x="1236" y="2446.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="2446.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="calendar_id" data-row-top="2456" data-row-height="28"><title>calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE</title><rect x="769" y="2456" width="510" height="28" fill="#f8fafc"/><text x="780" y="2474.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK38</text><text x="850" y="2474.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">calendar_id</text><text x="1236" y="2474.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1262" y="2474.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="created_at" data-row-top="2484" data-row-height="28"><title>created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP</title><rect x="769" y="2484" width="510" height="28" fill="#eef2f7"/><text x="850" y="2502.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="1236" y="2502.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="1262" y="2502.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-schedule_rules" data-table="schedule_rules" tabindex="0" role="button" aria-label="schedule_rules: Правила расписания"><title>schedule_rules: Правила расписания
|
||
12 столбцов · 4 исходящих и 3 входящих FK</title><rect class="table-box" x="2880" y="1068" width="512" height="420" rx="6"/><path d="M 2886 1068 H 3386 Q 3392 1068 3392 1074 V 1132 H 2880 V 1074 Q 2880 1068 2886 1068 Z" fill="#eeedff"/><text x="2896" y="1094" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_rules</text><text x="2896" y="1116" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Правила расписания</text><g data-column="id" data-row-top="1132" data-row-height="48"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2881" y="1132" width="510" height="48" fill="#eef2f7"/><text x="2892" y="1160.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2962" y="1160.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="3348" y="1160.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="3374" y="1160.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="load_revision" data-row-top="1180" data-row-height="28"><title>load_revision BIGINT NOT NULL DEFAULT 0</title><rect x="2881" y="1180" width="510" height="28" fill="#f8fafc"/><text x="2962" y="1198.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">load_revision</text><text x="3348" y="1198.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1198.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subject_id" data-row-top="1208" data-row-height="28"><title>subject_id BIGINT NOT NULL REFERENCES subjects(id)</title><rect x="2881" y="1208" width="510" height="28" fill="#eef2f7"/><text x="2892" y="1226.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK39</text><text x="2962" y="1226.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subject_id</text><text x="3348" y="1226.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1226.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_id" data-row-top="1236" data-row-height="28"><title>semester_id BIGINT NOT NULL REFERENCES semesters(id) ON DELETE CASCADE</title><rect x="2881" y="1236" width="510" height="28" fill="#f8fafc"/><text x="2892" y="1254.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK40·FK84</text><text x="2962" y="1254.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_id</text><text x="3348" y="1254.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1254.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="1264" data-row-height="28"><title>status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'</title><rect x="2881" y="1264" width="510" height="28" fill="#eef2f7"/><text x="2962" y="1282.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="3348" y="1282.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="3374" y="1282.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="valid_from" data-row-top="1292" data-row-height="28"><title>valid_from DATE</title><rect x="2881" y="1292" width="510" height="28" fill="#f8fafc"/><text x="2962" y="1310.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">valid_from</text><text x="3348" y="1310.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="3374" y="1310.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="valid_to" data-row-top="1320" data-row-height="28"><title>valid_to DATE</title><rect x="2881" y="1320" width="510" height="28" fill="#eef2f7"/><text x="2962" y="1338.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">valid_to</text><text x="3348" y="1338.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="3374" y="1338.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="version_group_id" data-row-top="1348" data-row-height="28"><title>version_group_id BIGINT</title><rect x="2881" y="1348" width="510" height="28" fill="#f8fafc"/><text x="2962" y="1366.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">version_group_id</text><text x="3348" y="1366.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1366.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="change_reason" data-row-top="1376" data-row-height="28"><title>change_reason TEXT</title><rect x="2881" y="1376" width="510" height="28" fill="#eef2f7"/><text x="2962" y="1394.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">change_reason</text><text x="3348" y="1394.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="3374" y="1394.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_by" data-row-top="1404" data-row-height="28"><title>created_by BIGINT REFERENCES users(id)</title><rect x="2881" y="1404" width="510" height="28" fill="#f8fafc"/><text x="2892" y="1422.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK41</text><text x="2962" y="1422.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_by</text><text x="3348" y="1422.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1422.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="1432" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2881" y="1432" width="510" height="28" fill="#eef2f7"/><text x="2962" y="1450.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="3348" y="1450.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="1450.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="schedule_version_id" data-row-top="1460" data-row-height="28"><title>schedule_version_id BIGINT</title><rect x="2881" y="1460" width="510" height="28" fill="#f8fafc"/><text x="2892" y="1478.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK84</text><text x="2962" y="1478.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_version_id</text><text x="3348" y="1478.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1478.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-schedule_rule_loads" data-table="schedule_rule_loads" tabindex="0" role="button" aria-label="schedule_rule_loads: Нагрузка правила по видам занятий"><title>schedule_rule_loads: Нагрузка правила по видам занятий
|
||
4 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="2880" y="1600" width="512" height="176" rx="6"/><path d="M 2886 1600 H 3386 Q 3392 1600 3392 1606 V 1664 H 2880 V 1606 Q 2880 1600 2886 1600 Z" fill="#e8edf3"/><text x="2896" y="1626" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_rule_loads</text><text x="2896" y="1648" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Нагрузка правила по видам занятий</text><g data-column="schedule_rule_id" data-row-top="1664" data-row-height="28"><title>schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE</title><rect x="2881" y="1664" width="510" height="28" fill="#eef2f7"/><text x="2892" y="1682.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK42</text><text x="2962" y="1682.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_rule_id</text><text x="3348" y="1682.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1682.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_type_code" data-row-top="1692" data-row-height="28"><title>lesson_type_code VARCHAR(30) NOT NULL REFERENCES lesson_types(code)</title><rect x="2881" y="1692" width="510" height="28" fill="#f8fafc"/><text x="2892" y="1710.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK43</text><text x="2962" y="1710.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_type_code</text><text x="3348" y="1710.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="3374" y="1710.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_hours" data-row-top="1720" data-row-height="28"><title>academic_hours INT NOT NULL</title><rect x="2881" y="1720" width="510" height="28" fill="#eef2f7"/><text x="2962" y="1738.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_hours</text><text x="3348" y="1738.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="3374" y="1738.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_week" data-row-top="1748" data-row-height="28"><title>start_week INT NOT NULL DEFAULT 1</title><rect x="2881" y="1748" width="510" height="28" fill="#f8fafc"/><text x="2962" y="1766.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_week</text><text x="3348" y="1766.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="3374" y="1766.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-schedule_rule_groups" data-table="schedule_rule_groups" tabindex="0" role="button" aria-label="schedule_rule_groups: Группы правила"><title>schedule_rule_groups: Группы правила
|
||
2 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="2880" y="1888" width="512" height="120" rx="6"/><path d="M 2886 1888 H 3386 Q 3392 1888 3392 1894 V 1952 H 2880 V 1894 Q 2880 1888 2886 1888 Z" fill="#e8edf3"/><text x="2896" y="1914" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_rule_groups</text><text x="2896" y="1936" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Группы правила</text><g data-column="schedule_rule_id" data-row-top="1952" data-row-height="28"><title>schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE</title><rect x="2881" y="1952" width="510" height="28" fill="#eef2f7"/><text x="2892" y="1970.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK44</text><text x="2962" y="1970.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_rule_id</text><text x="3348" y="1970.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1970.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="group_id" data-row-top="1980" data-row-height="28"><title>group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE</title><rect x="2881" y="1980" width="510" height="28" fill="#f8fafc"/><text x="2892" y="1998.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK45</text><text x="2962" y="1998.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">group_id</text><text x="3348" y="1998.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="1998.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-schedule_rule_slots" data-table="schedule_rule_slots" tabindex="0" role="button" aria-label="schedule_rule_slots: Повторяющиеся занятия"><title>schedule_rule_slots: Повторяющиеся занятия
|
||
15 столбцов · 6 исходящих и 4 входящих FK</title><rect class="table-box" x="2880" y="2120" width="512" height="516" rx="6"/><path d="M 2886 2120 H 3386 Q 3392 2120 3392 2126 V 2184 H 2880 V 2126 Q 2880 2120 2886 2120 Z" fill="#e8edf3"/><text x="2896" y="2146" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_rule_slots</text><text x="2896" y="2168" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Повторяющиеся занятия</text><g data-column="id" data-row-top="2184" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2881" y="2184" width="510" height="60" fill="#eef2f7"/><text x="2892" y="2218.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2962" y="2218.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="3348" y="2218.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="3374" y="2218.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="schedule_rule_id" data-row-top="2244" data-row-height="28"><title>schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE</title><rect x="2881" y="2244" width="510" height="28" fill="#f8fafc"/><text x="2892" y="2262.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK46</text><text x="2962" y="2262.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_rule_id</text><text x="3348" y="2262.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2262.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="day_of_week" data-row-top="2272" data-row-height="28"><title>day_of_week INT NOT NULL</title><rect x="2881" y="2272" width="510" height="28" fill="#eef2f7"/><text x="2962" y="2290.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">day_of_week</text><text x="3348" y="2290.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="3374" y="2290.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="parity" data-row-top="2300" data-row-height="28"><title>parity VARCHAR(10) NOT NULL</title><rect x="2881" y="2300" width="510" height="28" fill="#f8fafc"/><text x="2962" y="2318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">parity</text><text x="3348" y="2318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(10)</text><text x="3374" y="2318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="time_slot_id" data-row-top="2328" data-row-height="28"><title>time_slot_id BIGINT NOT NULL REFERENCES time_slots(id)</title><rect x="2881" y="2328" width="510" height="28" fill="#eef2f7"/><text x="2892" y="2346.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK47</text><text x="2962" y="2346.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">time_slot_id</text><text x="3348" y="2346.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2346.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="2356" data-row-height="28"><title>teacher_id BIGINT NOT NULL REFERENCES users(id)</title><rect x="2881" y="2356" width="510" height="28" fill="#f8fafc"/><text x="2892" y="2374.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK48</text><text x="2962" y="2374.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="3348" y="2374.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2374.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="classroom_id" data-row-top="2384" data-row-height="28"><title>classroom_id BIGINT NOT NULL REFERENCES classrooms(id)</title><rect x="2881" y="2384" width="510" height="28" fill="#eef2f7"/><text x="2892" y="2402.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK49</text><text x="2962" y="2402.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">classroom_id</text><text x="3348" y="2402.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2402.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_type_id" data-row-top="2412" data-row-height="28"><title>lesson_type_id BIGINT NOT NULL REFERENCES lesson_types(id)</title><rect x="2881" y="2412" width="510" height="28" fill="#f8fafc"/><text x="2892" y="2430.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK50</text><text x="2962" y="2430.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_type_id</text><text x="3348" y="2430.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2430.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_format" data-row-top="2440" data-row-height="28"><title>lesson_format VARCHAR(30) NOT NULL</title><rect x="2881" y="2440" width="510" height="28" fill="#eef2f7"/><text x="2962" y="2458.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_format</text><text x="3348" y="2458.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="3374" y="2458.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="time_locked" data-row-top="2468" data-row-height="28"><title>time_locked BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="2881" y="2468" width="510" height="28" fill="#f8fafc"/><text x="2962" y="2486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">time_locked</text><text x="3348" y="2486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="3374" y="2486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="classroom_locked" data-row-top="2496" data-row-height="28"><title>classroom_locked BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="2881" y="2496" width="510" height="28" fill="#eef2f7"/><text x="2962" y="2514.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">classroom_locked</text><text x="3348" y="2514.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="3374" y="2514.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_locked" data-row-top="2524" data-row-height="28"><title>teacher_locked BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="2881" y="2524" width="510" height="28" fill="#f8fafc"/><text x="2962" y="2542.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_locked</text><text x="3348" y="2542.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="3374" y="2542.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="locked_by" data-row-top="2552" data-row-height="28"><title>locked_by BIGINT REFERENCES users(id)</title><rect x="2881" y="2552" width="510" height="28" fill="#eef2f7"/><text x="2892" y="2570.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK51</text><text x="2962" y="2570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">locked_by</text><text x="3348" y="2570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="locked_at" data-row-top="2580" data-row-height="28"><title>locked_at TIMESTAMPTZ</title><rect x="2881" y="2580" width="510" height="28" fill="#f8fafc"/><text x="2962" y="2598.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">locked_at</text><text x="3348" y="2598.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="2598.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="lock_comment" data-row-top="2608" data-row-height="28"><title>lock_comment TEXT</title><rect x="2881" y="2608" width="510" height="28" fill="#eef2f7"/><text x="2962" y="2626.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lock_comment</text><text x="3348" y="2626.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="3374" y="2626.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-schedule_rule_slot_subgroups" data-table="schedule_rule_slot_subgroups" tabindex="0" role="button" aria-label="schedule_rule_slot_subgroups: Подгруппы занятия"><title>schedule_rule_slot_subgroups: Подгруппы занятия
|
||
2 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="2880" y="2748" width="512" height="120" rx="6"/><path d="M 2886 2748 H 3386 Q 3392 2748 3392 2754 V 2812 H 2880 V 2754 Q 2880 2748 2886 2748 Z" fill="#e8edf3"/><text x="2896" y="2774" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_rule_slot_subgroups</text><text x="2896" y="2796" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Подгруппы занятия</text><g data-column="schedule_rule_slot_id" data-row-top="2812" data-row-height="28"><title>schedule_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id) ON DELETE CASCADE</title><rect x="2881" y="2812" width="510" height="28" fill="#eef2f7"/><text x="2892" y="2830.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK52</text><text x="2962" y="2830.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_rule_slot_id</text><text x="3348" y="2830.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2830.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subgroup_id" data-row-top="2840" data-row-height="28"><title>subgroup_id BIGINT NOT NULL REFERENCES subgroups(id) ON DELETE CASCADE</title><rect x="2881" y="2840" width="510" height="28" fill="#f8fafc"/><text x="2892" y="2858.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK53</text><text x="2962" y="2858.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subgroup_id</text><text x="3348" y="2858.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="2858.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-schedule_overrides" data-table="schedule_overrides" tabindex="0" role="button" aria-label="schedule_overrides: Точечные изменения занятий"><title>schedule_overrides: Точечные изменения занятий
|
||
12 столбцов · 5 исходящих и 2 входящих FK</title><rect class="table-box" x="4288" y="1716" width="512" height="408" rx="6"/><path d="M 4294 1716 H 4794 Q 4800 1716 4800 1722 V 1780 H 4288 V 1722 Q 4288 1716 4294 1716 Z" fill="#e8edf3"/><text x="4304" y="1742" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_overrides</text><text x="4304" y="1764" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Точечные изменения занятий</text><g data-column="id" data-row-top="1780" data-row-height="36"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="1780" width="510" height="36" fill="#eef2f7"/><text x="4300" y="1802.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="1802.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="1802.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="1802.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="base_rule_slot_id" data-row-top="1816" data-row-height="28"><title>base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)</title><rect x="4289" y="1816" width="510" height="28" fill="#f8fafc"/><text x="4300" y="1834.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK54</text><text x="4370" y="1834.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">base_rule_slot_id</text><text x="4756" y="1834.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1834.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_date" data-row-top="1844" data-row-height="28"><title>lesson_date DATE NOT NULL</title><rect x="4289" y="1844" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1862.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_date</text><text x="4756" y="1862.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="1862.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="target_lesson_date" data-row-top="1872" data-row-height="28"><title>target_lesson_date DATE</title><rect x="4289" y="1872" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1890.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">target_lesson_date</text><text x="4756" y="1890.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="1890.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="action" data-row-top="1900" data-row-height="28"><title>action VARCHAR(20) NOT NULL</title><rect x="4289" y="1900" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1918.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">action</text><text x="4756" y="1918.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="1918.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="new_time_slot_id" data-row-top="1928" data-row-height="28"><title>new_time_slot_id BIGINT REFERENCES time_slots(id)</title><rect x="4289" y="1928" width="510" height="28" fill="#f8fafc"/><text x="4300" y="1946.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK55</text><text x="4370" y="1946.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">new_time_slot_id</text><text x="4756" y="1946.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1946.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="new_classroom_id" data-row-top="1956" data-row-height="28"><title>new_classroom_id BIGINT REFERENCES classrooms(id)</title><rect x="4289" y="1956" width="510" height="28" fill="#eef2f7"/><text x="4300" y="1974.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK56</text><text x="4370" y="1974.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">new_classroom_id</text><text x="4756" y="1974.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1974.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="new_teacher_id" data-row-top="1984" data-row-height="28"><title>new_teacher_id BIGINT REFERENCES users(id)</title><rect x="4289" y="1984" width="510" height="28" fill="#f8fafc"/><text x="4300" y="2002.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK57</text><text x="4370" y="2002.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">new_teacher_id</text><text x="4756" y="2002.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2002.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="new_lesson_format" data-row-top="2012" data-row-height="28"><title>new_lesson_format VARCHAR(30)</title><rect x="4289" y="2012" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2030.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">new_lesson_format</text><text x="4756" y="2030.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="4782" y="2030.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="comment" data-row-top="2040" data-row-height="28"><title>comment TEXT</title><rect x="4289" y="2040" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2058.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="4756" y="2058.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="2058.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_by" data-row-top="2068" data-row-height="28"><title>created_by BIGINT REFERENCES users(id)</title><rect x="4289" y="2068" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2086.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK58</text><text x="4370" y="2086.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_by</text><text x="4756" y="2086.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2086.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="2096" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="2096" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2114.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4756" y="2114.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="2114.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-teacher_absences" data-table="teacher_absences" tabindex="0" role="button" aria-label="teacher_absences: Отсутствия преподавателей"><title>teacher_absences: Отсутствия преподавателей
|
||
12 столбцов · 3 исходящих и 1 входящих FK</title><rect class="table-box" x="4288" y="2236" width="512" height="400" rx="6"/><path d="M 4294 2236 H 4794 Q 4800 2236 4800 2242 V 2300 H 4288 V 2242 Q 4288 2236 4294 2236 Z" fill="#e8edf3"/><text x="4304" y="2262" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_absences</text><text x="4304" y="2284" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Отсутствия преподавателей</text><g data-column="id" data-row-top="2300" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="2300" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2318.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="2318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="2318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="2318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="2328" data-row-height="28"><title>teacher_id BIGINT NOT NULL REFERENCES users(id)</title><rect x="4289" y="2328" width="510" height="28" fill="#f8fafc"/><text x="4300" y="2346.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK59</text><text x="4370" y="2346.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="4756" y="2346.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2346.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="start_date" data-row-top="2356" data-row-height="28"><title>start_date DATE NOT NULL</title><rect x="4289" y="2356" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2374.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">start_date</text><text x="4756" y="2374.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="2374.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="end_date" data-row-top="2384" data-row-height="28"><title>end_date DATE NOT NULL</title><rect x="4289" y="2384" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2402.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">end_date</text><text x="4756" y="2402.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="2402.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="reason" data-row-top="2412" data-row-height="28"><title>reason TEXT NOT NULL</title><rect x="4289" y="2412" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2430.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reason</text><text x="4756" y="2430.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="2430.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="2440" data-row-height="28"><title>status VARCHAR(20) NOT NULL</title><rect x="4289" y="2440" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2458.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4756" y="2458.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="2458.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="requested_by" data-row-top="2468" data-row-height="28"><title>requested_by BIGINT REFERENCES users(id)</title><rect x="4289" y="2468" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2486.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK60</text><text x="4370" y="2486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">requested_by</text><text x="4756" y="2486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_by" data-row-top="2496" data-row-height="28"><title>reviewed_by BIGINT REFERENCES users(id)</title><rect x="4289" y="2496" width="510" height="28" fill="#f8fafc"/><text x="4300" y="2514.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK61</text><text x="4370" y="2514.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_by</text><text x="4756" y="2514.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2514.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="review_comment" data-row-top="2524" data-row-height="28"><title>review_comment TEXT</title><rect x="4289" y="2524" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2542.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">review_comment</text><text x="4756" y="2542.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="2542.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_at" data-row-top="2552" data-row-height="28"><title>reviewed_at TIMESTAMPTZ</title><rect x="4289" y="2552" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_at</text><text x="4756" y="2570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="2570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="2580" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="2580" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2598.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4756" y="2598.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="2598.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="updated_at" data-row-top="2608" data-row-height="28"><title>updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="2608" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2626.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="4756" y="2626.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="2626.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-teacher_absence_decisions" data-table="teacher_absence_decisions" tabindex="0" role="button" aria-label="teacher_absence_decisions: Решения мастера замены"><title>teacher_absence_decisions: Решения мастера замены
|
||
10 столбцов · 4 исходящих и 0 входящих FK</title><rect class="table-box" x="4288" y="2748" width="512" height="344" rx="6"/><path d="M 4294 2748 H 4794 Q 4800 2748 4800 2754 V 2812 H 4288 V 2754 Q 4288 2748 4294 2748 Z" fill="#e8edf3"/><text x="4304" y="2774" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_absence_decisions</text><text x="4304" y="2796" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Решения мастера замены</text><g data-column="id" data-row-top="2812" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="2812" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2830.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="2830.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="2830.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="2830.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="absence_id" data-row-top="2840" data-row-height="28"><title>absence_id BIGINT NOT NULL REFERENCES teacher_absences(id) ON DELETE CASCADE</title><rect x="4289" y="2840" width="510" height="28" fill="#f8fafc"/><text x="4300" y="2858.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK62</text><text x="4370" y="2858.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">absence_id</text><text x="4756" y="2858.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2858.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="base_rule_slot_id" data-row-top="2868" data-row-height="28"><title>base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)</title><rect x="4289" y="2868" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2886.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK63</text><text x="4370" y="2886.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">base_rule_slot_id</text><text x="4756" y="2886.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2886.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_date" data-row-top="2896" data-row-height="28"><title>lesson_date DATE NOT NULL</title><rect x="4289" y="2896" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2914.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_date</text><text x="4756" y="2914.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="2914.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="resolution" data-row-top="2924" data-row-height="28"><title>resolution VARCHAR(30) NOT NULL</title><rect x="4289" y="2924" width="510" height="28" fill="#eef2f7"/><text x="4370" y="2942.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">resolution</text><text x="4756" y="2942.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="4782" y="2942.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="decision_status" data-row-top="2952" data-row-height="28"><title>decision_status VARCHAR(20) NOT NULL</title><rect x="4289" y="2952" width="510" height="28" fill="#f8fafc"/><text x="4370" y="2970.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">decision_status</text><text x="4756" y="2970.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="2970.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="schedule_override_id" data-row-top="2980" data-row-height="28"><title>schedule_override_id BIGINT REFERENCES schedule_overrides(id) ON DELETE SET NULL</title><rect x="4289" y="2980" width="510" height="28" fill="#eef2f7"/><text x="4300" y="2998.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK64</text><text x="4370" y="2998.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">schedule_override_id</text><text x="4756" y="2998.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="2998.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="comment" data-row-top="3008" data-row-height="28"><title>comment TEXT</title><rect x="4289" y="3008" width="510" height="28" fill="#f8fafc"/><text x="4370" y="3026.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="4756" y="3026.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="3026.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="decided_by" data-row-top="3036" data-row-height="28"><title>decided_by BIGINT REFERENCES users(id)</title><rect x="4289" y="3036" width="510" height="28" fill="#eef2f7"/><text x="4300" y="3054.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK65</text><text x="4370" y="3054.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">decided_by</text><text x="4756" y="3054.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="3054.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="decided_at" data-row-top="3064" data-row-height="28"><title>decided_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="3064" width="510" height="28" fill="#f8fafc"/><text x="4370" y="3082.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">decided_at</text><text x="4756" y="3082.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="3082.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-teacher_preferences" data-table="teacher_preferences" tabindex="0" role="button" aria-label="teacher_preferences: Пожелания преподавателей"><title>teacher_preferences: Пожелания преподавателей
|
||
15 столбцов · 5 исходящих и 0 входящих FK</title><rect class="table-box" x="4288" y="152" width="512" height="484" rx="6"/><path d="M 4294 152 H 4794 Q 4800 152 4800 158 V 216 H 4288 V 158 Q 4288 152 4294 152 Z" fill="#e8edf3"/><text x="4304" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_preferences</text><text x="4304" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Пожелания преподавателей</text><g data-column="id" data-row-top="216" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="216" width="510" height="28" fill="#eef2f7"/><text x="4300" y="234.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="234.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="234.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="234.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="244" data-row-height="28"><title>teacher_id BIGINT NOT NULL REFERENCES users(id)</title><rect x="4289" y="244" width="510" height="28" fill="#f8fafc"/><text x="4300" y="262.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK66</text><text x="4370" y="262.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="4756" y="262.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="262.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_id" data-row-top="272" data-row-height="28"><title>semester_id BIGINT NOT NULL REFERENCES semesters(id)</title><rect x="4289" y="272" width="510" height="28" fill="#eef2f7"/><text x="4300" y="290.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK67</text><text x="4370" y="290.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_id</text><text x="4756" y="290.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="290.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="preference_type" data-row-top="300" data-row-height="28"><title>preference_type VARCHAR(30) NOT NULL</title><rect x="4289" y="300" width="510" height="28" fill="#f8fafc"/><text x="4370" y="318.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">preference_type</text><text x="4756" y="318.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="4782" y="318.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="day_of_week" data-row-top="328" data-row-height="28"><title>day_of_week SMALLINT</title><rect x="4289" y="328" width="510" height="28" fill="#eef2f7"/><text x="4370" y="346.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">day_of_week</text><text x="4756" y="346.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">smallint</text><text x="4782" y="346.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="time_slot_id" data-row-top="356" data-row-height="28"><title>time_slot_id BIGINT REFERENCES time_slots(id)</title><rect x="4289" y="356" width="510" height="28" fill="#f8fafc"/><text x="4300" y="374.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK68</text><text x="4370" y="374.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">time_slot_id</text><text x="4756" y="374.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="374.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="preference_date" data-row-top="384" data-row-height="28"><title>preference_date DATE</title><rect x="4289" y="384" width="510" height="28" fill="#eef2f7"/><text x="4370" y="402.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">preference_date</text><text x="4756" y="402.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="402.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="comment" data-row-top="412" data-row-height="28"><title>comment TEXT</title><rect x="4289" y="412" width="510" height="28" fill="#f8fafc"/><text x="4370" y="430.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="4756" y="430.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="430.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="status" data-row-top="440" data-row-height="28"><title>status VARCHAR(20) NOT NULL</title><rect x="4289" y="440" width="510" height="28" fill="#eef2f7"/><text x="4370" y="458.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4756" y="458.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="458.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="requested_by" data-row-top="468" data-row-height="28"><title>requested_by BIGINT REFERENCES users(id)</title><rect x="4289" y="468" width="510" height="28" fill="#f8fafc"/><text x="4300" y="486.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK69</text><text x="4370" y="486.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">requested_by</text><text x="4756" y="486.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="486.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_by" data-row-top="496" data-row-height="28"><title>reviewed_by BIGINT REFERENCES users(id)</title><rect x="4289" y="496" width="510" height="28" fill="#eef2f7"/><text x="4300" y="514.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK70</text><text x="4370" y="514.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_by</text><text x="4756" y="514.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="514.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="review_comment" data-row-top="524" data-row-height="28"><title>review_comment TEXT</title><rect x="4289" y="524" width="510" height="28" fill="#f8fafc"/><text x="4370" y="542.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">review_comment</text><text x="4756" y="542.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="542.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_at" data-row-top="552" data-row-height="28"><title>reviewed_at TIMESTAMPTZ</title><rect x="4289" y="552" width="510" height="28" fill="#eef2f7"/><text x="4370" y="570.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_at</text><text x="4756" y="570.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="570.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="580" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="580" width="510" height="28" fill="#f8fafc"/><text x="4370" y="598.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4756" y="598.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="598.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="updated_at" data-row-top="608" data-row-height="28"><title>updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="608" width="510" height="28" fill="#eef2f7"/><text x="4370" y="626.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="4756" y="626.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="626.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-teacher_change_requests" data-table="teacher_change_requests" tabindex="0" role="button" aria-label="teacher_change_requests: Заявки на изменение занятия"><title>teacher_change_requests: Заявки на изменение занятия
|
||
16 столбцов · 6 исходящих и 1 входящих FK</title><rect class="table-box" x="4288" y="748" width="512" height="512" rx="6"/><path d="M 4294 748 H 4794 Q 4800 748 4800 754 V 812 H 4288 V 754 Q 4288 748 4294 748 Z" fill="#e8edf3"/><text x="4304" y="774" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_change_requests</text><text x="4304" y="796" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Заявки на изменение занятия</text><g data-column="id" data-row-top="812" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="812" width="510" height="28" fill="#eef2f7"/><text x="4300" y="830.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="830.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="830.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="830.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="840" data-row-height="28"><title>teacher_id BIGINT NOT NULL REFERENCES users(id)</title><rect x="4289" y="840" width="510" height="28" fill="#f8fafc"/><text x="4300" y="858.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK71</text><text x="4370" y="858.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="4756" y="858.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="858.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="base_rule_slot_id" data-row-top="868" data-row-height="28"><title>base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)</title><rect x="4289" y="868" width="510" height="28" fill="#eef2f7"/><text x="4300" y="886.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK72</text><text x="4370" y="886.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">base_rule_slot_id</text><text x="4756" y="886.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="886.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="lesson_date" data-row-top="896" data-row-height="28"><title>lesson_date DATE NOT NULL</title><rect x="4289" y="896" width="510" height="28" fill="#f8fafc"/><text x="4370" y="914.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">lesson_date</text><text x="4756" y="914.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="914.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="request_type" data-row-top="924" data-row-height="28"><title>request_type VARCHAR(30) NOT NULL</title><rect x="4289" y="924" width="510" height="28" fill="#eef2f7"/><text x="4370" y="942.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">request_type</text><text x="4756" y="942.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="4782" y="942.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="target_lesson_date" data-row-top="952" data-row-height="28"><title>target_lesson_date DATE</title><rect x="4289" y="952" width="510" height="28" fill="#f8fafc"/><text x="4370" y="970.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">target_lesson_date</text><text x="4756" y="970.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">date</text><text x="4782" y="970.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="requested_time_slot_id" data-row-top="980" data-row-height="28"><title>requested_time_slot_id BIGINT REFERENCES time_slots(id)</title><rect x="4289" y="980" width="510" height="28" fill="#eef2f7"/><text x="4300" y="998.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK73</text><text x="4370" y="998.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">requested_time_slot_id</text><text x="4756" y="998.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="998.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="requested_classroom_id" data-row-top="1008" data-row-height="28"><title>requested_classroom_id BIGINT REFERENCES classrooms(id)</title><rect x="4289" y="1008" width="510" height="28" fill="#f8fafc"/><text x="4300" y="1026.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK74</text><text x="4370" y="1026.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">requested_classroom_id</text><text x="4756" y="1026.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1026.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reason" data-row-top="1036" data-row-height="28"><title>reason TEXT NOT NULL</title><rect x="4289" y="1036" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1054.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reason</text><text x="4756" y="1054.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="1054.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="1064" data-row-height="28"><title>status VARCHAR(20) NOT NULL</title><rect x="4289" y="1064" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1082.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4756" y="1082.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="1082.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="reviewed_by" data-row-top="1092" data-row-height="28"><title>reviewed_by BIGINT REFERENCES users(id)</title><rect x="4289" y="1092" width="510" height="28" fill="#eef2f7"/><text x="4300" y="1110.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK75</text><text x="4370" y="1110.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_by</text><text x="4756" y="1110.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1110.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="review_comment" data-row-top="1120" data-row-height="28"><title>review_comment TEXT</title><rect x="4289" y="1120" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1138.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">review_comment</text><text x="4756" y="1138.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="1138.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reviewed_at" data-row-top="1148" data-row-height="28"><title>reviewed_at TIMESTAMPTZ</title><rect x="4289" y="1148" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1166.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reviewed_at</text><text x="4756" y="1166.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="1166.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="applied_override_id" data-row-top="1176" data-row-height="28"><title>applied_override_id BIGINT REFERENCES schedule_overrides(id) ON DELETE SET NULL</title><rect x="4289" y="1176" width="510" height="28" fill="#f8fafc"/><text x="4300" y="1194.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK76</text><text x="4370" y="1194.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">applied_override_id</text><text x="4756" y="1194.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1194.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="1204" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="1204" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1222.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4756" y="1222.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="1222.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="updated_at" data-row-top="1232" data-row-height="28"><title>updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="1232" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1250.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">updated_at</text><text x="4756" y="1250.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="1250.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-teacher_change_request_history" data-table="teacher_change_request_history" tabindex="0" role="button" aria-label="teacher_change_request_history: История согласования заявки"><title>teacher_change_request_history: История согласования заявки
|
||
6 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="4288" y="1372" width="512" height="232" rx="6"/><path d="M 4294 1372 H 4794 Q 4800 1372 4800 1378 V 1436 H 4288 V 1378 Q 4288 1372 4294 1372 Z" fill="#e8edf3"/><text x="4304" y="1398" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">teacher_change_request_history</text><text x="4304" y="1420" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">История согласования заявки</text><g data-column="id" data-row-top="1436" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="4289" y="1436" width="510" height="28" fill="#eef2f7"/><text x="4300" y="1454.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="4370" y="1454.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="4756" y="1454.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="4782" y="1454.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="request_id" data-row-top="1464" data-row-height="28"><title>request_id BIGINT NOT NULL REFERENCES teacher_change_requests(id) ON DELETE CASCADE</title><rect x="4289" y="1464" width="510" height="28" fill="#f8fafc"/><text x="4300" y="1482.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK77</text><text x="4370" y="1482.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">request_id</text><text x="4756" y="1482.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1482.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="1492" data-row-height="28"><title>status VARCHAR(20) NOT NULL</title><rect x="4289" y="1492" width="510" height="28" fill="#eef2f7"/><text x="4370" y="1510.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="4756" y="1510.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="4782" y="1510.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="comment" data-row-top="1520" data-row-height="28"><title>comment TEXT</title><rect x="4289" y="1520" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1538.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">comment</text><text x="4756" y="1538.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="4782" y="1538.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="actor_id" data-row-top="1548" data-row-height="28"><title>actor_id BIGINT REFERENCES users(id)</title><rect x="4289" y="1548" width="510" height="28" fill="#eef2f7"/><text x="4300" y="1566.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK78</text><text x="4370" y="1566.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">actor_id</text><text x="4756" y="1566.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="4782" y="1566.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="1576" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="4289" y="1576" width="510" height="28" fill="#f8fafc"/><text x="4370" y="1594.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="4756" y="1594.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="4782" y="1594.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-schedule_versions" data-table="schedule_versions" tabindex="0" role="button" aria-label="schedule_versions: Версии расписания"><title>schedule_versions: Версии расписания
|
||
13 столбцов · 5 исходящих и 4 входящих FK</title><rect class="table-box" x="2880" y="152" width="512" height="460" rx="6"/><path d="M 2886 152 H 3386 Q 3392 152 3392 158 V 216 H 2880 V 158 Q 2880 152 2886 152 Z" fill="#e8edf3"/><text x="2896" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_versions</text><text x="2896" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Версии расписания</text><g data-column="id" data-row-top="216" data-row-height="60"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2881" y="216" width="510" height="60" fill="#eef2f7"/><text x="2892" y="250.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2962" y="250.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="3348" y="250.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="3374" y="250.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_id" data-row-top="276" data-row-height="28"><title>semester_id BIGINT NOT NULL REFERENCES semesters(id) ON DELETE CASCADE</title><rect x="2881" y="276" width="510" height="28" fill="#f8fafc"/><text x="2892" y="294.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK79</text><text x="2962" y="294.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_id</text><text x="3348" y="294.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="294.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="version_number" data-row-top="304" data-row-height="28"><title>version_number INT NOT NULL</title><rect x="2881" y="304" width="510" height="28" fill="#eef2f7"/><text x="2962" y="322.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">version_number</text><text x="3348" y="322.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="3374" y="322.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="name" data-row-top="332" data-row-height="28"><title>name VARCHAR(160) NOT NULL</title><rect x="2881" y="332" width="510" height="28" fill="#f8fafc"/><text x="2962" y="350.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">name</text><text x="3348" y="350.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(160)</text><text x="3374" y="350.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="status" data-row-top="360" data-row-height="28"><title>status VARCHAR(20) NOT NULL</title><rect x="2881" y="360" width="510" height="28" fill="#eef2f7"/><text x="2962" y="378.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">status</text><text x="3348" y="378.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="3374" y="378.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="based_on_version_id" data-row-top="388" data-row-height="28"><title>based_on_version_id BIGINT REFERENCES schedule_versions(id) ON DELETE SET NULL</title><rect x="2881" y="388" width="510" height="28" fill="#f8fafc"/><text x="2892" y="406.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK80</text><text x="2962" y="406.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">based_on_version_id</text><text x="3348" y="406.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="406.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="restored_from_version_id" data-row-top="416" data-row-height="28"><title>restored_from_version_id BIGINT REFERENCES schedule_versions(id) ON DELETE SET NULL</title><rect x="2881" y="416" width="510" height="28" fill="#eef2f7"/><text x="2892" y="434.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK81</text><text x="2962" y="434.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">restored_from_version_id</text><text x="3348" y="434.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="434.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="change_reason" data-row-top="444" data-row-height="28"><title>change_reason TEXT</title><rect x="2881" y="444" width="510" height="28" fill="#f8fafc"/><text x="2962" y="462.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">change_reason</text><text x="3348" y="462.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="3374" y="462.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_by" data-row-top="472" data-row-height="28"><title>created_by BIGINT REFERENCES users(id)</title><rect x="2881" y="472" width="510" height="28" fill="#eef2f7"/><text x="2892" y="490.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK82</text><text x="2962" y="490.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_by</text><text x="3348" y="490.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="490.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="500" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2881" y="500" width="510" height="28" fill="#f8fafc"/><text x="2962" y="518.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="3348" y="518.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="518.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="published_by" data-row-top="528" data-row-height="28"><title>published_by BIGINT REFERENCES users(id)</title><rect x="2881" y="528" width="510" height="28" fill="#eef2f7"/><text x="2892" y="546.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK83</text><text x="2962" y="546.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">published_by</text><text x="3348" y="546.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="546.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="published_at" data-row-top="556" data-row-height="28"><title>published_at TIMESTAMPTZ</title><rect x="2881" y="556" width="510" height="28" fill="#f8fafc"/><text x="2962" y="574.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">published_at</text><text x="3348" y="574.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="574.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="archived_at" data-row-top="584" data-row-height="28"><title>archived_at TIMESTAMPTZ</title><rect x="2881" y="584" width="510" height="28" fill="#eef2f7"/><text x="2962" y="602.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">archived_at</text><text x="3348" y="602.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="602.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-schedule_version_history" data-table="schedule_version_history" tabindex="0" role="button" aria-label="schedule_version_history: История версий расписания"><title>schedule_version_history: История версий расписания
|
||
6 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="2880" y="724" width="512" height="232" rx="6"/><path d="M 2886 724 H 3386 Q 3392 724 3392 730 V 788 H 2880 V 730 Q 2880 724 2886 724 Z" fill="#e8edf3"/><text x="2896" y="750" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">schedule_version_history</text><text x="2896" y="772" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">История версий расписания</text><g data-column="id" data-row-top="788" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="2881" y="788" width="510" height="28" fill="#eef2f7"/><text x="2892" y="806.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="2962" y="806.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="3348" y="806.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="3374" y="806.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="version_id" data-row-top="816" data-row-height="28"><title>version_id BIGINT NOT NULL REFERENCES schedule_versions(id) ON DELETE CASCADE</title><rect x="2881" y="816" width="510" height="28" fill="#f8fafc"/><text x="2892" y="834.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK85</text><text x="2962" y="834.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">version_id</text><text x="3348" y="834.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="834.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="action" data-row-top="844" data-row-height="28"><title>action VARCHAR(30) NOT NULL</title><rect x="2881" y="844" width="510" height="28" fill="#eef2f7"/><text x="2962" y="862.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">action</text><text x="3348" y="862.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(30)</text><text x="3374" y="862.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="actor_id" data-row-top="872" data-row-height="28"><title>actor_id BIGINT REFERENCES users(id)</title><rect x="2881" y="872" width="510" height="28" fill="#f8fafc"/><text x="2892" y="890.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK86</text><text x="2962" y="890.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">actor_id</text><text x="3348" y="890.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="3374" y="890.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="reason" data-row-top="900" data-row-height="28"><title>reason TEXT</title><rect x="2881" y="900" width="510" height="28" fill="#eef2f7"/><text x="2962" y="918.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">reason</text><text x="3348" y="918.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">text</text><text x="3374" y="918.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g><g data-column="created_at" data-row-top="928" data-row-height="28"><title>created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP</title><rect x="2881" y="928" width="510" height="28" fill="#f8fafc"/><text x="2962" y="946.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">created_at</text><text x="3348" y="946.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">timestamptz</text><text x="3374" y="946.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-study_plans" data-table="study_plans" tabindex="0" role="button" aria-label="study_plans: Учебные планы"><title>study_plans: Учебные планы
|
||
6 столбцов · 2 исходящих и 2 входящих FK</title><rect class="table-box" x="1472" y="152" width="512" height="240" rx="6"/><path d="M 1478 152 H 1978 Q 1984 152 1984 158 V 216 H 1472 V 158 Q 1472 152 1478 152 Z" fill="#e8edf3"/><text x="1488" y="178" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">study_plans</text><text x="1488" y="200" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Учебные планы</text><g data-column="id" data-row-top="216" data-row-height="36"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="216" width="510" height="36" fill="#eef2f7"/><text x="1484" y="238.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="238.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="238.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="238.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="title" data-row-top="252" data-row-height="28"><title>title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0)</title><rect x="1473" y="252" width="510" height="28" fill="#f8fafc"/><text x="1554" y="270.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">title</text><text x="1940" y="270.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(255)</text><text x="1966" y="270.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="specialty_profile_id" data-row-top="280" data-row-height="28"><title>specialty_profile_id BIGINT NOT NULL REFERENCES specialty_profiles(id)</title><rect x="1473" y="280" width="510" height="28" fill="#eef2f7"/><text x="1484" y="298.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK87</text><text x="1554" y="298.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">specialty_profile_id</text><text x="1940" y="298.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="298.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="education_form_id" data-row-top="308" data-row-height="28"><title>education_form_id BIGINT NOT NULL REFERENCES education_forms(id)</title><rect x="1473" y="308" width="510" height="28" fill="#f8fafc"/><text x="1484" y="326.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK88</text><text x="1554" y="326.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">education_form_id</text><text x="1940" y="326.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="326.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_number" data-row-top="336" data-row-height="28"><title>semester_number INT NOT NULL CONSTRAINT chk_study_plan_semester CHECK (semester_number BETWEEN 1 AND 20)</title><rect x="1473" y="336" width="510" height="28" fill="#eef2f7"/><text x="1554" y="354.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_number</text><text x="1940" y="354.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="354.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="revision" data-row-top="364" data-row-height="28"><title>revision BIGINT NOT NULL DEFAULT 0</title><rect x="1473" y="364" width="510" height="28" fill="#f8fafc"/><text x="1554" y="382.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">revision</text><text x="1940" y="382.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="382.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-study_plan_subjects" data-table="study_plan_subjects" tabindex="0" role="button" aria-label="study_plan_subjects: Дисциплины учебного плана"><title>study_plan_subjects: Дисциплины учебного плана
|
||
3 столбцов · 2 исходящих и 1 входящих FK</title><rect class="table-box" x="1472" y="504" width="512" height="148" rx="6"/><path d="M 1478 504 H 1978 Q 1984 504 1984 510 V 568 H 1472 V 510 Q 1472 504 1478 504 Z" fill="#e8edf3"/><text x="1488" y="530" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">study_plan_subjects</text><text x="1488" y="552" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Дисциплины учебного плана</text><g data-column="id" data-row-top="568" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="568" width="510" height="28" fill="#eef2f7"/><text x="1484" y="586.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="586.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="586.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="586.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="plan_id" data-row-top="596" data-row-height="28"><title>plan_id BIGINT NOT NULL REFERENCES study_plans(id) ON DELETE CASCADE</title><rect x="1473" y="596" width="510" height="28" fill="#f8fafc"/><text x="1484" y="614.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK89</text><text x="1554" y="614.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">plan_id</text><text x="1940" y="614.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="614.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="subject_id" data-row-top="624" data-row-height="28"><title>subject_id BIGINT NOT NULL REFERENCES subjects(id)</title><rect x="1473" y="624" width="510" height="28" fill="#eef2f7"/><text x="1484" y="642.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK90</text><text x="1554" y="642.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">subject_id</text><text x="1940" y="642.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="642.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g><g class="entity" id="table-study_plan_loads" data-table="study_plan_loads" tabindex="0" role="button" aria-label="study_plan_loads: Нагрузка учебного плана"><title>study_plan_loads: Нагрузка учебного плана
|
||
6 столбцов · 2 исходящих и 0 входящих FK</title><rect class="table-box" x="1472" y="764" width="512" height="232" rx="6"/><path d="M 1478 764 H 1978 Q 1984 764 1984 770 V 828 H 1472 V 770 Q 1472 764 1478 764 Z" fill="#e8edf3"/><text x="1488" y="790" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">study_plan_loads</text><text x="1488" y="812" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Нагрузка учебного плана</text><g data-column="id" data-row-top="828" data-row-height="28"><title>id BIGSERIAL PRIMARY KEY</title><rect x="1473" y="828" width="510" height="28" fill="#eef2f7"/><text x="1484" y="846.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK</text><text x="1554" y="846.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">id</text><text x="1940" y="846.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigserial</text><text x="1966" y="846.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="plan_subject_id" data-row-top="856" data-row-height="28"><title>plan_subject_id BIGINT NOT NULL REFERENCES study_plan_subjects(id) ON DELETE CASCADE</title><rect x="1473" y="856" width="510" height="28" fill="#f8fafc"/><text x="1484" y="874.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK91</text><text x="1554" y="874.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">plan_subject_id</text><text x="1940" y="874.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="874.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="category" data-row-top="884" data-row-height="28"><title>category VARCHAR(20) NOT NULL CONSTRAINT chk_study_plan_category CHECK (category IN ('LECTURE', 'PRACTICE', 'LABORATORY'))</title><rect x="1473" y="884" width="510" height="28" fill="#eef2f7"/><text x="1554" y="902.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">category</text><text x="1940" y="902.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">varchar(20)</text><text x="1966" y="902.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="academic_hours" data-row-top="912" data-row-height="28"><title>academic_hours INT NOT NULL CONSTRAINT chk_study_plan_hours CHECK (academic_hours BETWEEN 0 AND 100000 AND mod(academic_hours, 2) = 0)</title><rect x="1473" y="912" width="510" height="28" fill="#f8fafc"/><text x="1554" y="930.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">academic_hours</text><text x="1940" y="930.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">int</text><text x="1966" y="930.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="split_subgroups" data-row-top="940" data-row-height="28"><title>split_subgroups BOOLEAN NOT NULL DEFAULT FALSE</title><rect x="1473" y="940" width="510" height="28" fill="#eef2f7"/><text x="1554" y="958.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">split_subgroups</text><text x="1940" y="958.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">boolean</text><text x="1966" y="958.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="teacher_id" data-row-top="968" data-row-height="28"><title>teacher_id BIGINT REFERENCES users(id)</title><rect x="1473" y="968" width="510" height="28" fill="#f8fafc"/><text x="1484" y="986.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK92</text><text x="1554" y="986.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">teacher_id</text><text x="1940" y="986.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="986.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">○</text></g></g><g class="entity" id="table-student_group_plan_assignments" data-table="student_group_plan_assignments" tabindex="0" role="button" aria-label="student_group_plan_assignments: Назначения планов группам"><title>student_group_plan_assignments: Назначения планов группам
|
||
3 столбцов · 3 исходящих и 0 входящих FK</title><rect class="table-box" x="1472" y="1108" width="512" height="148" rx="6"/><path d="M 1478 1108 H 1978 Q 1984 1108 1984 1114 V 1172 H 1472 V 1114 Q 1472 1108 1478 1108 Z" fill="#e8edf3"/><text x="1488" y="1134" font-size="16" fill="#0f172a" font-weight="600" text-anchor="start" class="sans">student_group_plan_assignments</text><text x="1488" y="1156" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Назначения планов группам</text><g data-column="group_id" data-row-top="1172" data-row-height="28"><title>group_id BIGINT NOT NULL REFERENCES student_groups(id)</title><rect x="1473" y="1172" width="510" height="28" fill="#eef2f7"/><text x="1484" y="1190.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK93</text><text x="1554" y="1190.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">group_id</text><text x="1940" y="1190.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="1190.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="semester_id" data-row-top="1200" data-row-height="28"><title>semester_id BIGINT NOT NULL REFERENCES semesters(id)</title><rect x="1473" y="1200" width="510" height="28" fill="#f8fafc"/><text x="1484" y="1218.0" font-size="9" fill="#4f46e5" font-weight="400" text-anchor="start" class="mono">PK·FK94</text><text x="1554" y="1218.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">semester_id</text><text x="1940" y="1218.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="1218.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g><g data-column="plan_id" data-row-top="1228" data-row-height="28"><title>plan_id BIGINT NOT NULL REFERENCES study_plans(id)</title><rect x="1473" y="1228" width="510" height="28" fill="#eef2f7"/><text x="1484" y="1246.0" font-size="9" fill="#475569" font-weight="400" text-anchor="start" class="mono">FK95</text><text x="1554" y="1246.0" font-size="13" fill="#0f172a" font-weight="400" text-anchor="start" class="sans">plan_id</text><text x="1940" y="1246.0" font-size="11" fill="#475569" font-weight="400" text-anchor="end" class="mono">bigint</text><text x="1966" y="1246.0" font-size="10" fill="#475569" font-weight="400" text-anchor="middle" class="sans">●</text></g></g></g><text x="64" y="3792" font-size="13" fill="#475569" font-weight="400" text-anchor="start" class="sans">PK — первичный ключ FK01…FK105 — внешние ключи UQ — одиночный UNIQUE ● NOT NULL ○ NULL</text><text x="64" y="3820" font-size="13" fill="#475569" font-weight="400" text-anchor="start" class="sans">Каждая стрелка: столбец FK → столбец PK. Имя связи и ON DELETE доступны при наведении на линию или выборе таблицы.</text><text x="64" y="3848" font-size="12" fill="#475569" font-weight="400" text-anchor="start" class="sans">Составные FK показаны отдельными линиями столбцов с одним номером. version_group_id и semester_number не являются REFERENCES.</text></svg></div></main>
|
||
<aside id="inspector" class="inspector" hidden aria-label="Выбранная таблица"></aside>
|
||
<div class="hint" id="hint">Перетаскивайте полотно · Ctrl + колесо — масштаб · нажмите таблицу для связей · двойной щелчок — приблизить</div>
|
||
</div>
|
||
<footer class="status"><span id="status" role="status">Все 46 таблиц и 105 связей на одном полотне. Стрелки: FK → PK/UQ. ● NOT NULL · ○ NULL</span><span class="source">V1__init.sql · 83bad8887177</span></footer>
|
||
<noscript><style>.viewport{height:90vh}.canvas{width:max-content}</style><p class="fallback">JavaScript выключен: полная статическая схема доступна с прокруткой.</p></noscript>
|
||
<script id="schema-data" type="application/json">{"width": 4864, "height": 3884, "source": "V1__init.sql", "sha256": "83bad888717777e6a3c5fe44b3a5d74871b044314a6de72753648d8300358adb", "tables": {"departments": {"label": "Кафедры", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": true, "ddl": "id BIGSERIAL UNIQUE PRIMARY KEY NOT NULL"}, "name": {"name": "name", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(255) NOT NULL"}, "code": {"name": "code", "type": "BIGINT", "pk": false, "nn": true, "uq": true, "ddl": "code BIGINT UNIQUE NOT NULL"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "departments", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 96}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_departments_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_departments_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_departments_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_departments_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_departments_status ON departments(status)"], "x": 2176, "y": 980, "width": 512, "height": 348, "rows": {"id": {"top": 1044, "height": 60, "center": 1074.0}, "name": {"top": 1104, "height": 28, "center": 1118.0}, "code": {"top": 1132, "height": 28, "center": 1146.0}, "status": {"top": 1160, "height": 28, "center": 1174.0}, "active_from": {"top": 1188, "height": 28, "center": 1202.0}, "active_to": {"top": 1216, "height": 28, "center": 1230.0}, "archived_at": {"top": 1244, "height": 28, "center": 1258.0}, "archived_by": {"top": 1272, "height": 28, "center": 1286.0}, "archive_reason": {"top": 1300, "height": 28, "center": 1314.0}}, "column": 3}, "specialties": {"label": "Направления подготовки", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(255) NOT NULL"}, "specialty_code": {"name": "specialty_code", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": true, "ddl": "specialty_code VARCHAR(255) UNIQUE NOT NULL"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "specialties", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 97}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_specialties_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_specialties_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_specialties_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_specialties_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_specialties_status ON specialties(status)"], "x": 64, "y": 152, "width": 512, "height": 336, "rows": {"id": {"top": 216, "height": 48, "center": 240.0}, "name": {"top": 264, "height": 28, "center": 278.0}, "specialty_code": {"top": 292, "height": 28, "center": 306.0}, "status": {"top": 320, "height": 28, "center": 334.0}, "active_from": {"top": 348, "height": 28, "center": 362.0}, "active_to": {"top": 376, "height": 28, "center": 390.0}, "archived_at": {"top": 404, "height": 28, "center": 418.0}, "archived_by": {"top": 432, "height": 28, "center": 446.0}, "archive_reason": {"top": 460, "height": 28, "center": 474.0}}, "column": 0}, "specialty_profiles": {"label": "Профили подготовки", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "specialty_id": {"name": "specialty_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_id BIGINT NOT NULL REFERENCES specialties(id) ON DELETE CASCADE", "fks": [{"source": "specialty_profiles", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 1}]}, "name": {"name": "name", "type": "VARCHAR(500)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(500) NOT NULL"}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "specialty_profiles", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 98}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT uq_specialty_profiles_name UNIQUE (specialty_id, name)", "CONSTRAINT uq_specialty_profiles_id_specialty UNIQUE (id, specialty_id)", "CONSTRAINT chk_specialty_profiles_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_specialty_profiles_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_specialty_profiles_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_specialty_profiles_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_specialty_profiles_status ON specialty_profiles(status)"], "x": 64, "y": 600, "width": 512, "height": 412, "rows": {"id": {"top": 664, "height": 48, "center": 688.0}, "specialty_id": {"top": 712, "height": 48, "center": 736.0}, "name": {"top": 760, "height": 28, "center": 774.0}, "description": {"top": 788, "height": 28, "center": 802.0}, "created_at": {"top": 816, "height": 28, "center": 830.0}, "status": {"top": 844, "height": 28, "center": 858.0}, "active_from": {"top": 872, "height": 28, "center": 886.0}, "active_to": {"top": 900, "height": 28, "center": 914.0}, "archived_at": {"top": 928, "height": 28, "center": 942.0}, "archived_by": {"top": 956, "height": 28, "center": 970.0}, "archive_reason": {"top": 984, "height": 28, "center": 998.0}}, "column": 0}, "users": {"label": "Пользователи", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "username": {"name": "username", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": true, "ddl": "username VARCHAR(50) UNIQUE NOT NULL"}, "password": {"name": "password", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "password VARCHAR(255) NOT NULL"}, "role": {"name": "role", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "role VARCHAR(30) NOT NULL DEFAULT 'STUDENT'"}, "full_name": {"name": "full_name", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "full_name VARCHAR(255) NOT NULL"}, "job_title": {"name": "job_title", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "job_title VARCHAR(255) NOT NULL"}, "department_id": {"name": "department_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "department_id BIGINT NOT NULL REFERENCES departments(id)", "fks": [{"source": "users", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 2}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "users", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 99}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_users_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_users_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_users_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_users_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL", "CONSTRAINT chk_users_role CHECK (role IN ('ADMIN', 'EDUCATION_OFFICE', 'DEPARTMENT', 'SCHEDULE_VIEWER', 'TEACHER', 'STUDENT'))"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_users_status ON users(status)"], "x": 2176, "y": 1440, "width": 512, "height": 840, "rows": {"id": {"top": 1504, "height": 384, "center": 1696.0}, "username": {"top": 1888, "height": 28, "center": 1902.0}, "password": {"top": 1916, "height": 28, "center": 1930.0}, "role": {"top": 1944, "height": 28, "center": 1958.0}, "full_name": {"top": 1972, "height": 28, "center": 1986.0}, "job_title": {"top": 2000, "height": 28, "center": 2014.0}, "department_id": {"top": 2028, "height": 28, "center": 2042.0}, "created_at": {"top": 2056, "height": 28, "center": 2070.0}, "updated_at": {"top": 2084, "height": 28, "center": 2098.0}, "status": {"top": 2112, "height": 28, "center": 2126.0}, "active_from": {"top": 2140, "height": 28, "center": 2154.0}, "active_to": {"top": 2168, "height": 28, "center": 2182.0}, "archived_at": {"top": 2196, "height": 28, "center": 2210.0}, "archived_by": {"top": 2224, "height": 28, "center": 2238.0}, "archive_reason": {"top": 2252, "height": 28, "center": 2266.0}}, "column": 3}, "auth_refresh_tokens": {"label": "Refresh-токены", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "user_id": {"name": "user_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE", "fks": [{"source": "auth_refresh_tokens", "columns": ["user_id"], "column": "user_id", "target": "users", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 3}]}, "tenant": {"name": "tenant", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "tenant VARCHAR(100) NOT NULL"}, "token_hash": {"name": "token_hash", "type": "VARCHAR(64)", "pk": false, "nn": true, "uq": true, "ddl": "token_hash VARCHAR(64) UNIQUE NOT NULL"}, "issued_at": {"name": "issued_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "issued_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "expires_at": {"name": "expires_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "expires_at TIMESTAMPTZ NOT NULL"}, "revoked_at": {"name": "revoked_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "revoked_at TIMESTAMPTZ"}, "rotated_to_token_hash": {"name": "rotated_to_token_hash", "type": "VARCHAR(64)", "pk": false, "nn": false, "uq": false, "ddl": "rotated_to_token_hash VARCHAR(64)"}, "user_agent": {"name": "user_agent", "type": "VARCHAR(512)", "pk": false, "nn": false, "uq": false, "ddl": "user_agent VARCHAR(512)"}, "ip_address": {"name": "ip_address", "type": "VARCHAR(64)", "pk": false, "nn": false, "uq": false, "ddl": "ip_address VARCHAR(64)"}}, "constraints": [], "indexes": ["CREATE INDEX IF NOT EXISTS idx_auth_refresh_tokens_user ON auth_refresh_tokens(user_id)", "CREATE INDEX IF NOT EXISTS idx_auth_refresh_tokens_tenant_expires ON auth_refresh_tokens(tenant, expires_at)", "CREATE INDEX IF NOT EXISTS idx_auth_refresh_tokens_cleanup_expires ON auth_refresh_tokens(expires_at)", "CREATE INDEX IF NOT EXISTS idx_auth_refresh_tokens_cleanup_revoked ON auth_refresh_tokens(revoked_at) WHERE revoked_at IS NOT NULL"], "x": 2176, "y": 2392, "width": 512, "height": 344, "rows": {"id": {"top": 2456, "height": 28, "center": 2470.0}, "user_id": {"top": 2484, "height": 28, "center": 2498.0}, "tenant": {"top": 2512, "height": 28, "center": 2526.0}, "token_hash": {"top": 2540, "height": 28, "center": 2554.0}, "issued_at": {"top": 2568, "height": 28, "center": 2582.0}, "expires_at": {"top": 2596, "height": 28, "center": 2610.0}, "revoked_at": {"top": 2624, "height": 28, "center": 2638.0}, "rotated_to_token_hash": {"top": 2652, "height": 28, "center": 2666.0}, "user_agent": {"top": 2680, "height": 28, "center": 2694.0}, "ip_address": {"top": 2708, "height": 28, "center": 2722.0}}, "column": 3}, "auth_login_rate_limits": {"label": "Ограничение попыток входа", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "tenant": {"name": "tenant", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "tenant VARCHAR(100) NOT NULL"}, "username_normalized": {"name": "username_normalized", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "username_normalized VARCHAR(100) NOT NULL"}, "client_ip": {"name": "client_ip", "type": "VARCHAR(64)", "pk": false, "nn": true, "uq": false, "ddl": "client_ip VARCHAR(64) NOT NULL"}, "failure_count": {"name": "failure_count", "type": "INTEGER", "pk": false, "nn": true, "uq": false, "ddl": "failure_count INTEGER NOT NULL DEFAULT 0"}, "window_started_at": {"name": "window_started_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "window_started_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "last_failure_at": {"name": "last_failure_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "last_failure_at TIMESTAMPTZ"}, "blocked_until": {"name": "blocked_until", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "blocked_until TIMESTAMPTZ"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT uq_auth_login_rate_limit_key UNIQUE (tenant, username_normalized, client_ip)", "CONSTRAINT chk_auth_login_rate_limit_failure_count CHECK (failure_count >= 0)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_auth_login_rate_limits_blocked_until ON auth_login_rate_limits(blocked_until) WHERE blocked_until IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_auth_login_rate_limits_updated_at ON auth_login_rate_limits(updated_at, id)"], "x": 2176, "y": 152, "width": 512, "height": 344, "rows": {"id": {"top": 216, "height": 28, "center": 230.0}, "tenant": {"top": 244, "height": 28, "center": 258.0}, "username_normalized": {"top": 272, "height": 28, "center": 286.0}, "client_ip": {"top": 300, "height": 28, "center": 314.0}, "failure_count": {"top": 328, "height": 28, "center": 342.0}, "window_started_at": {"top": 356, "height": 28, "center": 370.0}, "last_failure_at": {"top": 384, "height": 28, "center": 398.0}, "blocked_until": {"top": 412, "height": 28, "center": 426.0}, "created_at": {"top": 440, "height": 28, "center": 454.0}, "updated_at": {"top": 468, "height": 28, "center": 482.0}}, "column": 3}, "auth_login_attempt_audit": {"label": "Аудит неудачных входов", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "tenant": {"name": "tenant", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "tenant VARCHAR(100) NOT NULL"}, "username_normalized": {"name": "username_normalized", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "username_normalized VARCHAR(100) NOT NULL"}, "client_ip": {"name": "client_ip", "type": "VARCHAR(64)", "pk": false, "nn": true, "uq": false, "ddl": "client_ip VARCHAR(64) NOT NULL"}, "outcome": {"name": "outcome", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "outcome VARCHAR(20) NOT NULL"}, "occurred_at": {"name": "occurred_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "occurred_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "retry_after_seconds": {"name": "retry_after_seconds", "type": "INTEGER", "pk": false, "nn": false, "uq": false, "ddl": "retry_after_seconds INTEGER"}}, "constraints": ["CONSTRAINT chk_auth_login_attempt_audit_outcome CHECK (outcome IN ('FAILURE', 'BLOCKED'))", "CONSTRAINT chk_auth_login_attempt_audit_retry_after CHECK (retry_after_seconds IS NULL OR retry_after_seconds > 0)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_auth_login_attempt_audit_occurred ON auth_login_attempt_audit(occurred_at, id)", "CREATE INDEX IF NOT EXISTS idx_auth_login_attempt_audit_key ON auth_login_attempt_audit(tenant, username_normalized, client_ip, occurred_at DESC)"], "x": 2176, "y": 608, "width": 512, "height": 260, "rows": {"id": {"top": 672, "height": 28, "center": 686.0}, "tenant": {"top": 700, "height": 28, "center": 714.0}, "username_normalized": {"top": 728, "height": 28, "center": 742.0}, "client_ip": {"top": 756, "height": 28, "center": 770.0}, "outcome": {"top": 784, "height": 28, "center": 798.0}, "occurred_at": {"top": 812, "height": 28, "center": 826.0}, "retry_after_seconds": {"top": 840, "height": 28, "center": 854.0}}, "column": 3}, "teacher_department_assignments": {"label": "История принадлежности к кафедрам", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "teacher_id BIGINT NOT NULL REFERENCES users(id)", "fks": [{"source": "teacher_department_assignments", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 4}]}, "department_id": {"name": "department_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "department_id BIGINT NOT NULL REFERENCES departments(id)", "fks": [{"source": "teacher_department_assignments", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 5}]}, "valid_from": {"name": "valid_from", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "valid_from DATE NOT NULL"}, "valid_to": {"name": "valid_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "valid_to DATE"}, "is_primary": {"name": "is_primary", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "is_primary BOOLEAN NOT NULL DEFAULT TRUE"}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "created_by": {"name": "created_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "created_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_department_assignments", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 6}]}}, "constraints": ["CONSTRAINT chk_teacher_department_dates CHECK (valid_to IS NULL OR valid_to >= valid_from)", "CONSTRAINT ex_teacher_primary_department_no_overlap EXCLUDE USING gist ( teacher_id WITH =, (daterange(valid_from, COALESCE(valid_to, 'infinity'::DATE), '[]')) WITH && ) WHERE (is_primary = TRUE)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_teacher_department_teacher_dates ON teacher_department_assignments(teacher_id, valid_from, valid_to)", "CREATE INDEX IF NOT EXISTS idx_teacher_department_department_dates ON teacher_department_assignments(department_id, valid_from, valid_to)", "CREATE UNIQUE INDEX IF NOT EXISTS uq_teacher_department_open_primary ON teacher_department_assignments(teacher_id) WHERE is_primary = TRUE AND valid_to IS NULL", "CREATE UNIQUE INDEX IF NOT EXISTS uq_teacher_department_open_pair ON teacher_department_assignments(teacher_id, department_id) WHERE valid_to IS NULL"], "x": 2176, "y": 2848, "width": 512, "height": 316, "rows": {"id": {"top": 2912, "height": 28, "center": 2926.0}, "teacher_id": {"top": 2940, "height": 28, "center": 2954.0}, "department_id": {"top": 2968, "height": 28, "center": 2982.0}, "valid_from": {"top": 2996, "height": 28, "center": 3010.0}, "valid_to": {"top": 3024, "height": 28, "center": 3038.0}, "is_primary": {"top": 3052, "height": 28, "center": 3066.0}, "comment": {"top": 3080, "height": 28, "center": 3094.0}, "created_at": {"top": 3108, "height": 28, "center": 3122.0}, "created_by": {"top": 3136, "height": 28, "center": 3150.0}}, "column": 3}, "teacher_creation_requests": {"label": "Заявки на создание преподавателя", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "department_id": {"name": "department_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "department_id BIGINT NOT NULL REFERENCES departments(id)", "fks": [{"source": "teacher_creation_requests", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 7}]}, "username": {"name": "username", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": false, "ddl": "username VARCHAR(50) NOT NULL"}, "full_name": {"name": "full_name", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "full_name VARCHAR(255) NOT NULL"}, "job_title": {"name": "job_title", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "job_title VARCHAR(255) NOT NULL"}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'PENDING'"}, "requested_by": {"name": "requested_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "requested_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_creation_requests", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 8}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "reviewed_by": {"name": "reviewed_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_creation_requests", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 9}]}, "reviewed_at": {"name": "reviewed_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_at TIMESTAMPTZ"}, "review_comment": {"name": "review_comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "review_comment TEXT"}, "created_teacher_id": {"name": "created_teacher_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "created_teacher_id BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_creation_requests", "columns": ["created_teacher_id"], "column": "created_teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 10}]}}, "constraints": ["CONSTRAINT chk_teacher_creation_request_status CHECK (status IN ('PENDING', 'APPROVED', 'REJECTED'))"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_teacher_creation_requests_department ON teacher_creation_requests(department_id, created_at DESC)", "CREATE INDEX IF NOT EXISTS idx_teacher_creation_requests_status ON teacher_creation_requests(status, created_at DESC)", "CREATE UNIQUE INDEX IF NOT EXISTS uq_teacher_creation_requests_pending_username ON teacher_creation_requests(username) WHERE status = 'PENDING'"], "x": 2176, "y": 3276, "width": 512, "height": 456, "rows": {"id": {"top": 3340, "height": 28, "center": 3354.0}, "department_id": {"top": 3368, "height": 28, "center": 3382.0}, "username": {"top": 3396, "height": 28, "center": 3410.0}, "full_name": {"top": 3424, "height": 28, "center": 3438.0}, "job_title": {"top": 3452, "height": 28, "center": 3466.0}, "comment": {"top": 3480, "height": 28, "center": 3494.0}, "status": {"top": 3508, "height": 28, "center": 3522.0}, "requested_by": {"top": 3536, "height": 28, "center": 3550.0}, "created_at": {"top": 3564, "height": 28, "center": 3578.0}, "updated_at": {"top": 3592, "height": 28, "center": 3606.0}, "reviewed_by": {"top": 3620, "height": 28, "center": 3634.0}, "reviewed_at": {"top": 3648, "height": 28, "center": 3662.0}, "review_comment": {"top": 3676, "height": 28, "center": 3690.0}, "created_teacher_id": {"top": 3704, "height": 28, "center": 3718.0}}, "column": 3}, "education_forms": {"label": "Формы обучения", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": true, "ddl": "name VARCHAR(100) UNIQUE NOT NULL"}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "education_forms", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 100}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_education_forms_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_education_forms_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_education_forms_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_education_forms_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_education_forms_status ON education_forms(status)"], "x": 64, "y": 1124, "width": 512, "height": 364, "rows": {"id": {"top": 1188, "height": 48, "center": 1212.0}, "name": {"top": 1236, "height": 28, "center": 1250.0}, "description": {"top": 1264, "height": 28, "center": 1278.0}, "created_at": {"top": 1292, "height": 28, "center": 1306.0}, "status": {"top": 1320, "height": 28, "center": 1334.0}, "active_from": {"top": 1348, "height": 28, "center": 1362.0}, "active_to": {"top": 1376, "height": 28, "center": 1390.0}, "archived_at": {"top": 1404, "height": 28, "center": 1418.0}, "archived_by": {"top": 1432, "height": 28, "center": 1446.0}, "archive_reason": {"top": 1460, "height": 28, "center": 1474.0}}, "column": 0}, "student_groups": {"label": "Студенческие группы", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(100) NOT NULL"}, "group_size": {"name": "group_size", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "group_size BIGINT NOT NULL CONSTRAINT chk_student_groups_group_size_positive CHECK (group_size > 0)"}, "education_form_id": {"name": "education_form_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "education_form_id BIGINT NOT NULL REFERENCES education_forms(id)", "fks": [{"source": "student_groups", "columns": ["education_form_id"], "column": "education_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 11}]}, "department_id": {"name": "department_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "department_id BIGINT NOT NULL REFERENCES departments(id)", "fks": [{"source": "student_groups", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 12}]}, "specialty_id": {"name": "specialty_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_id BIGINT NOT NULL REFERENCES specialties(id)", "fks": [{"source": "student_groups", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 13}, {"source": "student_groups", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 14}]}, "specialty_profile_id": {"name": "specialty_profile_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_profile_id BIGINT NOT NULL", "fks": [{"source": "student_groups", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 14}]}, "year_start_study": {"name": "year_start_study", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "year_start_study BIGINT NOT NULL CONSTRAINT chk_student_groups_year_start_positive CHECK (year_start_study > 0)"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "student_groups", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 101}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT fk_student_groups_profile_specialty FOREIGN KEY (specialty_profile_id, specialty_id) REFERENCES specialty_profiles(id, specialty_id)", "CONSTRAINT chk_student_groups_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_student_groups_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_student_groups_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_student_groups_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_student_groups_status ON student_groups(status)", "CREATE INDEX idx_student_groups_profile_specialty ON student_groups(specialty_profile_id, specialty_id)"], "x": 64, "y": 1600, "width": 512, "height": 524, "rows": {"id": {"top": 1664, "height": 60, "center": 1694.0}, "name": {"top": 1724, "height": 28, "center": 1738.0}, "group_size": {"top": 1752, "height": 28, "center": 1766.0}, "education_form_id": {"top": 1780, "height": 28, "center": 1794.0}, "department_id": {"top": 1808, "height": 28, "center": 1822.0}, "specialty_id": {"top": 1836, "height": 36, "center": 1854.0}, "specialty_profile_id": {"top": 1872, "height": 28, "center": 1886.0}, "year_start_study": {"top": 1900, "height": 28, "center": 1914.0}, "created_at": {"top": 1928, "height": 28, "center": 1942.0}, "status": {"top": 1956, "height": 28, "center": 1970.0}, "active_from": {"top": 1984, "height": 28, "center": 1998.0}, "active_to": {"top": 2012, "height": 28, "center": 2026.0}, "archived_at": {"top": 2040, "height": 28, "center": 2054.0}, "archived_by": {"top": 2068, "height": 28, "center": 2082.0}, "archive_reason": {"top": 2096, "height": 28, "center": 2110.0}}, "column": 0}, "subgroups": {"label": "Подгруппы", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "group_id": {"name": "group_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE", "fks": [{"source": "subgroups", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 15}]}, "name": {"name": "name", "type": "VARCHAR(100)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(100) NOT NULL"}, "student_capacity": {"name": "student_capacity", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "student_capacity INT NOT NULL CONSTRAINT chk_subgroups_student_capacity_positive CHECK (student_capacity > 0)"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "subgroups", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 102}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_subgroups_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_subgroups_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_subgroups_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_subgroups_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_subgroups_status ON subgroups(status)", "CREATE UNIQUE INDEX IF NOT EXISTS ux_subgroups_active_group_name ON subgroups (group_id, lower(name)) WHERE status \u003c> 'ARCHIVED'"], "x": 64, "y": 2236, "width": 512, "height": 344, "rows": {"id": {"top": 2300, "height": 28, "center": 2314.0}, "group_id": {"top": 2328, "height": 28, "center": 2342.0}, "name": {"top": 2356, "height": 28, "center": 2370.0}, "student_capacity": {"top": 2384, "height": 28, "center": 2398.0}, "status": {"top": 2412, "height": 28, "center": 2426.0}, "active_from": {"top": 2440, "height": 28, "center": 2454.0}, "active_to": {"top": 2468, "height": 28, "center": 2482.0}, "archived_at": {"top": 2496, "height": 28, "center": 2510.0}, "archived_by": {"top": 2524, "height": 28, "center": 2538.0}, "archive_reason": {"top": 2552, "height": 28, "center": 2566.0}}, "column": 0}, "subjects": {"label": "Дисциплины", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(200)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(200) NOT NULL"}, "code": {"name": "code", "type": "VARCHAR(20)", "pk": false, "nn": false, "uq": false, "ddl": "code VARCHAR(20)"}, "department_id": {"name": "department_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "department_id BIGINT NOT NULL REFERENCES departments(id)", "fks": [{"source": "subjects", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 16}]}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "subjects", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 103}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_subjects_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_subjects_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_subjects_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_subjects_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE UNIQUE INDEX IF NOT EXISTS uq_subjects_name_ci ON subjects (LOWER(name))", "CREATE INDEX IF NOT EXISTS idx_subjects_status ON subjects(status)"], "x": 3584, "y": 152, "width": 512, "height": 420, "rows": {"id": {"top": 216, "height": 48, "center": 240.0}, "name": {"top": 264, "height": 28, "center": 278.0}, "code": {"top": 292, "height": 28, "center": 306.0}, "department_id": {"top": 320, "height": 28, "center": 334.0}, "description": {"top": 348, "height": 28, "center": 362.0}, "created_at": {"top": 376, "height": 28, "center": 390.0}, "status": {"top": 404, "height": 28, "center": 418.0}, "active_from": {"top": 432, "height": 28, "center": 446.0}, "active_to": {"top": 460, "height": 28, "center": 474.0}, "archived_at": {"top": 488, "height": 28, "center": 502.0}, "archived_by": {"top": 516, "height": 28, "center": 530.0}, "archive_reason": {"top": 544, "height": 28, "center": 558.0}}, "column": 5}, "subject_comments": {"label": "Комментарии к дисциплинам", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "subject_id": {"name": "subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "subject_id BIGINT NOT NULL REFERENCES subjects(id)", "fks": [{"source": "subject_comments", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 17}]}, "author_id": {"name": "author_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "author_id BIGINT REFERENCES users(id)", "fks": [{"source": "subject_comments", "columns": ["author_id"], "column": "author_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 18}]}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": true, "uq": false, "ddl": "comment TEXT NOT NULL"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": [], "indexes": ["CREATE INDEX IF NOT EXISTS idx_subject_comments_subject ON subject_comments(subject_id, created_at DESC)"], "x": 3584, "y": 1400, "width": 512, "height": 204, "rows": {"id": {"top": 1464, "height": 28, "center": 1478.0}, "subject_id": {"top": 1492, "height": 28, "center": 1506.0}, "author_id": {"top": 1520, "height": 28, "center": 1534.0}, "comment": {"top": 1548, "height": 28, "center": 1562.0}, "created_at": {"top": 1576, "height": 28, "center": 1590.0}}, "column": 5}, "lesson_types": {"label": "Виды занятий", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": true, "ddl": "name VARCHAR(50) UNIQUE NOT NULL"}, "code": {"name": "code", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": true, "ddl": "code VARCHAR(30) NOT NULL UNIQUE CONSTRAINT chk_lesson_types_code CHECK (code ~ '^[A-Z][A-Z0-9_]*$')"}, "color_code": {"name": "color_code", "type": "VARCHAR(7)", "pk": false, "nn": false, "uq": false, "ddl": "color_code VARCHAR(7) DEFAULT '#3788d8'"}, "duration_minutes": {"name": "duration_minutes", "type": "INT", "pk": false, "nn": false, "uq": false, "ddl": "duration_minutes INT DEFAULT 90"}}, "constraints": [], "indexes": [], "x": 3584, "y": 684, "width": 512, "height": 204, "rows": {"id": {"top": 748, "height": 28, "center": 762.0}, "name": {"top": 776, "height": 28, "center": 790.0}, "code": {"top": 804, "height": 28, "center": 818.0}, "color_code": {"top": 832, "height": 28, "center": 846.0}, "duration_minutes": {"top": 860, "height": 28, "center": 874.0}}, "column": 5}, "equipments": {"label": "Оборудование", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": true, "ddl": "name VARCHAR(50) UNIQUE NOT NULL"}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}, "inventory_number": {"name": "inventory_number", "type": "VARCHAR(50)", "pk": false, "nn": false, "uq": false, "ddl": "inventory_number VARCHAR(50)"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "equipments", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 104}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_equipments_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_equipments_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_equipments_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_equipments_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_equipments_status ON equipments(status)"], "x": 3584, "y": 2304, "width": 512, "height": 344, "rows": {"id": {"top": 2368, "height": 28, "center": 2382.0}, "name": {"top": 2396, "height": 28, "center": 2410.0}, "description": {"top": 2424, "height": 28, "center": 2438.0}, "inventory_number": {"top": 2452, "height": 28, "center": 2466.0}, "status": {"top": 2480, "height": 28, "center": 2494.0}, "active_from": {"top": 2508, "height": 28, "center": 2522.0}, "active_to": {"top": 2536, "height": 28, "center": 2550.0}, "archived_at": {"top": 2564, "height": 28, "center": 2578.0}, "archived_by": {"top": 2592, "height": 28, "center": 2606.0}, "archive_reason": {"top": 2620, "height": 28, "center": 2634.0}}, "column": 5}, "classrooms": {"label": "Аудитории", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "name": {"name": "name", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": true, "ddl": "name VARCHAR(50) UNIQUE NOT NULL"}, "capacity": {"name": "capacity", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "capacity INT NOT NULL CHECK (capacity > 0)"}, "building": {"name": "building", "type": "VARCHAR(50)", "pk": false, "nn": false, "uq": false, "ddl": "building VARCHAR(50)"}, "floor": {"name": "floor", "type": "INT", "pk": false, "nn": false, "uq": false, "ddl": "floor INT"}, "is_available": {"name": "is_available", "type": "BOOLEAN", "pk": false, "nn": false, "uq": false, "ddl": "is_available BOOLEAN DEFAULT TRUE"}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "active_from": {"name": "active_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_from DATE"}, "active_to": {"name": "active_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "active_to DATE"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}, "archived_by": {"name": "archived_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "archived_by BIGINT", "fks": [{"source": "classrooms", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 105}]}, "archive_reason": {"name": "archive_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "archive_reason TEXT"}}, "constraints": ["CONSTRAINT chk_classrooms_lifecycle_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))", "CONSTRAINT chk_classrooms_lifecycle_period CHECK ( status = 'ARCHIVED' OR active_from IS NULL OR active_to IS NULL OR active_from \u003c= active_to )", "CONSTRAINT chk_classrooms_lifecycle_archive CHECK ( (status = 'ARCHIVED' AND archived_at IS NOT NULL) OR (status \u003c> 'ARCHIVED' AND archived_at IS NULL AND archived_by IS NULL AND archive_reason IS NULL) )", "CONSTRAINT fk_classrooms_archived_by FOREIGN KEY (archived_by) REFERENCES users(id) ON DELETE SET NULL"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_classrooms_status ON classrooms(status)"], "x": 3584, "y": 1716, "width": 512, "height": 476, "rows": {"id": {"top": 1780, "height": 48, "center": 1804.0}, "name": {"top": 1828, "height": 28, "center": 1842.0}, "capacity": {"top": 1856, "height": 28, "center": 1870.0}, "building": {"top": 1884, "height": 28, "center": 1898.0}, "floor": {"top": 1912, "height": 28, "center": 1926.0}, "is_available": {"top": 1940, "height": 28, "center": 1954.0}, "description": {"top": 1968, "height": 28, "center": 1982.0}, "created_at": {"top": 1996, "height": 28, "center": 2010.0}, "status": {"top": 2024, "height": 28, "center": 2038.0}, "active_from": {"top": 2052, "height": 28, "center": 2066.0}, "active_to": {"top": 2080, "height": 28, "center": 2094.0}, "archived_at": {"top": 2108, "height": 28, "center": 2122.0}, "archived_by": {"top": 2136, "height": 28, "center": 2150.0}, "archive_reason": {"top": 2164, "height": 28, "center": 2178.0}}, "column": 5}, "classroom_equipments": {"label": "Оснащение аудиторий", "columns": {"classroom_id": {"name": "classroom_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "classroom_id BIGINT NOT NULL REFERENCES classrooms(id) ON DELETE CASCADE", "fks": [{"source": "classroom_equipments", "columns": ["classroom_id"], "column": "classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 19}]}, "equipment_id": {"name": "equipment_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "equipment_id BIGINT NOT NULL REFERENCES equipments(id) ON DELETE CASCADE", "fks": [{"source": "classroom_equipments", "columns": ["equipment_id"], "column": "equipment_id", "target": "equipments", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 20}]}, "quantity": {"name": "quantity", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "quantity INT NOT NULL DEFAULT 1 CHECK (quantity > 0)"}, "notes": {"name": "notes", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "notes TEXT"}}, "constraints": ["PRIMARY KEY (classroom_id, equipment_id)"], "indexes": ["CREATE INDEX idx_classroom_equipments_equipment ON classroom_equipments(equipment_id)"], "x": 3584, "y": 2760, "width": 512, "height": 176, "rows": {"classroom_id": {"top": 2824, "height": 28, "center": 2838.0}, "equipment_id": {"top": 2852, "height": 28, "center": 2866.0}, "quantity": {"top": 2880, "height": 28, "center": 2894.0}, "notes": {"top": 2908, "height": 28, "center": 2922.0}}, "column": 5}, "teacher_subjects": {"label": "Закрепление дисциплин за преподавателями", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "user_id": {"name": "user_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE", "fks": [{"source": "teacher_subjects", "columns": ["user_id"], "column": "user_id", "target": "users", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 21}]}, "subject_id": {"name": "subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "subject_id BIGINT NOT NULL REFERENCES subjects(id) ON DELETE CASCADE", "fks": [{"source": "teacher_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 22}]}, "academic_year_id": {"name": "academic_year_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "academic_year_id BIGINT", "fks": [{"source": "teacher_subjects", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 26}]}, "semester_number": {"name": "semester_number", "type": "INT", "pk": false, "nn": false, "uq": false, "ddl": "semester_number INT"}, "lesson_type_id": {"name": "lesson_type_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "lesson_type_id BIGINT NOT NULL REFERENCES lesson_types(id) ON DELETE CASCADE", "fks": [{"source": "teacher_subjects", "columns": ["lesson_type_id"], "column": "lesson_type_id", "target": "lesson_types", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 23}]}, "qualification_level": {"name": "qualification_level", "type": "VARCHAR(50)", "pk": false, "nn": false, "uq": false, "ddl": "qualification_level VARCHAR(50)"}, "experience_years": {"name": "experience_years", "type": "INT", "pk": false, "nn": false, "uq": false, "ddl": "experience_years INT"}}, "constraints": ["CONSTRAINT chk_teacher_subjects_semester_positive CHECK (semester_number IS NULL OR semester_number > 0)", "CONSTRAINT uq_teacher_subjects_binding UNIQUE NULLS NOT DISTINCT (user_id, subject_id, academic_year_id, semester_number, lesson_type_id)", "CONSTRAINT fk_teacher_subjects_academic_year FOREIGN KEY (academic_year_id) REFERENCES academic_years(id) ON DELETE CASCADE"], "indexes": ["CREATE INDEX idx_teacher_subjects_subject ON teacher_subjects(subject_id)"], "x": 3584, "y": 1000, "width": 512, "height": 288, "rows": {"id": {"top": 1064, "height": 28, "center": 1078.0}, "user_id": {"top": 1092, "height": 28, "center": 1106.0}, "subject_id": {"top": 1120, "height": 28, "center": 1134.0}, "academic_year_id": {"top": 1148, "height": 28, "center": 1162.0}, "semester_number": {"top": 1176, "height": 28, "center": 1190.0}, "lesson_type_id": {"top": 1204, "height": 28, "center": 1218.0}, "qualification_level": {"top": 1232, "height": 28, "center": 1246.0}, "experience_years": {"top": 1260, "height": 28, "center": 1274.0}}, "column": 5}, "time_slot_scopes": {"label": "Наборы звонков", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "code": {"name": "code", "type": "VARCHAR(50)", "pk": false, "nn": true, "uq": true, "ddl": "code VARCHAR(50) NOT NULL UNIQUE"}, "name": {"name": "name", "type": "VARCHAR(120)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(120) NOT NULL"}, "apply_mode": {"name": "apply_mode", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "apply_mode VARCHAR(20) NOT NULL"}, "day_of_week": {"name": "day_of_week", "type": "INT", "pk": false, "nn": false, "uq": false, "ddl": "day_of_week INT NULL"}, "system_scope": {"name": "system_scope", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "system_scope BOOLEAN NOT NULL DEFAULT FALSE"}, "display_order": {"name": "display_order", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "display_order INT NOT NULL DEFAULT 100"}}, "constraints": ["CONSTRAINT chk_time_slot_scopes_mode CHECK (apply_mode IN ('DEFAULT', 'WEEKDAY', 'MANUAL'))", "CONSTRAINT chk_time_slot_scopes_day CHECK (day_of_week IS NULL OR day_of_week BETWEEN 1 AND 7)", "CONSTRAINT chk_time_slot_scopes_weekday CHECK ( (apply_mode = 'WEEKDAY' AND day_of_week IS NOT NULL) OR (apply_mode \u003c> 'WEEKDAY' AND day_of_week IS NULL) )"], "indexes": ["CREATE UNIQUE INDEX IF NOT EXISTS uq_time_slot_scopes_default ON time_slot_scopes(apply_mode) WHERE apply_mode = 'DEFAULT'", "CREATE UNIQUE INDEX IF NOT EXISTS uq_time_slot_scopes_weekday ON time_slot_scopes(day_of_week) WHERE apply_mode = 'WEEKDAY'"], "x": 1472, "y": 1368, "width": 512, "height": 268, "rows": {"id": {"top": 1432, "height": 36, "center": 1450.0}, "code": {"top": 1468, "height": 28, "center": 1482.0}, "name": {"top": 1496, "height": 28, "center": 1510.0}, "apply_mode": {"top": 1524, "height": 28, "center": 1538.0}, "day_of_week": {"top": 1552, "height": 28, "center": 1566.0}, "system_scope": {"top": 1580, "height": 28, "center": 1594.0}, "display_order": {"top": 1608, "height": 28, "center": 1622.0}}, "column": 2}, "time_slots": {"label": "Временные слоты", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "time_slot_scope_id": {"name": "time_slot_scope_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "time_slot_scope_id BIGINT NOT NULL REFERENCES time_slot_scopes(id) ON DELETE CASCADE", "fks": [{"source": "time_slots", "columns": ["time_slot_scope_id"], "column": "time_slot_scope_id", "target": "time_slot_scopes", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 24}]}, "order_number": {"name": "order_number", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "order_number INT NOT NULL"}, "start_time": {"name": "start_time", "type": "TIME", "pk": false, "nn": true, "uq": false, "ddl": "start_time TIME NOT NULL"}, "end_time": {"name": "end_time", "type": "TIME", "pk": false, "nn": true, "uq": false, "ddl": "end_time TIME NOT NULL"}, "duration_minutes": {"name": "duration_minutes", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "duration_minutes INT NOT NULL"}}, "constraints": ["CONSTRAINT chk_time_slots_order_positive CHECK (order_number > 0)", "CONSTRAINT chk_time_slots_time_range CHECK (start_time \u003c end_time)", "CONSTRAINT chk_time_slots_duration_positive CHECK (duration_minutes > 0)", "CONSTRAINT chk_time_slots_duration_matches_range CHECK ( duration_minutes = floor(extract(epoch FROM (end_time - start_time)) / 60)::INT )", "CONSTRAINT ex_time_slots_scope_no_overlap EXCLUDE USING gist ( time_slot_scope_id WITH =, (numrange( extract(epoch FROM start_time), extract(epoch FROM end_time), '[)' )) WITH && )"], "indexes": ["CREATE UNIQUE INDEX IF NOT EXISTS uq_time_slots_scope_order ON time_slots(time_slot_scope_id, order_number)"], "x": 1472, "y": 1748, "width": 512, "height": 264, "rows": {"id": {"top": 1812, "height": 60, "center": 1842.0}, "time_slot_scope_id": {"top": 1872, "height": 28, "center": 1886.0}, "order_number": {"top": 1900, "height": 28, "center": 1914.0}, "start_time": {"top": 1928, "height": 28, "center": 1942.0}, "end_time": {"top": 1956, "height": 28, "center": 1970.0}, "duration_minutes": {"top": 1984, "height": 28, "center": 1998.0}}, "column": 2}, "time_slot_date_assignments": {"label": "Наборы звонков по датам", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "assignment_date": {"name": "assignment_date", "type": "DATE", "pk": false, "nn": true, "uq": true, "ddl": "assignment_date DATE NOT NULL UNIQUE"}, "time_slot_scope_id": {"name": "time_slot_scope_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "time_slot_scope_id BIGINT NOT NULL REFERENCES time_slot_scopes(id) ON DELETE CASCADE", "fks": [{"source": "time_slot_date_assignments", "columns": ["time_slot_scope_id"], "column": "time_slot_scope_id", "target": "time_slot_scopes", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 25}]}}, "constraints": [], "indexes": ["CREATE INDEX IF NOT EXISTS idx_time_slot_date_assignments_scope ON time_slot_date_assignments(time_slot_scope_id)"], "x": 1472, "y": 2124, "width": 512, "height": 148, "rows": {"id": {"top": 2188, "height": 28, "center": 2202.0}, "assignment_date": {"top": 2216, "height": 28, "center": 2230.0}, "time_slot_scope_id": {"top": 2244, "height": 28, "center": 2258.0}}, "column": 2}, "academic_years": {"label": "Учебные годы", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "title": {"name": "title", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": true, "ddl": "title VARCHAR(20) NOT NULL UNIQUE"}, "start_date": {"name": "start_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "start_date DATE NOT NULL"}, "end_date": {"name": "end_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "end_date DATE NOT NULL"}}, "constraints": ["CONSTRAINT chk_academic_years_dates CHECK (start_date \u003c= end_date)", "CONSTRAINT ex_academic_years_no_overlap EXCLUDE USING gist ( (daterange(start_date, end_date, '[]')) WITH && )"], "indexes": [], "x": 768, "y": 152, "width": 512, "height": 208, "rows": {"id": {"top": 216, "height": 60, "center": 246.0}, "title": {"top": 276, "height": 28, "center": 290.0}, "start_date": {"top": 304, "height": 28, "center": 318.0}, "end_date": {"top": 332, "height": 28, "center": 346.0}}, "column": 1}, "semesters": {"label": "Семестры", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "academic_year_id": {"name": "academic_year_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE", "fks": [{"source": "semesters", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 27}]}, "semester_type": {"name": "semester_type", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "semester_type VARCHAR(20) NOT NULL"}, "start_date": {"name": "start_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "start_date DATE NOT NULL"}, "end_date": {"name": "end_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "end_date DATE NOT NULL"}}, "constraints": ["CONSTRAINT chk_semesters_type CHECK (semester_type IN ('autumn', 'spring'))", "CONSTRAINT chk_semesters_dates CHECK (start_date \u003c= end_date)", "CONSTRAINT uq_semesters_year_type UNIQUE (academic_year_id, semester_type)", "CONSTRAINT ex_semesters_year_no_overlap EXCLUDE USING gist ( academic_year_id WITH =, (daterange(start_date, end_date, '[]')) WITH && )"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_semesters_dates ON semesters(start_date, end_date)"], "x": 768, "y": 472, "width": 512, "height": 236, "rows": {"id": {"top": 536, "height": 60, "center": 566.0}, "academic_year_id": {"top": 596, "height": 28, "center": 610.0}, "semester_type": {"top": 624, "height": 28, "center": 638.0}, "start_date": {"top": 652, "height": 28, "center": 666.0}, "end_date": {"top": 680, "height": 28, "center": 694.0}}, "column": 1}, "academic_calendar_activity_types": {"label": "Виды учебной активности", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "code": {"name": "code", "type": "VARCHAR(10)", "pk": false, "nn": true, "uq": true, "ddl": "code VARCHAR(10) UNIQUE NOT NULL"}, "name": {"name": "name", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(255) NOT NULL"}, "allow_schedule": {"name": "allow_schedule", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "allow_schedule BOOLEAN NOT NULL DEFAULT FALSE"}, "color_code": {"name": "color_code", "type": "VARCHAR(7)", "pk": false, "nn": true, "uq": false, "ddl": "color_code VARCHAR(7) NOT NULL DEFAULT '#64748b'"}, "display_order": {"name": "display_order", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "display_order INT NOT NULL DEFAULT 100"}, "description": {"name": "description", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "description TEXT"}}, "constraints": [], "indexes": [], "x": 768, "y": 1276, "width": 512, "height": 260, "rows": {"id": {"top": 1340, "height": 28, "center": 1354.0}, "code": {"top": 1368, "height": 28, "center": 1382.0}, "name": {"top": 1396, "height": 28, "center": 1410.0}, "allow_schedule": {"top": 1424, "height": 28, "center": 1438.0}, "color_code": {"top": 1452, "height": 28, "center": 1466.0}, "display_order": {"top": 1480, "height": 28, "center": 1494.0}, "description": {"top": 1508, "height": 28, "center": 1522.0}}, "column": 1}, "academic_calendars": {"label": "Учебные календари", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "title": {"name": "title", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "title VARCHAR(255) NOT NULL"}, "academic_year_id": {"name": "academic_year_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE", "fks": [{"source": "academic_calendars", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 28}]}, "specialty_id": {"name": "specialty_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_id BIGINT NOT NULL REFERENCES specialties(id)", "fks": [{"source": "academic_calendars", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 29}, {"source": "academic_calendars", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 31}]}, "specialty_profile_id": {"name": "specialty_profile_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_profile_id BIGINT NOT NULL", "fks": [{"source": "academic_calendars", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 31}]}, "study_form_id": {"name": "study_form_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "study_form_id BIGINT NOT NULL REFERENCES education_forms(id)", "fks": [{"source": "academic_calendars", "columns": ["study_form_id"], "column": "study_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 30}]}, "course_count": {"name": "course_count", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "course_count INT NOT NULL DEFAULT 4"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT fk_academic_calendars_profile_specialty FOREIGN KEY (specialty_profile_id, specialty_id) REFERENCES specialty_profiles(id, specialty_id)", "CONSTRAINT chk_academic_calendars_course_count CHECK (course_count BETWEEN 1 AND 8)", "CONSTRAINT uq_academic_calendar_title UNIQUE (academic_year_id, specialty_profile_id, study_form_id, title)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_academic_calendars_context ON academic_calendars(academic_year_id, specialty_id, specialty_profile_id, study_form_id)"], "x": 768, "y": 820, "width": 512, "height": 344, "rows": {"id": {"top": 884, "height": 48, "center": 908.0}, "title": {"top": 932, "height": 28, "center": 946.0}, "academic_year_id": {"top": 960, "height": 28, "center": 974.0}, "specialty_id": {"top": 988, "height": 36, "center": 1006.0}, "specialty_profile_id": {"top": 1024, "height": 28, "center": 1038.0}, "study_form_id": {"top": 1052, "height": 28, "center": 1066.0}, "course_count": {"top": 1080, "height": 28, "center": 1094.0}, "created_at": {"top": 1108, "height": 28, "center": 1122.0}, "updated_at": {"top": 1136, "height": 28, "center": 1150.0}}, "column": 1}, "academic_calendar_periods": {"label": "Календарные периоды", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "calendar_id": {"name": "calendar_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE", "fks": [{"source": "academic_calendar_periods", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 32}]}, "course_number": {"name": "course_number", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "course_number INT NOT NULL"}, "start_date": {"name": "start_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "start_date DATE NOT NULL"}, "end_date": {"name": "end_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "end_date DATE NOT NULL"}, "activity_type_id": {"name": "activity_type_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "activity_type_id BIGINT NOT NULL REFERENCES academic_calendar_activity_types(id)", "fks": [{"source": "academic_calendar_periods", "columns": ["activity_type_id"], "column": "activity_type_id", "target": "academic_calendar_activity_types", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 33}]}}, "constraints": ["CONSTRAINT chk_calendar_periods_course_positive CHECK (course_number > 0)", "CONSTRAINT chk_calendar_periods_dates CHECK (end_date >= start_date)", "CONSTRAINT ex_calendar_periods_no_overlap EXCLUDE USING gist ( calendar_id WITH =, course_number WITH =, (daterange(start_date, end_date, '[]')) WITH && )"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_calendar_periods_schedule ON academic_calendar_periods(calendar_id, course_number, start_date, end_date)"], "x": 768, "y": 1648, "width": 512, "height": 232, "rows": {"id": {"top": 1712, "height": 28, "center": 1726.0}, "calendar_id": {"top": 1740, "height": 28, "center": 1754.0}, "course_number": {"top": 1768, "height": 28, "center": 1782.0}, "start_date": {"top": 1796, "height": 28, "center": 1810.0}, "end_date": {"top": 1824, "height": 28, "center": 1838.0}, "activity_type_id": {"top": 1852, "height": 28, "center": 1866.0}}, "column": 1}, "academic_calendar_subjects": {"label": "Дисциплины календаря", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "calendar_id": {"name": "calendar_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE", "fks": [{"source": "academic_calendar_subjects", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 34}]}, "semester_number": {"name": "semester_number", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "semester_number INT NOT NULL"}, "subject_id": {"name": "subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "subject_id BIGINT NOT NULL REFERENCES subjects(id)", "fks": [{"source": "academic_calendar_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 35}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_academic_calendar_subjects_semester_positive CHECK (semester_number > 0)", "CONSTRAINT uq_academic_calendar_subject UNIQUE (calendar_id, semester_number, subject_id)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_academic_calendar_subjects_calendar_semester ON academic_calendar_subjects(calendar_id, semester_number)", "CREATE INDEX IF NOT EXISTS idx_academic_calendar_subjects_subject ON academic_calendar_subjects(subject_id)"], "x": 768, "y": 1992, "width": 512, "height": 204, "rows": {"id": {"top": 2056, "height": 28, "center": 2070.0}, "calendar_id": {"top": 2084, "height": 28, "center": 2098.0}, "semester_number": {"top": 2112, "height": 28, "center": 2126.0}, "subject_id": {"top": 2140, "height": 28, "center": 2154.0}, "created_at": {"top": 2168, "height": 28, "center": 2182.0}}, "column": 1}, "student_group_calendar_assignments": {"label": "Назначения календарей группам", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "group_id": {"name": "group_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE", "fks": [{"source": "student_group_calendar_assignments", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 36}]}, "academic_year_id": {"name": "academic_year_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "academic_year_id BIGINT NOT NULL REFERENCES academic_years(id) ON DELETE CASCADE", "fks": [{"source": "student_group_calendar_assignments", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 37}]}, "calendar_id": {"name": "calendar_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "calendar_id BIGINT NOT NULL REFERENCES academic_calendars(id) ON DELETE CASCADE", "fks": [{"source": "student_group_calendar_assignments", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 38}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT uq_group_calendar_year UNIQUE (group_id, academic_year_id)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_group_calendar_assignments_lookup ON student_group_calendar_assignments(group_id, academic_year_id)"], "x": 768, "y": 2308, "width": 512, "height": 204, "rows": {"id": {"top": 2372, "height": 28, "center": 2386.0}, "group_id": {"top": 2400, "height": 28, "center": 2414.0}, "academic_year_id": {"top": 2428, "height": 28, "center": 2442.0}, "calendar_id": {"top": 2456, "height": 28, "center": 2470.0}, "created_at": {"top": 2484, "height": 28, "center": 2498.0}}, "column": 1}, "schedule_rules": {"label": "Правила расписания", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "load_revision": {"name": "load_revision", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "load_revision BIGINT NOT NULL DEFAULT 0"}, "subject_id": {"name": "subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "subject_id BIGINT NOT NULL REFERENCES subjects(id)", "fks": [{"source": "schedule_rules", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 39}]}, "semester_id": {"name": "semester_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "semester_id BIGINT NOT NULL REFERENCES semesters(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rules", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 40}, {"source": "schedule_rules", "columns": ["schedule_version_id", "semester_id"], "column": "schedule_version_id", "target": "schedule_versions", "keys": ["id", "semester_id"], "key": "id", "action": "CASCADE", "number": 84}]}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE'"}, "valid_from": {"name": "valid_from", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "valid_from DATE"}, "valid_to": {"name": "valid_to", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "valid_to DATE"}, "version_group_id": {"name": "version_group_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "version_group_id BIGINT"}, "change_reason": {"name": "change_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "change_reason TEXT"}, "created_by": {"name": "created_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "created_by BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_rules", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 41}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "schedule_version_id": {"name": "schedule_version_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "schedule_version_id BIGINT", "fks": [{"source": "schedule_rules", "columns": ["schedule_version_id", "semester_id"], "column": "schedule_version_id", "target": "schedule_versions", "keys": ["id", "semester_id"], "key": "id", "action": "CASCADE", "number": 84}]}}, "constraints": ["CONSTRAINT chk_schedule_rules_dates CHECK (valid_to IS NULL OR valid_from IS NULL OR valid_to >= valid_from)", "CONSTRAINT fk_schedule_rules_version FOREIGN KEY (schedule_version_id, semester_id) REFERENCES schedule_versions(id, semester_id) ON DELETE CASCADE", "CONSTRAINT chk_schedule_rules_status CHECK (status IN ('ACTIVE', 'ARCHIVED'))"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_schedule_rules_semester ON schedule_rules(semester_id)", "CREATE INDEX IF NOT EXISTS idx_schedule_rules_subject ON schedule_rules(subject_id)", "CREATE INDEX IF NOT EXISTS idx_schedule_rules_status_dates ON schedule_rules(status, valid_from, valid_to)", "CREATE INDEX idx_schedule_rules_version ON schedule_rules(schedule_version_id, status)", "CREATE UNIQUE INDEX uq_schedule_rules_version_group ON schedule_rules(schedule_version_id, version_group_id) WHERE version_group_id IS NOT NULL"], "x": 2880, "y": 1068, "width": 512, "height": 420, "rows": {"id": {"top": 1132, "height": 48, "center": 1156.0}, "load_revision": {"top": 1180, "height": 28, "center": 1194.0}, "subject_id": {"top": 1208, "height": 28, "center": 1222.0}, "semester_id": {"top": 1236, "height": 28, "center": 1250.0}, "status": {"top": 1264, "height": 28, "center": 1278.0}, "valid_from": {"top": 1292, "height": 28, "center": 1306.0}, "valid_to": {"top": 1320, "height": 28, "center": 1334.0}, "version_group_id": {"top": 1348, "height": 28, "center": 1362.0}, "change_reason": {"top": 1376, "height": 28, "center": 1390.0}, "created_by": {"top": 1404, "height": 28, "center": 1418.0}, "created_at": {"top": 1432, "height": 28, "center": 1446.0}, "schedule_version_id": {"top": 1460, "height": 28, "center": 1474.0}}, "column": 4}, "schedule_rule_loads": {"label": "Нагрузка правила по видам занятий", "columns": {"schedule_rule_id": {"name": "schedule_rule_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_loads", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 42}]}, "lesson_type_code": {"name": "lesson_type_code", "type": "VARCHAR(30)", "pk": true, "nn": true, "uq": false, "ddl": "lesson_type_code VARCHAR(30) NOT NULL REFERENCES lesson_types(code)", "fks": [{"source": "schedule_rule_loads", "columns": ["lesson_type_code"], "column": "lesson_type_code", "target": "lesson_types", "keys": ["code"], "key": "code", "action": "NO ACTION", "number": 43}]}, "academic_hours": {"name": "academic_hours", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "academic_hours INT NOT NULL"}, "start_week": {"name": "start_week", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "start_week INT NOT NULL DEFAULT 1"}}, "constraints": ["PRIMARY KEY (schedule_rule_id, lesson_type_code)", "CONSTRAINT chk_schedule_rule_loads_hours_non_negative CHECK (academic_hours >= 0)", "CONSTRAINT chk_schedule_rule_loads_hours_even CHECK (mod(academic_hours, 2) = 0)", "CONSTRAINT chk_schedule_rule_loads_start_week CHECK (start_week > 0)"], "indexes": [], "x": 2880, "y": 1600, "width": 512, "height": 176, "rows": {"schedule_rule_id": {"top": 1664, "height": 28, "center": 1678.0}, "lesson_type_code": {"top": 1692, "height": 28, "center": 1706.0}, "academic_hours": {"top": 1720, "height": 28, "center": 1734.0}, "start_week": {"top": 1748, "height": 28, "center": 1762.0}}, "column": 4}, "schedule_rule_groups": {"label": "Группы правила", "columns": {"schedule_rule_id": {"name": "schedule_rule_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_groups", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 44}]}, "group_id": {"name": "group_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "group_id BIGINT NOT NULL REFERENCES student_groups(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_groups", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 45}]}}, "constraints": ["PRIMARY KEY (schedule_rule_id, group_id)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_schedule_rule_groups_group ON schedule_rule_groups(group_id)"], "x": 2880, "y": 1888, "width": 512, "height": 120, "rows": {"schedule_rule_id": {"top": 1952, "height": 28, "center": 1966.0}, "group_id": {"top": 1980, "height": 28, "center": 1994.0}}, "column": 4}, "schedule_rule_slots": {"label": "Повторяющиеся занятия", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "schedule_rule_id": {"name": "schedule_rule_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "schedule_rule_id BIGINT NOT NULL REFERENCES schedule_rules(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_slots", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 46}]}, "day_of_week": {"name": "day_of_week", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "day_of_week INT NOT NULL"}, "parity": {"name": "parity", "type": "VARCHAR(10)", "pk": false, "nn": true, "uq": false, "ddl": "parity VARCHAR(10) NOT NULL"}, "time_slot_id": {"name": "time_slot_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "time_slot_id BIGINT NOT NULL REFERENCES time_slots(id)", "fks": [{"source": "schedule_rule_slots", "columns": ["time_slot_id"], "column": "time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 47}]}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "teacher_id BIGINT NOT NULL REFERENCES users(id)", "fks": [{"source": "schedule_rule_slots", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 48}]}, "classroom_id": {"name": "classroom_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "classroom_id BIGINT NOT NULL REFERENCES classrooms(id)", "fks": [{"source": "schedule_rule_slots", "columns": ["classroom_id"], "column": "classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 49}]}, "lesson_type_id": {"name": "lesson_type_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "lesson_type_id BIGINT NOT NULL REFERENCES lesson_types(id)", "fks": [{"source": "schedule_rule_slots", "columns": ["lesson_type_id"], "column": "lesson_type_id", "target": "lesson_types", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 50}]}, "lesson_format": {"name": "lesson_format", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "lesson_format VARCHAR(30) NOT NULL"}, "time_locked": {"name": "time_locked", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "time_locked BOOLEAN NOT NULL DEFAULT FALSE"}, "classroom_locked": {"name": "classroom_locked", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "classroom_locked BOOLEAN NOT NULL DEFAULT FALSE"}, "teacher_locked": {"name": "teacher_locked", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "teacher_locked BOOLEAN NOT NULL DEFAULT FALSE"}, "locked_by": {"name": "locked_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "locked_by BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_rule_slots", "columns": ["locked_by"], "column": "locked_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 51}]}, "locked_at": {"name": "locked_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "locked_at TIMESTAMPTZ"}, "lock_comment": {"name": "lock_comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "lock_comment TEXT"}}, "constraints": ["CONSTRAINT chk_schedule_rule_slots_day CHECK (day_of_week BETWEEN 1 AND 7)", "CONSTRAINT chk_schedule_rule_slots_parity CHECK (parity IN ('BOTH', 'EVEN', 'ODD'))", "CONSTRAINT chk_schedule_rule_slots_format CHECK (lesson_format IN ('Очно', 'Онлайн'))", "CONSTRAINT uq_schedule_rule_slots_exact_payload UNIQUE ( schedule_rule_id, day_of_week, parity, time_slot_id, teacher_id, classroom_id, lesson_type_id, lesson_format )"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_schedule_rule_slots_rule ON schedule_rule_slots(schedule_rule_id)", "CREATE INDEX IF NOT EXISTS idx_schedule_rule_slots_teacher ON schedule_rule_slots(teacher_id)", "CREATE INDEX IF NOT EXISTS idx_schedule_rule_slots_classroom ON schedule_rule_slots(classroom_id)", "CREATE INDEX IF NOT EXISTS idx_schedule_rule_slots_time ON schedule_rule_slots(day_of_week, parity, time_slot_id)"], "x": 2880, "y": 2120, "width": 512, "height": 516, "rows": {"id": {"top": 2184, "height": 60, "center": 2214.0}, "schedule_rule_id": {"top": 2244, "height": 28, "center": 2258.0}, "day_of_week": {"top": 2272, "height": 28, "center": 2286.0}, "parity": {"top": 2300, "height": 28, "center": 2314.0}, "time_slot_id": {"top": 2328, "height": 28, "center": 2342.0}, "teacher_id": {"top": 2356, "height": 28, "center": 2370.0}, "classroom_id": {"top": 2384, "height": 28, "center": 2398.0}, "lesson_type_id": {"top": 2412, "height": 28, "center": 2426.0}, "lesson_format": {"top": 2440, "height": 28, "center": 2454.0}, "time_locked": {"top": 2468, "height": 28, "center": 2482.0}, "classroom_locked": {"top": 2496, "height": 28, "center": 2510.0}, "teacher_locked": {"top": 2524, "height": 28, "center": 2538.0}, "locked_by": {"top": 2552, "height": 28, "center": 2566.0}, "locked_at": {"top": 2580, "height": 28, "center": 2594.0}, "lock_comment": {"top": 2608, "height": 28, "center": 2622.0}}, "column": 4}, "schedule_rule_slot_subgroups": {"label": "Подгруппы занятия", "columns": {"schedule_rule_slot_id": {"name": "schedule_rule_slot_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "schedule_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_slot_subgroups", "columns": ["schedule_rule_slot_id"], "column": "schedule_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 52}]}, "subgroup_id": {"name": "subgroup_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "subgroup_id BIGINT NOT NULL REFERENCES subgroups(id) ON DELETE CASCADE", "fks": [{"source": "schedule_rule_slot_subgroups", "columns": ["subgroup_id"], "column": "subgroup_id", "target": "subgroups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 53}]}}, "constraints": ["PRIMARY KEY (schedule_rule_slot_id, subgroup_id)"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_schedule_rule_slot_subgroups_subgroup ON schedule_rule_slot_subgroups(subgroup_id)"], "x": 2880, "y": 2748, "width": 512, "height": 120, "rows": {"schedule_rule_slot_id": {"top": 2812, "height": 28, "center": 2826.0}, "subgroup_id": {"top": 2840, "height": 28, "center": 2854.0}}, "column": 4}, "schedule_overrides": {"label": "Точечные изменения занятий", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "base_rule_slot_id": {"name": "base_rule_slot_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)", "fks": [{"source": "schedule_overrides", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 54}]}, "lesson_date": {"name": "lesson_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "lesson_date DATE NOT NULL"}, "target_lesson_date": {"name": "target_lesson_date", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "target_lesson_date DATE"}, "action": {"name": "action", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "action VARCHAR(20) NOT NULL"}, "new_time_slot_id": {"name": "new_time_slot_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "new_time_slot_id BIGINT REFERENCES time_slots(id)", "fks": [{"source": "schedule_overrides", "columns": ["new_time_slot_id"], "column": "new_time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 55}]}, "new_classroom_id": {"name": "new_classroom_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "new_classroom_id BIGINT REFERENCES classrooms(id)", "fks": [{"source": "schedule_overrides", "columns": ["new_classroom_id"], "column": "new_classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 56}]}, "new_teacher_id": {"name": "new_teacher_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "new_teacher_id BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_overrides", "columns": ["new_teacher_id"], "column": "new_teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 57}]}, "new_lesson_format": {"name": "new_lesson_format", "type": "VARCHAR(30)", "pk": false, "nn": false, "uq": false, "ddl": "new_lesson_format VARCHAR(30)"}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "created_by": {"name": "created_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "created_by BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_overrides", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 58}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_schedule_overrides_action CHECK (action IN ('MOVE', 'CANCEL', 'REPLACE'))", "CONSTRAINT uq_schedule_overrides_slot_date UNIQUE (base_rule_slot_id, lesson_date)", "CONSTRAINT chk_schedule_overrides_cancel_payload CHECK ( action \u003c> 'CANCEL' OR ( target_lesson_date IS NULL AND new_time_slot_id IS NULL AND new_classroom_id IS NULL AND new_teacher_id IS NULL AND new_lesson_format IS NULL ) )", "CONSTRAINT chk_schedule_overrides_move_payload CHECK ( action \u003c> 'MOVE' OR new_time_slot_id IS NOT NULL )", "CONSTRAINT chk_schedule_overrides_replace_payload CHECK ( action \u003c> 'REPLACE' OR ( new_time_slot_id IS NULL AND ( new_teacher_id IS NOT NULL OR new_classroom_id IS NOT NULL OR new_lesson_format IS NOT NULL ) ) )", "CONSTRAINT chk_schedule_overrides_format CHECK ( new_lesson_format IS NULL OR new_lesson_format IN ('Очно', 'Онлайн') )", "CONSTRAINT chk_schedule_overrides_target_date CHECK ( target_lesson_date IS NULL OR ( target_lesson_date \u003c> lesson_date AND action = 'MOVE' AND new_time_slot_id IS NOT NULL ) )"], "indexes": ["CREATE INDEX IF NOT EXISTS idx_schedule_overrides_date ON schedule_overrides(lesson_date)", "CREATE INDEX IF NOT EXISTS idx_schedule_overrides_target_date ON schedule_overrides(target_lesson_date) WHERE target_lesson_date IS NOT NULL", "CREATE INDEX IF NOT EXISTS idx_schedule_overrides_new_teacher ON schedule_overrides(new_teacher_id)"], "x": 4288, "y": 1716, "width": 512, "height": 408, "rows": {"id": {"top": 1780, "height": 36, "center": 1798.0}, "base_rule_slot_id": {"top": 1816, "height": 28, "center": 1830.0}, "lesson_date": {"top": 1844, "height": 28, "center": 1858.0}, "target_lesson_date": {"top": 1872, "height": 28, "center": 1886.0}, "action": {"top": 1900, "height": 28, "center": 1914.0}, "new_time_slot_id": {"top": 1928, "height": 28, "center": 1942.0}, "new_classroom_id": {"top": 1956, "height": 28, "center": 1970.0}, "new_teacher_id": {"top": 1984, "height": 28, "center": 1998.0}, "new_lesson_format": {"top": 2012, "height": 28, "center": 2026.0}, "comment": {"top": 2040, "height": 28, "center": 2054.0}, "created_by": {"top": 2068, "height": 28, "center": 2082.0}, "created_at": {"top": 2096, "height": 28, "center": 2110.0}}, "column": 6}, "teacher_absences": {"label": "Отсутствия преподавателей", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "teacher_id BIGINT NOT NULL REFERENCES users(id)", "fks": [{"source": "teacher_absences", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 59}]}, "start_date": {"name": "start_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "start_date DATE NOT NULL"}, "end_date": {"name": "end_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "end_date DATE NOT NULL"}, "reason": {"name": "reason", "type": "TEXT", "pk": false, "nn": true, "uq": false, "ddl": "reason TEXT NOT NULL"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL"}, "requested_by": {"name": "requested_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "requested_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_absences", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 60}]}, "reviewed_by": {"name": "reviewed_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_absences", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 61}]}, "review_comment": {"name": "review_comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "review_comment TEXT"}, "reviewed_at": {"name": "reviewed_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_at TIMESTAMPTZ"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_teacher_absences_period CHECK (end_date >= start_date)", "CONSTRAINT chk_teacher_absences_reason CHECK (length(trim(reason)) BETWEEN 1 AND 2000)", "CONSTRAINT chk_teacher_absences_status CHECK ( status IN ('PENDING', 'APPROVED', 'REJECTED', 'RESOLVED', 'CANCELLED') )"], "indexes": ["CREATE INDEX idx_teacher_absences_teacher_period ON teacher_absences(teacher_id, start_date, end_date)", "CREATE INDEX idx_teacher_absences_status ON teacher_absences(status)"], "x": 4288, "y": 2236, "width": 512, "height": 400, "rows": {"id": {"top": 2300, "height": 28, "center": 2314.0}, "teacher_id": {"top": 2328, "height": 28, "center": 2342.0}, "start_date": {"top": 2356, "height": 28, "center": 2370.0}, "end_date": {"top": 2384, "height": 28, "center": 2398.0}, "reason": {"top": 2412, "height": 28, "center": 2426.0}, "status": {"top": 2440, "height": 28, "center": 2454.0}, "requested_by": {"top": 2468, "height": 28, "center": 2482.0}, "reviewed_by": {"top": 2496, "height": 28, "center": 2510.0}, "review_comment": {"top": 2524, "height": 28, "center": 2538.0}, "reviewed_at": {"top": 2552, "height": 28, "center": 2566.0}, "created_at": {"top": 2580, "height": 28, "center": 2594.0}, "updated_at": {"top": 2608, "height": 28, "center": 2622.0}}, "column": 6}, "teacher_absence_decisions": {"label": "Решения мастера замены", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "absence_id": {"name": "absence_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "absence_id BIGINT NOT NULL REFERENCES teacher_absences(id) ON DELETE CASCADE", "fks": [{"source": "teacher_absence_decisions", "columns": ["absence_id"], "column": "absence_id", "target": "teacher_absences", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 62}]}, "base_rule_slot_id": {"name": "base_rule_slot_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)", "fks": [{"source": "teacher_absence_decisions", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 63}]}, "lesson_date": {"name": "lesson_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "lesson_date DATE NOT NULL"}, "resolution": {"name": "resolution", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "resolution VARCHAR(30) NOT NULL"}, "decision_status": {"name": "decision_status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "decision_status VARCHAR(20) NOT NULL"}, "schedule_override_id": {"name": "schedule_override_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "schedule_override_id BIGINT REFERENCES schedule_overrides(id) ON DELETE SET NULL", "fks": [{"source": "teacher_absence_decisions", "columns": ["schedule_override_id"], "column": "schedule_override_id", "target": "schedule_overrides", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 64}]}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "decided_by": {"name": "decided_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "decided_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_absence_decisions", "columns": ["decided_by"], "column": "decided_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 65}]}, "decided_at": {"name": "decided_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "decided_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT uq_teacher_absence_decision_lesson UNIQUE ( absence_id, base_rule_slot_id, lesson_date )", "CONSTRAINT chk_teacher_absence_decision_resolution CHECK ( resolution IN ('REPLACE_TEACHER', 'MOVE_TIME', 'CHANGE_CLASSROOM', 'CANCEL', 'REJECT') )", "CONSTRAINT chk_teacher_absence_decision_status CHECK ( decision_status IN ('APPLIED', 'REJECTED') )"], "indexes": ["CREATE INDEX idx_teacher_absence_decisions_absence ON teacher_absence_decisions(absence_id, lesson_date)"], "x": 4288, "y": 2748, "width": 512, "height": 344, "rows": {"id": {"top": 2812, "height": 28, "center": 2826.0}, "absence_id": {"top": 2840, "height": 28, "center": 2854.0}, "base_rule_slot_id": {"top": 2868, "height": 28, "center": 2882.0}, "lesson_date": {"top": 2896, "height": 28, "center": 2910.0}, "resolution": {"top": 2924, "height": 28, "center": 2938.0}, "decision_status": {"top": 2952, "height": 28, "center": 2966.0}, "schedule_override_id": {"top": 2980, "height": 28, "center": 2994.0}, "comment": {"top": 3008, "height": 28, "center": 3022.0}, "decided_by": {"top": 3036, "height": 28, "center": 3050.0}, "decided_at": {"top": 3064, "height": 28, "center": 3078.0}}, "column": 6}, "teacher_preferences": {"label": "Пожелания преподавателей", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "teacher_id BIGINT NOT NULL REFERENCES users(id)", "fks": [{"source": "teacher_preferences", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 66}]}, "semester_id": {"name": "semester_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "semester_id BIGINT NOT NULL REFERENCES semesters(id)", "fks": [{"source": "teacher_preferences", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 67}]}, "preference_type": {"name": "preference_type", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "preference_type VARCHAR(30) NOT NULL"}, "day_of_week": {"name": "day_of_week", "type": "SMALLINT", "pk": false, "nn": false, "uq": false, "ddl": "day_of_week SMALLINT"}, "time_slot_id": {"name": "time_slot_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "time_slot_id BIGINT REFERENCES time_slots(id)", "fks": [{"source": "teacher_preferences", "columns": ["time_slot_id"], "column": "time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 68}]}, "preference_date": {"name": "preference_date", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "preference_date DATE"}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL"}, "requested_by": {"name": "requested_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "requested_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_preferences", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 69}]}, "reviewed_by": {"name": "reviewed_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_preferences", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 70}]}, "review_comment": {"name": "review_comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "review_comment TEXT"}, "reviewed_at": {"name": "reviewed_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_at TIMESTAMPTZ"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_teacher_preferences_type CHECK ( preference_type IN ( 'HARD_UNAVAILABLE', 'SOFT_PREFERRED', 'SOFT_UNWANTED', 'CONSECUTIVE', 'NO_GAPS' ) )", "CONSTRAINT chk_teacher_preferences_status CHECK ( status IN ('PENDING', 'APPROVED', 'REJECTED', 'CANCELLED') )", "CONSTRAINT chk_teacher_preferences_day CHECK ( day_of_week IS NULL OR day_of_week BETWEEN 1 AND 7 )", "CONSTRAINT chk_teacher_preferences_payload CHECK ( ( preference_type = 'HARD_UNAVAILABLE' AND ( (preference_date IS NOT NULL AND day_of_week IS NULL AND time_slot_id IS NULL) OR (preference_date IS NULL AND day_of_week IS NOT NULL AND time_slot_id IS NOT NULL) ) ) OR ( preference_type IN ('SOFT_PREFERRED', 'SOFT_UNWANTED') AND preference_date IS NULL AND day_of_week IS NOT NULL AND time_slot_id IS NOT NULL ) OR ( preference_type IN ('CONSECUTIVE', 'NO_GAPS') AND preference_date IS NULL AND day_of_week IS NULL AND time_slot_id IS NULL ) )", "CONSTRAINT chk_teacher_preferences_comment CHECK ( comment IS NULL OR length(trim(comment)) BETWEEN 1 AND 2000 )"], "indexes": ["CREATE INDEX idx_teacher_preferences_teacher_semester ON teacher_preferences(teacher_id, semester_id, status)", "CREATE INDEX idx_teacher_preferences_slot ON teacher_preferences(semester_id, day_of_week, time_slot_id) WHERE status = 'APPROVED'", "CREATE INDEX idx_teacher_preferences_date ON teacher_preferences(teacher_id, preference_date) WHERE status = 'APPROVED' AND preference_date IS NOT NULL"], "x": 4288, "y": 152, "width": 512, "height": 484, "rows": {"id": {"top": 216, "height": 28, "center": 230.0}, "teacher_id": {"top": 244, "height": 28, "center": 258.0}, "semester_id": {"top": 272, "height": 28, "center": 286.0}, "preference_type": {"top": 300, "height": 28, "center": 314.0}, "day_of_week": {"top": 328, "height": 28, "center": 342.0}, "time_slot_id": {"top": 356, "height": 28, "center": 370.0}, "preference_date": {"top": 384, "height": 28, "center": 398.0}, "comment": {"top": 412, "height": 28, "center": 426.0}, "status": {"top": 440, "height": 28, "center": 454.0}, "requested_by": {"top": 468, "height": 28, "center": 482.0}, "reviewed_by": {"top": 496, "height": 28, "center": 510.0}, "review_comment": {"top": 524, "height": 28, "center": 538.0}, "reviewed_at": {"top": 552, "height": 28, "center": 566.0}, "created_at": {"top": 580, "height": 28, "center": 594.0}, "updated_at": {"top": 608, "height": 28, "center": 622.0}}, "column": 6}, "teacher_change_requests": {"label": "Заявки на изменение занятия", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "teacher_id BIGINT NOT NULL REFERENCES users(id)", "fks": [{"source": "teacher_change_requests", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 71}]}, "base_rule_slot_id": {"name": "base_rule_slot_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "base_rule_slot_id BIGINT NOT NULL REFERENCES schedule_rule_slots(id)", "fks": [{"source": "teacher_change_requests", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 72}]}, "lesson_date": {"name": "lesson_date", "type": "DATE", "pk": false, "nn": true, "uq": false, "ddl": "lesson_date DATE NOT NULL"}, "request_type": {"name": "request_type", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "request_type VARCHAR(30) NOT NULL"}, "target_lesson_date": {"name": "target_lesson_date", "type": "DATE", "pk": false, "nn": false, "uq": false, "ddl": "target_lesson_date DATE"}, "requested_time_slot_id": {"name": "requested_time_slot_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "requested_time_slot_id BIGINT REFERENCES time_slots(id)", "fks": [{"source": "teacher_change_requests", "columns": ["requested_time_slot_id"], "column": "requested_time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 73}]}, "requested_classroom_id": {"name": "requested_classroom_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "requested_classroom_id BIGINT REFERENCES classrooms(id)", "fks": [{"source": "teacher_change_requests", "columns": ["requested_classroom_id"], "column": "requested_classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 74}]}, "reason": {"name": "reason", "type": "TEXT", "pk": false, "nn": true, "uq": false, "ddl": "reason TEXT NOT NULL"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL"}, "reviewed_by": {"name": "reviewed_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_by BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_change_requests", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 75}]}, "review_comment": {"name": "review_comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "review_comment TEXT"}, "reviewed_at": {"name": "reviewed_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "reviewed_at TIMESTAMPTZ"}, "applied_override_id": {"name": "applied_override_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "applied_override_id BIGINT REFERENCES schedule_overrides(id) ON DELETE SET NULL", "fks": [{"source": "teacher_change_requests", "columns": ["applied_override_id"], "column": "applied_override_id", "target": "schedule_overrides", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 76}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "updated_at": {"name": "updated_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_teacher_change_requests_type CHECK ( request_type IN ('MOVE', 'CHANGE_CLASSROOM', 'CANCEL') )", "CONSTRAINT chk_teacher_change_requests_status CHECK ( status IN ('PENDING', 'APPROVED', 'REJECTED', 'CANCELLED') )", "CONSTRAINT chk_teacher_change_requests_reason CHECK ( length(trim(reason)) BETWEEN 1 AND 2000 )", "CONSTRAINT chk_teacher_change_requests_payload CHECK ( ( request_type = 'MOVE' AND requested_time_slot_id IS NOT NULL AND requested_classroom_id IS NULL ) OR ( request_type = 'CHANGE_CLASSROOM' AND target_lesson_date IS NULL AND requested_time_slot_id IS NULL AND requested_classroom_id IS NOT NULL ) OR ( request_type = 'CANCEL' AND target_lesson_date IS NULL AND requested_time_slot_id IS NULL AND requested_classroom_id IS NULL ) )"], "indexes": ["CREATE INDEX idx_teacher_change_requests_teacher ON teacher_change_requests(teacher_id, created_at DESC)", "CREATE INDEX idx_teacher_change_requests_status ON teacher_change_requests(status, created_at)", "CREATE UNIQUE INDEX uq_teacher_change_requests_pending_lesson ON teacher_change_requests(base_rule_slot_id, lesson_date) WHERE status = 'PENDING'"], "x": 4288, "y": 748, "width": 512, "height": 512, "rows": {"id": {"top": 812, "height": 28, "center": 826.0}, "teacher_id": {"top": 840, "height": 28, "center": 854.0}, "base_rule_slot_id": {"top": 868, "height": 28, "center": 882.0}, "lesson_date": {"top": 896, "height": 28, "center": 910.0}, "request_type": {"top": 924, "height": 28, "center": 938.0}, "target_lesson_date": {"top": 952, "height": 28, "center": 966.0}, "requested_time_slot_id": {"top": 980, "height": 28, "center": 994.0}, "requested_classroom_id": {"top": 1008, "height": 28, "center": 1022.0}, "reason": {"top": 1036, "height": 28, "center": 1050.0}, "status": {"top": 1064, "height": 28, "center": 1078.0}, "reviewed_by": {"top": 1092, "height": 28, "center": 1106.0}, "review_comment": {"top": 1120, "height": 28, "center": 1134.0}, "reviewed_at": {"top": 1148, "height": 28, "center": 1162.0}, "applied_override_id": {"top": 1176, "height": 28, "center": 1190.0}, "created_at": {"top": 1204, "height": 28, "center": 1218.0}, "updated_at": {"top": 1232, "height": 28, "center": 1246.0}}, "column": 6}, "teacher_change_request_history": {"label": "История согласования заявки", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "request_id": {"name": "request_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "request_id BIGINT NOT NULL REFERENCES teacher_change_requests(id) ON DELETE CASCADE", "fks": [{"source": "teacher_change_request_history", "columns": ["request_id"], "column": "request_id", "target": "teacher_change_requests", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 77}]}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL"}, "comment": {"name": "comment", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "comment TEXT"}, "actor_id": {"name": "actor_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "actor_id BIGINT REFERENCES users(id)", "fks": [{"source": "teacher_change_request_history", "columns": ["actor_id"], "column": "actor_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 78}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_teacher_change_request_history_status CHECK ( status IN ('PENDING', 'APPROVED', 'REJECTED', 'CANCELLED') )"], "indexes": ["CREATE INDEX idx_teacher_change_request_history_request ON teacher_change_request_history(request_id, created_at, id)"], "x": 4288, "y": 1372, "width": 512, "height": 232, "rows": {"id": {"top": 1436, "height": 28, "center": 1450.0}, "request_id": {"top": 1464, "height": 28, "center": 1478.0}, "status": {"top": 1492, "height": 28, "center": 1506.0}, "comment": {"top": 1520, "height": 28, "center": 1534.0}, "actor_id": {"top": 1548, "height": 28, "center": 1562.0}, "created_at": {"top": 1576, "height": 28, "center": 1590.0}}, "column": 6}, "schedule_versions": {"label": "Версии расписания", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "semester_id": {"name": "semester_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "semester_id BIGINT NOT NULL REFERENCES semesters(id) ON DELETE CASCADE", "fks": [{"source": "schedule_versions", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 79}]}, "version_number": {"name": "version_number", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "version_number INT NOT NULL"}, "name": {"name": "name", "type": "VARCHAR(160)", "pk": false, "nn": true, "uq": false, "ddl": "name VARCHAR(160) NOT NULL"}, "status": {"name": "status", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "status VARCHAR(20) NOT NULL"}, "based_on_version_id": {"name": "based_on_version_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "based_on_version_id BIGINT REFERENCES schedule_versions(id) ON DELETE SET NULL", "fks": [{"source": "schedule_versions", "columns": ["based_on_version_id"], "column": "based_on_version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 80}]}, "restored_from_version_id": {"name": "restored_from_version_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "restored_from_version_id BIGINT REFERENCES schedule_versions(id) ON DELETE SET NULL", "fks": [{"source": "schedule_versions", "columns": ["restored_from_version_id"], "column": "restored_from_version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 81}]}, "change_reason": {"name": "change_reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "change_reason TEXT"}, "created_by": {"name": "created_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "created_by BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_versions", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 82}]}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}, "published_by": {"name": "published_by", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "published_by BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_versions", "columns": ["published_by"], "column": "published_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 83}]}, "published_at": {"name": "published_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "published_at TIMESTAMPTZ"}, "archived_at": {"name": "archived_at", "type": "TIMESTAMPTZ", "pk": false, "nn": false, "uq": false, "ddl": "archived_at TIMESTAMPTZ"}}, "constraints": ["CONSTRAINT uq_schedule_versions_id_semester UNIQUE (id, semester_id)", "CONSTRAINT uq_schedule_versions_number UNIQUE (semester_id, version_number)", "CONSTRAINT chk_schedule_versions_number CHECK (version_number > 0)", "CONSTRAINT chk_schedule_versions_name CHECK (length(trim(name)) BETWEEN 1 AND 160)", "CONSTRAINT chk_schedule_versions_status CHECK (status IN ('DRAFT', 'PUBLISHED', 'ARCHIVED'))", "CONSTRAINT chk_schedule_versions_publish_fields CHECK ( status \u003c> 'PUBLISHED' OR published_at IS NOT NULL )"], "indexes": ["CREATE UNIQUE INDEX uq_schedule_versions_published_semester ON schedule_versions(semester_id) WHERE status = 'PUBLISHED'", "CREATE INDEX idx_schedule_versions_semester_history ON schedule_versions(semester_id, version_number DESC)"], "x": 2880, "y": 152, "width": 512, "height": 460, "rows": {"id": {"top": 216, "height": 60, "center": 246.0}, "semester_id": {"top": 276, "height": 28, "center": 290.0}, "version_number": {"top": 304, "height": 28, "center": 318.0}, "name": {"top": 332, "height": 28, "center": 346.0}, "status": {"top": 360, "height": 28, "center": 374.0}, "based_on_version_id": {"top": 388, "height": 28, "center": 402.0}, "restored_from_version_id": {"top": 416, "height": 28, "center": 430.0}, "change_reason": {"top": 444, "height": 28, "center": 458.0}, "created_by": {"top": 472, "height": 28, "center": 486.0}, "created_at": {"top": 500, "height": 28, "center": 514.0}, "published_by": {"top": 528, "height": 28, "center": 542.0}, "published_at": {"top": 556, "height": 28, "center": 570.0}, "archived_at": {"top": 584, "height": 28, "center": 598.0}}, "column": 4}, "schedule_version_history": {"label": "История версий расписания", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "version_id": {"name": "version_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "version_id BIGINT NOT NULL REFERENCES schedule_versions(id) ON DELETE CASCADE", "fks": [{"source": "schedule_version_history", "columns": ["version_id"], "column": "version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 85}]}, "action": {"name": "action", "type": "VARCHAR(30)", "pk": false, "nn": true, "uq": false, "ddl": "action VARCHAR(30) NOT NULL"}, "actor_id": {"name": "actor_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "actor_id BIGINT REFERENCES users(id)", "fks": [{"source": "schedule_version_history", "columns": ["actor_id"], "column": "actor_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 86}]}, "reason": {"name": "reason", "type": "TEXT", "pk": false, "nn": false, "uq": false, "ddl": "reason TEXT"}, "created_at": {"name": "created_at", "type": "TIMESTAMPTZ", "pk": false, "nn": true, "uq": false, "ddl": "created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP"}}, "constraints": ["CONSTRAINT chk_schedule_version_history_action CHECK ( action IN ('CREATED', 'PUBLISHED', 'ARCHIVED', 'RESTORED') )", "CONSTRAINT chk_schedule_version_history_reason CHECK ( reason IS NULL OR length(trim(reason)) BETWEEN 1 AND 2000 )"], "indexes": ["CREATE INDEX idx_schedule_version_history_version ON schedule_version_history(version_id, created_at DESC, id DESC)"], "x": 2880, "y": 724, "width": 512, "height": 232, "rows": {"id": {"top": 788, "height": 28, "center": 802.0}, "version_id": {"top": 816, "height": 28, "center": 830.0}, "action": {"top": 844, "height": 28, "center": 858.0}, "actor_id": {"top": 872, "height": 28, "center": 886.0}, "reason": {"top": 900, "height": 28, "center": 914.0}, "created_at": {"top": 928, "height": 28, "center": 942.0}}, "column": 4}, "study_plans": {"label": "Учебные планы", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "title": {"name": "title", "type": "VARCHAR(255)", "pk": false, "nn": true, "uq": false, "ddl": "title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0)"}, "specialty_profile_id": {"name": "specialty_profile_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "specialty_profile_id BIGINT NOT NULL REFERENCES specialty_profiles(id)", "fks": [{"source": "study_plans", "columns": ["specialty_profile_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 87}]}, "education_form_id": {"name": "education_form_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "education_form_id BIGINT NOT NULL REFERENCES education_forms(id)", "fks": [{"source": "study_plans", "columns": ["education_form_id"], "column": "education_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 88}]}, "semester_number": {"name": "semester_number", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "semester_number INT NOT NULL CONSTRAINT chk_study_plan_semester CHECK (semester_number BETWEEN 1 AND 20)"}, "revision": {"name": "revision", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "revision BIGINT NOT NULL DEFAULT 0"}}, "constraints": ["CONSTRAINT uq_study_plan_title UNIQUE (specialty_profile_id, education_form_id, semester_number, title)"], "indexes": [], "x": 1472, "y": 152, "width": 512, "height": 240, "rows": {"id": {"top": 216, "height": 36, "center": 234.0}, "title": {"top": 252, "height": 28, "center": 266.0}, "specialty_profile_id": {"top": 280, "height": 28, "center": 294.0}, "education_form_id": {"top": 308, "height": 28, "center": 322.0}, "semester_number": {"top": 336, "height": 28, "center": 350.0}, "revision": {"top": 364, "height": 28, "center": 378.0}}, "column": 2}, "study_plan_subjects": {"label": "Дисциплины учебного плана", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "plan_id": {"name": "plan_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "plan_id BIGINT NOT NULL REFERENCES study_plans(id) ON DELETE CASCADE", "fks": [{"source": "study_plan_subjects", "columns": ["plan_id"], "column": "plan_id", "target": "study_plans", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 89}]}, "subject_id": {"name": "subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "subject_id BIGINT NOT NULL REFERENCES subjects(id)", "fks": [{"source": "study_plan_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 90}]}}, "constraints": ["CONSTRAINT uq_study_plan_subject UNIQUE (plan_id, subject_id)"], "indexes": [], "x": 1472, "y": 504, "width": 512, "height": 148, "rows": {"id": {"top": 568, "height": 28, "center": 582.0}, "plan_id": {"top": 596, "height": 28, "center": 610.0}, "subject_id": {"top": 624, "height": 28, "center": 638.0}}, "column": 2}, "study_plan_loads": {"label": "Нагрузка учебного плана", "columns": {"id": {"name": "id", "type": "BIGSERIAL", "pk": true, "nn": true, "uq": false, "ddl": "id BIGSERIAL PRIMARY KEY"}, "plan_subject_id": {"name": "plan_subject_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "plan_subject_id BIGINT NOT NULL REFERENCES study_plan_subjects(id) ON DELETE CASCADE", "fks": [{"source": "study_plan_loads", "columns": ["plan_subject_id"], "column": "plan_subject_id", "target": "study_plan_subjects", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 91}]}, "category": {"name": "category", "type": "VARCHAR(20)", "pk": false, "nn": true, "uq": false, "ddl": "category VARCHAR(20) NOT NULL CONSTRAINT chk_study_plan_category CHECK (category IN ('LECTURE', 'PRACTICE', 'LABORATORY'))"}, "academic_hours": {"name": "academic_hours", "type": "INT", "pk": false, "nn": true, "uq": false, "ddl": "academic_hours INT NOT NULL CONSTRAINT chk_study_plan_hours CHECK (academic_hours BETWEEN 0 AND 100000 AND mod(academic_hours, 2) = 0)"}, "split_subgroups": {"name": "split_subgroups", "type": "BOOLEAN", "pk": false, "nn": true, "uq": false, "ddl": "split_subgroups BOOLEAN NOT NULL DEFAULT FALSE"}, "teacher_id": {"name": "teacher_id", "type": "BIGINT", "pk": false, "nn": false, "uq": false, "ddl": "teacher_id BIGINT REFERENCES users(id)", "fks": [{"source": "study_plan_loads", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 92}]}}, "constraints": ["CONSTRAINT chk_study_plan_split CHECK (NOT split_subgroups OR (category = 'LABORATORY' AND academic_hours > 0))", "CONSTRAINT chk_study_plan_teacher_hours CHECK (teacher_id IS NULL OR academic_hours > 0)", "CONSTRAINT uq_study_plan_load UNIQUE (plan_subject_id, category)"], "indexes": ["CREATE INDEX idx_study_plan_load_teacher ON study_plan_loads(teacher_id)"], "x": 1472, "y": 764, "width": 512, "height": 232, "rows": {"id": {"top": 828, "height": 28, "center": 842.0}, "plan_subject_id": {"top": 856, "height": 28, "center": 870.0}, "category": {"top": 884, "height": 28, "center": 898.0}, "academic_hours": {"top": 912, "height": 28, "center": 926.0}, "split_subgroups": {"top": 940, "height": 28, "center": 954.0}, "teacher_id": {"top": 968, "height": 28, "center": 982.0}}, "column": 2}, "student_group_plan_assignments": {"label": "Назначения планов группам", "columns": {"group_id": {"name": "group_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "group_id BIGINT NOT NULL REFERENCES student_groups(id)", "fks": [{"source": "student_group_plan_assignments", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 93}]}, "semester_id": {"name": "semester_id", "type": "BIGINT", "pk": true, "nn": true, "uq": false, "ddl": "semester_id BIGINT NOT NULL REFERENCES semesters(id)", "fks": [{"source": "student_group_plan_assignments", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 94}]}, "plan_id": {"name": "plan_id", "type": "BIGINT", "pk": false, "nn": true, "uq": false, "ddl": "plan_id BIGINT NOT NULL REFERENCES study_plans(id)", "fks": [{"source": "student_group_plan_assignments", "columns": ["plan_id"], "column": "plan_id", "target": "study_plans", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 95}]}}, "constraints": ["CONSTRAINT pk_group_plan_assignment PRIMARY KEY (group_id, semester_id)"], "indexes": ["CREATE INDEX idx_group_plan_assignment_plan ON student_group_plan_assignments(plan_id)"], "x": 1472, "y": 1108, "width": 512, "height": 148, "rows": {"group_id": {"top": 1172, "height": 28, "center": 1186.0}, "semester_id": {"top": 1200, "height": 28, "center": 1214.0}, "plan_id": {"top": 1228, "height": 28, "center": 1242.0}}, "column": 2}}, "edges": [{"source": "specialty_profiles", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 1}, {"source": "users", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 2}, {"source": "auth_refresh_tokens", "columns": ["user_id"], "column": "user_id", "target": "users", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 3}, {"source": "teacher_department_assignments", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 4}, {"source": "teacher_department_assignments", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 5}, {"source": "teacher_department_assignments", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 6}, {"source": "teacher_creation_requests", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 7}, {"source": "teacher_creation_requests", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 8}, {"source": "teacher_creation_requests", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 9}, {"source": "teacher_creation_requests", "columns": ["created_teacher_id"], "column": "created_teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 10}, {"source": "student_groups", "columns": ["education_form_id"], "column": "education_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 11}, {"source": "student_groups", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 12}, {"source": "student_groups", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 13}, {"source": "student_groups", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 14}, {"source": "subgroups", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 15}, {"source": "subjects", "columns": ["department_id"], "column": "department_id", "target": "departments", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 16}, {"source": "subject_comments", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 17}, {"source": "subject_comments", "columns": ["author_id"], "column": "author_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 18}, {"source": "classroom_equipments", "columns": ["classroom_id"], "column": "classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 19}, {"source": "classroom_equipments", "columns": ["equipment_id"], "column": "equipment_id", "target": "equipments", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 20}, {"source": "teacher_subjects", "columns": ["user_id"], "column": "user_id", "target": "users", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 21}, {"source": "teacher_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 22}, {"source": "teacher_subjects", "columns": ["lesson_type_id"], "column": "lesson_type_id", "target": "lesson_types", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 23}, {"source": "time_slots", "columns": ["time_slot_scope_id"], "column": "time_slot_scope_id", "target": "time_slot_scopes", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 24}, {"source": "time_slot_date_assignments", "columns": ["time_slot_scope_id"], "column": "time_slot_scope_id", "target": "time_slot_scopes", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 25}, {"source": "teacher_subjects", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 26}, {"source": "semesters", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 27}, {"source": "academic_calendars", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 28}, {"source": "academic_calendars", "columns": ["specialty_id"], "column": "specialty_id", "target": "specialties", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 29}, {"source": "academic_calendars", "columns": ["study_form_id"], "column": "study_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 30}, {"source": "academic_calendars", "columns": ["specialty_profile_id", "specialty_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id", "specialty_id"], "key": "id", "action": "NO ACTION", "number": 31}, {"source": "academic_calendar_periods", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 32}, {"source": "academic_calendar_periods", "columns": ["activity_type_id"], "column": "activity_type_id", "target": "academic_calendar_activity_types", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 33}, {"source": "academic_calendar_subjects", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 34}, {"source": "academic_calendar_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 35}, {"source": "student_group_calendar_assignments", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 36}, {"source": "student_group_calendar_assignments", "columns": ["academic_year_id"], "column": "academic_year_id", "target": "academic_years", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 37}, {"source": "student_group_calendar_assignments", "columns": ["calendar_id"], "column": "calendar_id", "target": "academic_calendars", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 38}, {"source": "schedule_rules", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 39}, {"source": "schedule_rules", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 40}, {"source": "schedule_rules", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 41}, {"source": "schedule_rule_loads", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 42}, {"source": "schedule_rule_loads", "columns": ["lesson_type_code"], "column": "lesson_type_code", "target": "lesson_types", "keys": ["code"], "key": "code", "action": "NO ACTION", "number": 43}, {"source": "schedule_rule_groups", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 44}, {"source": "schedule_rule_groups", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 45}, {"source": "schedule_rule_slots", "columns": ["schedule_rule_id"], "column": "schedule_rule_id", "target": "schedule_rules", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 46}, {"source": "schedule_rule_slots", "columns": ["time_slot_id"], "column": "time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 47}, {"source": "schedule_rule_slots", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 48}, {"source": "schedule_rule_slots", "columns": ["classroom_id"], "column": "classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 49}, {"source": "schedule_rule_slots", "columns": ["lesson_type_id"], "column": "lesson_type_id", "target": "lesson_types", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 50}, {"source": "schedule_rule_slots", "columns": ["locked_by"], "column": "locked_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 51}, {"source": "schedule_rule_slot_subgroups", "columns": ["schedule_rule_slot_id"], "column": "schedule_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 52}, {"source": "schedule_rule_slot_subgroups", "columns": ["subgroup_id"], "column": "subgroup_id", "target": "subgroups", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 53}, {"source": "schedule_overrides", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 54}, {"source": "schedule_overrides", "columns": ["new_time_slot_id"], "column": "new_time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 55}, {"source": "schedule_overrides", "columns": ["new_classroom_id"], "column": "new_classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 56}, {"source": "schedule_overrides", "columns": ["new_teacher_id"], "column": "new_teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 57}, {"source": "schedule_overrides", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 58}, {"source": "teacher_absences", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 59}, {"source": "teacher_absences", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 60}, {"source": "teacher_absences", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 61}, {"source": "teacher_absence_decisions", "columns": ["absence_id"], "column": "absence_id", "target": "teacher_absences", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 62}, {"source": "teacher_absence_decisions", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 63}, {"source": "teacher_absence_decisions", "columns": ["schedule_override_id"], "column": "schedule_override_id", "target": "schedule_overrides", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 64}, {"source": "teacher_absence_decisions", "columns": ["decided_by"], "column": "decided_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 65}, {"source": "teacher_preferences", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 66}, {"source": "teacher_preferences", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 67}, {"source": "teacher_preferences", "columns": ["time_slot_id"], "column": "time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 68}, {"source": "teacher_preferences", "columns": ["requested_by"], "column": "requested_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 69}, {"source": "teacher_preferences", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 70}, {"source": "teacher_change_requests", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 71}, {"source": "teacher_change_requests", "columns": ["base_rule_slot_id"], "column": "base_rule_slot_id", "target": "schedule_rule_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 72}, {"source": "teacher_change_requests", "columns": ["requested_time_slot_id"], "column": "requested_time_slot_id", "target": "time_slots", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 73}, {"source": "teacher_change_requests", "columns": ["requested_classroom_id"], "column": "requested_classroom_id", "target": "classrooms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 74}, {"source": "teacher_change_requests", "columns": ["reviewed_by"], "column": "reviewed_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 75}, {"source": "teacher_change_requests", "columns": ["applied_override_id"], "column": "applied_override_id", "target": "schedule_overrides", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 76}, {"source": "teacher_change_request_history", "columns": ["request_id"], "column": "request_id", "target": "teacher_change_requests", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 77}, {"source": "teacher_change_request_history", "columns": ["actor_id"], "column": "actor_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 78}, {"source": "schedule_versions", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 79}, {"source": "schedule_versions", "columns": ["based_on_version_id"], "column": "based_on_version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 80}, {"source": "schedule_versions", "columns": ["restored_from_version_id"], "column": "restored_from_version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 81}, {"source": "schedule_versions", "columns": ["created_by"], "column": "created_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 82}, {"source": "schedule_versions", "columns": ["published_by"], "column": "published_by", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 83}, {"source": "schedule_rules", "columns": ["schedule_version_id", "semester_id"], "column": "schedule_version_id", "target": "schedule_versions", "keys": ["id", "semester_id"], "key": "id", "action": "CASCADE", "number": 84}, {"source": "schedule_version_history", "columns": ["version_id"], "column": "version_id", "target": "schedule_versions", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 85}, {"source": "schedule_version_history", "columns": ["actor_id"], "column": "actor_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 86}, {"source": "study_plans", "columns": ["specialty_profile_id"], "column": "specialty_profile_id", "target": "specialty_profiles", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 87}, {"source": "study_plans", "columns": ["education_form_id"], "column": "education_form_id", "target": "education_forms", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 88}, {"source": "study_plan_subjects", "columns": ["plan_id"], "column": "plan_id", "target": "study_plans", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 89}, {"source": "study_plan_subjects", "columns": ["subject_id"], "column": "subject_id", "target": "subjects", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 90}, {"source": "study_plan_loads", "columns": ["plan_subject_id"], "column": "plan_subject_id", "target": "study_plan_subjects", "keys": ["id"], "key": "id", "action": "CASCADE", "number": 91}, {"source": "study_plan_loads", "columns": ["teacher_id"], "column": "teacher_id", "target": "users", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 92}, {"source": "student_group_plan_assignments", "columns": ["group_id"], "column": "group_id", "target": "student_groups", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 93}, {"source": "student_group_plan_assignments", "columns": ["semester_id"], "column": "semester_id", "target": "semesters", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 94}, {"source": "student_group_plan_assignments", "columns": ["plan_id"], "column": "plan_id", "target": "study_plans", "keys": ["id"], "key": "id", "action": "NO ACTION", "number": 95}, {"source": "departments", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 96}, {"source": "specialties", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 97}, {"source": "specialty_profiles", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 98}, {"source": "users", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 99}, {"source": "education_forms", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 100}, {"source": "student_groups", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 101}, {"source": "subgroups", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 102}, {"source": "subjects", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 103}, {"source": "equipments", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 104}, {"source": "classrooms", "columns": ["archived_by"], "column": "archived_by", "target": "users", "keys": ["id"], "key": "id", "action": "SET NULL", "number": 105}]}</script>
|
||
<script>
|
||
(() => {
|
||
'use strict';
|
||
const data = JSON.parse(document.getElementById('schema-data').textContent);
|
||
const svg = document.getElementById('schema');
|
||
const viewport = document.getElementById('viewport');
|
||
const canvas = document.getElementById('canvas');
|
||
const inspector = document.getElementById('inspector');
|
||
const status = document.getElementById('status');
|
||
const zoomValue = document.getElementById('zoom-value');
|
||
const search = document.getElementById('search');
|
||
const entities = [...svg.querySelectorAll('.entity')];
|
||
const relations = [...svg.querySelectorAll('.relation')];
|
||
let scale = 1, selected = null, dragging = null, moved = false;
|
||
const escape = value => String(value).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
||
function zoom(next, x=viewport.clientWidth/2, y=viewport.clientHeight/2) {
|
||
next = Math.max(.06,Math.min(2.5,next));
|
||
const worldX = (viewport.scrollLeft+x-20)/scale;
|
||
const worldY = (viewport.scrollTop+y-20)/scale;
|
||
scale = next;
|
||
svg.style.width = `${data.width*scale}px`;
|
||
svg.style.height = `${data.height*scale}px`;
|
||
viewport.scrollLeft = worldX*scale-x+20;
|
||
viewport.scrollTop = worldY*scale-y+20;
|
||
zoomValue.value = `${Math.round(scale*100)}%`;
|
||
}
|
||
function fit() {
|
||
zoom(Math.min((viewport.clientWidth-40)/data.width,(viewport.clientHeight-40)/data.height));
|
||
viewport.scrollTo(0,0);
|
||
}
|
||
function highlight(name, edgeNumber=null) {
|
||
svg.classList.toggle('schema-focused',Boolean(name || edgeNumber));
|
||
const connected = new Set(name?[name]:[]);
|
||
relations.forEach(r=>{
|
||
const active = edgeNumber ? Number(r.dataset.number)===edgeNumber : name && (r.dataset.source===name || r.dataset.target===name);
|
||
r.classList.toggle('active',Boolean(active));
|
||
if(active){connected.add(r.dataset.source);connected.add(r.dataset.target);}
|
||
});
|
||
entities.forEach(e=>{e.classList.toggle('selected',e.dataset.table===name);e.classList.toggle('related',connected.has(e.dataset.table));});
|
||
}
|
||
function clear() {
|
||
selected = null;
|
||
inspector.hidden = true;
|
||
highlight(null);
|
||
status.textContent = 'Все 46 таблиц и 105 связей на одном полотне. Стрелки: FK → PK/UQ. ● NOT NULL · ○ NULL';
|
||
}
|
||
function focus(name) {
|
||
if(!data.tables[name])return;
|
||
select(name);
|
||
zoom(1);
|
||
const t = data.tables[name];
|
||
viewport.scrollLeft = t.x*scale-viewport.clientWidth/2+t.width*scale/2+20;
|
||
viewport.scrollTop = t.y*scale-60;
|
||
}
|
||
function edgeList(edges,direction) {
|
||
if(!edges.length)return '<p>Нет.</p>';
|
||
return '<ul class="link-list">'+edges.map(e=>`<li><button type="button" data-link="${escape(direction==='out'?e.target:e.source)}" data-edge="${e.number}"><code>FK${String(e.number).padStart(2,'0')} · ${escape(e.source)}.${escape(e.columns.join(', '))} → ${escape(e.target)}.${escape(e.keys.join(', '))}</code></button><small>ON DELETE ${escape(e.action)} · ${data.tables[e.source].columns[e.column].nn?'обязательная ссылка':'NULL допустим'}</small></li>`).join('')+'</ul>';
|
||
}
|
||
function select(name) {
|
||
selected = name;
|
||
highlight(name);
|
||
const table = data.tables[name];
|
||
const outgoing = data.edges.filter(e=>e.source===name);
|
||
const incoming = data.edges.filter(e=>e.target===name);
|
||
inspector.innerHTML = `<button class="close" type="button" aria-label="Закрыть сведения">×</button><h2>${escape(name)}</h2><p>${escape(table.label)}</p><p>${Object.keys(table.columns).length} столбцов · ${outgoing.length} исходящих FK · ${incoming.length} входящих FK</p><h3>Исходящие связи</h3>${edgeList(outgoing,'out')}<h3>Входящие связи</h3>${edgeList(incoming,'in')}<h3>Ограничения</h3>${table.constraints.length?table.constraints.map(c=>`<code class="constraint">${escape(c)}</code>`).join(''):'<p>Отдельные ограничения не объявлены.</p>'}<h3>Явные индексы</h3>${table.indexes.length?table.indexes.map(c=>`<code class="constraint">${escape(c)}</code>`).join(''):'<p>Нет. Индексы PK и UNIQUE создаются PostgreSQL автоматически.</p>'}`;
|
||
inspector.hidden = false;
|
||
inspector.querySelector('.close').addEventListener('click',clear);
|
||
inspector.querySelectorAll('[data-link]').forEach(button=>button.addEventListener('click',()=>focus(button.dataset.link)));
|
||
status.textContent = `${name} · ${outgoing.length} исходящих и ${incoming.length} входящих FK · все остальные таблицы остаются на полотне`;
|
||
}
|
||
entities.forEach(entity=>{
|
||
const name = entity.dataset.table;
|
||
entity.addEventListener('mouseenter',()=>{if(!selected && !dragging)highlight(name);});
|
||
entity.addEventListener('mouseleave',()=>{if(!selected)highlight(null);});
|
||
entity.addEventListener('click',()=>{if(!moved)select(name);});
|
||
entity.addEventListener('dblclick',()=>focus(name));
|
||
entity.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){e.preventDefault();select(name);}});
|
||
});
|
||
relations.forEach(relation=>{
|
||
relation.addEventListener('mouseenter',()=>{
|
||
if(!selected)highlight(null,Number(relation.dataset.number));
|
||
const e = data.edges.find(e=>e.number===Number(relation.dataset.number));
|
||
status.textContent = `FK${String(e.number).padStart(2,'0')}: ${e.source}.${e.column} → ${e.target}.${e.key} · ON DELETE ${e.action}`;
|
||
});
|
||
relation.addEventListener('mouseleave',()=>{if(!selected){highlight(null);status.textContent='Все 46 таблиц и 105 связей на одном полотне. Стрелки: FK → PK/UQ. ● NOT NULL · ○ NULL';}});
|
||
});
|
||
document.getElementById('zoom-in').addEventListener('click',()=>zoom(scale*1.25));
|
||
document.getElementById('zoom-out').addEventListener('click',()=>zoom(scale/1.25));
|
||
document.getElementById('actual').addEventListener('click',()=>zoom(1));
|
||
document.getElementById('fit').addEventListener('click',()=>{clear();fit();});
|
||
document.getElementById('clear').addEventListener('click',clear);
|
||
viewport.addEventListener('wheel',e=>{
|
||
if(!e.ctrlKey&&!e.metaKey)return;
|
||
e.preventDefault();
|
||
const rect=viewport.getBoundingClientRect();
|
||
zoom(scale*Math.exp(-e.deltaY*.002),e.clientX-rect.left,e.clientY-rect.top);
|
||
},{passive:false});
|
||
viewport.addEventListener('pointerdown',e=>{
|
||
if(e.button!==0||e.target.closest('.entity'))return;
|
||
dragging={x:e.clientX,y:e.clientY,left:viewport.scrollLeft,top:viewport.scrollTop};
|
||
moved=false;
|
||
viewport.setPointerCapture(e.pointerId);
|
||
viewport.classList.add('dragging');
|
||
});
|
||
viewport.addEventListener('pointermove',e=>{
|
||
if(!dragging)return;
|
||
const dx=e.clientX-dragging.x,dy=e.clientY-dragging.y;
|
||
moved=moved||Math.abs(dx)+Math.abs(dy)>4;
|
||
viewport.scrollLeft=dragging.left-dx;viewport.scrollTop=dragging.top-dy;
|
||
});
|
||
function stop(){if(dragging&&!moved)clear();dragging=null;viewport.classList.remove('dragging');setTimeout(()=>{moved=false;},0);}
|
||
viewport.addEventListener('pointerup',stop);viewport.addEventListener('pointercancel',stop);
|
||
document.addEventListener('keydown',e=>{if(e.key==='Escape')clear();});
|
||
const names = document.getElementById('table-names');
|
||
Object.keys(data.tables).sort().forEach(name=>{const option=document.createElement('option');option.value=name;option.label=data.tables[name].label;names.append(option);});
|
||
function searchTable(){const term=search.value.trim().toLowerCase();const name=data.tables[term]?term:Object.keys(data.tables).find(n=>n.includes(term)||data.tables[n].label.toLowerCase().includes(term));if(term&&name)focus(name);}
|
||
search.addEventListener('change',searchTable);search.addEventListener('keydown',e=>{if(e.key==='Enter')searchTable();});
|
||
requestAnimationFrame(fit);
|
||
window.addEventListener('resize',()=>{if(scale<.3)fit();});
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|