переработал бд

This commit is contained in:
Zuev committed 2026-10-21 02:14:01 +03:00
1 parent 6720970fa0
commit ac228ae0c3
31 files changed
+1686 -288

No files matched your search

+197
View File
@@ -0,0 +1,197 @@
<!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 LLine truncated
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 &#x27;ACTIVE&#x27;</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="Line truncated
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 &#x27;ACTIVE&#x27;</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="10Line truncated
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 &#x27;ACTIVE&#x27;</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">○<Line truncated
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 &#x27;STUDENT&#x27;</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" cLine truncated
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="startLine truncated
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-Line truncated
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="sLine truncated
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 &#x27;PENDING&#x27;</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" Line truncated
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 &#x27;ACTIVE&#x27;</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">○</Line truncated
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 &gt; 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-anchoLine truncated
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 &gt; 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 &#x27;ACTIVE&#x27;</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="558Line truncated
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 &#x27;ACTIVE&#x27;</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="middlLine truncated
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 ~ &#x27;^[A-Z][A-Z0-9_]*$&#x27;)</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 &#x27;#3788d8&#x27;</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 &#x27;ACTIVE&#x27;</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="4Line truncated
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 &gt; 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-ancLine truncated
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 &gt; 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" Line truncated
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 &#x27;#64748b&#x27;</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><Line truncated
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 &#x27;ACTIVE&#x27;</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" clasLine truncated
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"Line truncated
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_iLine truncated
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-sizeLine truncated
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-columnLine truncated
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" fLine truncated
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 BIGLine truncated
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 TEXLine truncated
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)) &gt; 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 (&#x27;LECTURE&#x27;, &#x27;PRACTICE&#x27;, &#x27;LABORATORY&#x27;))</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": 3Line truncated
<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=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[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>