Files
slide/decks/gen2D/public/data-model.svg
T

66 lines
3.9 KiB
XML
Raw Normal View History

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 300" font-family="Microsoft YaHei, PingFang SC, Helvetica, Arial, sans-serif">
<defs>
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
<feDropShadow dx="1" dy="1" stdDeviation="2" flood-opacity="0.12"/>
</filter>
<marker id="arrow" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#6c8ebf"/>
</marker>
</defs>
<!-- USER -->
<rect x="40" y="80" width="150" height="120" rx="8" fill="#dae8fc" stroke="#6c8ebf" stroke-width="1.5" filter="url(#shadow)"/>
<rect x="40" y="80" width="150" height="32" rx="8" fill="#6c8ebf"/>
<text x="115" y="102" font-size="13" fill="#fff" text-anchor="middle" font-weight="bold">USER</text>
<text x="55" y="132" font-size="11" fill="#333">🔑 id (base62)</text>
<text x="55" y="150" font-size="11" fill="#333">username</text>
<text x="55" y="168" font-size="11" fill="#333">password_hash</text>
<text x="55" y="186" font-size="10" fill="#888">(bcrypt)</text>
<!-- USER → PROJECT (1:N) -->
<line x1="192" y1="140" x2="248" y2="140" stroke="#6c8ebf" stroke-width="2" marker-end="url(#arrow)"/>
<text x="220" y="132" font-size="10" fill="#6c8ebf" text-anchor="middle">1 : N</text>
<!-- PROJECT -->
<rect x="250" y="60" width="150" height="160" rx="8" fill="#d5e8d4" stroke="#82b366" stroke-width="1.5" filter="url(#shadow)"/>
<rect x="250" y="60" width="150" height="32" rx="8" fill="#82b366"/>
<text x="325" y="82" font-size="13" fill="#fff" text-anchor="middle" font-weight="bold">PROJECT</text>
<text x="265" y="112" font-size="11" fill="#333">🔑 id</text>
<text x="265" y="130" font-size="11" fill="#333">user_id (FK)</text>
<text x="265" y="148" font-size="11" fill="#333">name</text>
<text x="265" y="166" font-size="11" fill="#333">description</text>
<!-- PROJECT → PROJECT_STYLE (1:1) -->
<line x1="402" y1="110" x2="458" y2="110" stroke="#82b366" stroke-width="2" marker-end="url(#arrow)"/>
<text x="430" y="102" font-size="10" fill="#82b366" text-anchor="middle">1 : 1</text>
<!-- PROJECT_STYLE -->
<rect x="460" y="50" width="150" height="120" rx="8" fill="#fff2cc" stroke="#d6b656" stroke-width="1.5" filter="url(#shadow)"/>
<rect x="460" y="50" width="150" height="32" rx="8" fill="#d6b656"/>
<text x="535" y="72" font-size="12" fill="#fff" text-anchor="middle" font-weight="bold">PROJECT_STYLE</text>
<text x="475" y="102" font-size="11" fill="#333">🔑 project_id (FK)</text>
<text x="475" y="120" font-size="11" fill="#333">kv_pairs (JSON)</text>
<text x="475" y="150" font-size="10" fill="#888">artStyle, palette, ...</text>
<!-- PROJECT → TASK (1:N) -->
<line x1="325" y1="222" x2="325" y2="248" stroke="#6c8ebf" stroke-width="2" marker-end="url(#arrow)"/>
<text x="340" y="240" font-size="10" fill="#6c8ebf">1 : N</text>
<!-- TASK -->
<rect x="230" y="250" width="190" height="40" rx="6" fill="#e1d5e7" stroke="#9673a6" stroke-width="1.5" filter="url(#shadow)"/>
<text x="325" y="275" font-size="12" fill="#333" text-anchor="middle" font-weight="bold">TASK</text>
<text x="240" y="275" font-size="10" fill="#888" dx="85">prompt · status · style_override</text>
<!-- TASK → ASSET (1:N) -->
<line x1="422" y1="270" x2="478" y2="270" stroke="#9673a6" stroke-width="2" marker-end="url(#arrow)"/>
<text x="450" y="262" font-size="10" fill="#9673a6" text-anchor="middle">1 : N</text>
<!-- ASSET -->
<rect x="480" y="250" width="190" height="40" rx="6" fill="#f8cecc" stroke="#b85450" stroke-width="1.5" filter="url(#shadow)"/>
<text x="575" y="275" font-size="12" fill="#333" text-anchor="middle" font-weight="bold">ASSET</text>
<text x="490" y="275" font-size="10" fill="#888" dx="85">file_url · metadata</text>
<!-- 七牛云 label -->
<text x="700" y="275" font-size="10" fill="#999">→ 七牛云 Kodo</text>
</svg>