feat(articlesupplier): add sort column, reorder method, and update queries and schema

This commit is contained in:
seb
2026-09-17 12:00:41 +02:00
parent 4c196c7209
commit af52ff595f
16 changed files with 264 additions and 78 deletions

View File

@@ -4,11 +4,11 @@
<!-- Generated by graphviz version 16.1.0 (0)
-->
<!-- Title: schema Pages: 1 -->
<svg width="5281pt" height="1789pt"
viewBox="0.00 0.00 5281.00 1789.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#1e2430;">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(36 1753.03)">
<svg width="5281pt" height="1785pt"
viewBox="0.00 0.00 5281.00 1785.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#1e2430;">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(36 1749.49)">
<title>schema</title>
<polygon fill="#1e2430" stroke="none" points="-36,36 -36,-1753.03 5245.27,-1753.03 5245.27,36 -36,36"/>
<polygon fill="#1e2430" stroke="none" points="-36,36 -36,-1749.49 5245.27,-1749.49 5245.27,36 -36,36"/>
<g id="clust1" class="cluster">
<title>cluster_identity</title>
<path fill="#202a3a" stroke="#3f4c5f" d="M670,-196.8C670,-196.8 1976,-196.8 1976,-196.8 1982,-196.8 1988,-202.8 1988,-208.8 1988,-208.8 1988,-1643.6 1988,-1643.6 1988,-1649.6 1982,-1655.6 1976,-1655.6 1976,-1655.6 670,-1655.6 670,-1655.6 664,-1655.6 658,-1649.6 658,-1643.6 658,-1643.6 658,-208.8 658,-208.8 658,-202.8 664,-196.8 670,-196.8"/>
@@ -21,8 +21,8 @@
</g>
<g id="clust3" class="cluster">
<title>cluster_catalog</title>
<path fill="#202a3a" stroke="#3f4c5f" d="M3090,-8C3090,-8 3894,-8 3894,-8 3900,-8 3906,-14 3906,-20 3906,-20 3906,-1590 3906,-1590 3906,-1596 3900,-1602 3894,-1602 3894,-1602 3090,-1602 3090,-1602 3084,-1602 3078,-1596 3078,-1590 3078,-1590 3078,-20 3078,-20 3078,-14 3084,-8 3090,-8"/>
<text xml:space="preserve" text-anchor="middle" x="3111.85" y="-1584.5" font-family="Helvetica,sans-Serif" font-size="15.00" fill="#e2e8f0">Catalog</text>
<path fill="#202a3a" stroke="#3f4c5f" d="M3090,-8C3090,-8 3894,-8 3894,-8 3900,-8 3906,-14 3906,-20 3906,-20 3906,-1603.4 3906,-1603.4 3906,-1609.4 3900,-1615.4 3894,-1615.4 3894,-1615.4 3090,-1615.4 3090,-1615.4 3084,-1615.4 3078,-1609.4 3078,-1603.4 3078,-1603.4 3078,-20 3078,-20 3078,-14 3084,-8 3090,-8"/>
<text xml:space="preserve" text-anchor="middle" x="3111.85" y="-1597.9" font-family="Helvetica,sans-Serif" font-size="15.00" fill="#e2e8f0">Catalog</text>
</g>
<g id="clust4" class="cluster">
<title>cluster_media</title>
@@ -1242,58 +1242,62 @@
<!-- articlesupplier -->
<g id="node24" class="node">
<title>articlesupplier</title>
<polygon fill="#33415c" stroke="none" points="3542.46,-1533.6 3542.46,-1558 3661.54,-1558 3661.54,-1533.6 3542.46,-1533.6"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1533.6 3542.46,-1558 3661.54,-1558 3661.54,-1533.6 3542.46,-1533.6"/>
<text xml:space="preserve" text-anchor="start" x="3560.98" y="-1543.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#e2e8f0">articlesupplier</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1506.8 3542.46,-1533.6 3661.54,-1533.6 3661.54,-1506.8 3542.46,-1506.8"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1506.8 3542.46,-1533.6 3661.54,-1533.6 3661.54,-1506.8 3542.46,-1506.8"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1517" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">id</text>
<text xml:space="preserve" text-anchor="start" x="3627.04" y="-1518.5" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.04" y="-1518.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">PK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1480 3542.46,-1506.8 3661.54,-1506.8 3661.54,-1480 3542.46,-1480"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1480 3542.46,-1506.8 3661.54,-1506.8 3661.54,-1480 3542.46,-1480"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1490.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">entity_id</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1491.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1491.7" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1453.2 3542.46,-1480 3661.54,-1480 3661.54,-1453.2 3542.46,-1453.2"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1453.2 3542.46,-1480 3661.54,-1480 3661.54,-1453.2 3542.46,-1453.2"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1463.4" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">price_id</text>
<text xml:space="preserve" text-anchor="start" x="3601.15" y="-1463.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">?</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1464.9" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1464.9" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1426.4 3542.46,-1453.2 3661.54,-1453.2 3661.54,-1426.4 3542.46,-1426.4"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1426.4 3542.46,-1453.2 3661.54,-1453.2 3661.54,-1426.4 3542.46,-1426.4"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1436.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">article_id</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1438.1" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1438.1" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2a3242" stroke="none" points="3542.46,-1399.6 3542.46,-1426.4 3661.54,-1426.4 3661.54,-1399.6 3542.46,-1399.6"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1399.6 3542.46,-1426.4 3661.54,-1426.4 3661.54,-1399.6 3542.46,-1399.6"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1407.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">sku?</text>
<text xml:space="preserve" text-anchor="start" x="3585.03" y="-1409.4" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">NVARCHAR(100)</text>
<polygon fill="#272e3d" stroke="none" points="3542.46,-1372.8 3542.46,-1399.6 3661.54,-1399.6 3661.54,-1372.8 3542.46,-1372.8"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1372.8 3542.46,-1399.6 3661.54,-1399.6 3661.54,-1372.8 3542.46,-1372.8"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1380.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">stock?</text>
<text xml:space="preserve" text-anchor="start" x="3627.54" y="-1382.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">FLOAT</text>
<polygon fill="#2a3242" stroke="none" points="3542.46,-1346 3542.46,-1372.8 3661.54,-1372.8 3661.54,-1346 3542.46,-1346"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1346 3542.46,-1372.8 3661.54,-1372.8 3661.54,-1346 3542.46,-1346"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1353.8" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">pu</text>
<text xml:space="preserve" text-anchor="start" x="3627.54" y="-1355.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">FLOAT</text>
<polygon fill="#33415c" stroke="none" points="3542.46,-1547 3542.46,-1571.4 3661.54,-1571.4 3661.54,-1547 3542.46,-1547"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1547 3542.46,-1571.4 3661.54,-1571.4 3661.54,-1547 3542.46,-1547"/>
<text xml:space="preserve" text-anchor="start" x="3560.98" y="-1556.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#e2e8f0">articlesupplier</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1520.2 3542.46,-1547 3661.54,-1547 3661.54,-1520.2 3542.46,-1520.2"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1520.2 3542.46,-1547 3661.54,-1547 3661.54,-1520.2 3542.46,-1520.2"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1530.4" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">id</text>
<text xml:space="preserve" text-anchor="start" x="3627.04" y="-1531.9" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.04" y="-1531.9" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">PK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1493.4 3542.46,-1520.2 3661.54,-1520.2 3661.54,-1493.4 3542.46,-1493.4"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1493.4 3542.46,-1520.2 3661.54,-1520.2 3661.54,-1493.4 3542.46,-1493.4"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1503.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">entity_id</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1505.1" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1505.1" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1466.6 3542.46,-1493.4 3661.54,-1493.4 3661.54,-1466.6 3542.46,-1466.6"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1466.6 3542.46,-1493.4 3661.54,-1493.4 3661.54,-1466.6 3542.46,-1466.6"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1476.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">price_id</text>
<text xml:space="preserve" text-anchor="start" x="3601.15" y="-1476.8" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">?</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1478.3" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1478.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2b3a52" stroke="none" points="3542.46,-1439.8 3542.46,-1466.6 3661.54,-1466.6 3661.54,-1439.8 3542.46,-1439.8"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1439.8 3542.46,-1466.6 3661.54,-1466.6 3661.54,-1439.8 3542.46,-1439.8"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1450" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#d8dee9">article_id</text>
<text xml:space="preserve" text-anchor="start" x="3627.55" y="-1451.5" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT </text>
<text xml:space="preserve" text-anchor="start" x="3644.55" y="-1451.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#8b95a7">FK</text>
<polygon fill="#2a3242" stroke="none" points="3542.46,-1413 3542.46,-1439.8 3661.54,-1439.8 3661.54,-1413 3542.46,-1413"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1413 3542.46,-1439.8 3661.54,-1439.8 3661.54,-1413 3542.46,-1413"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1420.8" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">sku?</text>
<text xml:space="preserve" text-anchor="start" x="3585.03" y="-1422.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">NVARCHAR(100)</text>
<polygon fill="#272e3d" stroke="none" points="3542.46,-1386.2 3542.46,-1413 3661.54,-1413 3661.54,-1386.2 3542.46,-1386.2"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1386.2 3542.46,-1413 3661.54,-1413 3661.54,-1386.2 3542.46,-1386.2"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1394" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">stock?</text>
<text xml:space="preserve" text-anchor="start" x="3627.54" y="-1396" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">FLOAT</text>
<polygon fill="#2a3242" stroke="none" points="3542.46,-1359.4 3542.46,-1386.2 3661.54,-1386.2 3661.54,-1359.4 3542.46,-1359.4"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1359.4 3542.46,-1386.2 3661.54,-1386.2 3661.54,-1359.4 3542.46,-1359.4"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1367.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">pu</text>
<text xml:space="preserve" text-anchor="start" x="3627.54" y="-1369.2" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">FLOAT</text>
<polygon fill="#272e3d" stroke="none" points="3542.46,-1332.6 3542.46,-1359.4 3661.54,-1359.4 3661.54,-1332.6 3542.46,-1332.6"/>
<polygon fill="none" stroke="#3f4c5f" points="3542.46,-1332.6 3542.46,-1359.4 3661.54,-1359.4 3661.54,-1332.6 3542.46,-1332.6"/>
<text xml:space="preserve" text-anchor="start" x="3547.46" y="-1340.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#d8dee9">sort</text>
<text xml:space="preserve" text-anchor="start" x="3642.05" y="-1342.4" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#8b95a7">INT</text>
</g>
<!-- articlesupplier&#45;&gt;entity -->
<g id="edge47" class="edge">
<title>articlesupplier:w&#45;&gt;entity:n</title>
<g id="a_edge47"><a xlink:title="FK_articlesupplier_entity">
<path fill="none" stroke="#66b3ff" stroke-width="1.4" d="M3541.46,-1493.4C3447.63,-1493.4 3570.91,-1347.85 3500,-1286.4 3389.92,-1191 2336.31,-1224.59 2191,-1214.4 1971.42,-1198.99 1211.53,-1348.01 1190.79,-1137.94"/>
<path fill="none" stroke="#66b3ff" stroke-width="1.4" d="M3541.46,-1506.8C3441.78,-1506.8 3574.94,-1352.12 3500,-1286.4 3390.48,-1190.36 2336.31,-1224.59 2191,-1214.4 1971.42,-1198.99 1211.53,-1348.01 1190.79,-1137.94"/>
<polygon fill="#66b3ff" stroke="#66b3ff" stroke-width="1.4" points="1193.25,-1137.99 1190.46,-1131.12 1188.35,-1138.23 1193.25,-1137.99"/>
</a>
</g>
</g>
<!-- articlesupplier&#45;&gt;article -->
<g id="edge46" class="edge">
<title>articlesupplier:se&#45;&gt;article:n</title>
<title>articlesupplier:sw&#45;&gt;article:n</title>
<g id="a_edge46"><a xlink:title="FK_articlesupplier_article">
<path fill="none" stroke="#56d68a" stroke-width="1.4" d="M3662.54,-1426.4C3689.07,-1399.87 3680.62,-1374.3 3661.54,-1342 3602.42,-1241.86 3436.83,-1324.25 3428.14,-1218.42"/>
<polygon fill="#56d68a" stroke="#56d68a" stroke-width="1.4" points="3430.6,-1218.42 3427.87,-1211.52 3425.7,-1218.61 3430.6,-1218.42"/>
<path fill="none" stroke="#56d68a" stroke-width="1.4" d="M3541.46,-1439.8C3491.52,-1389.86 3534.39,-1348.08 3500,-1286.4 3478.76,-1248.3 3434.6,-1255.04 3428.49,-1218.48"/>
<polygon fill="#56d68a" stroke="#56d68a" stroke-width="1.4" points="3430.94,-1218.3 3427.95,-1211.51 3426.05,-1218.68 3430.94,-1218.3"/>
</a>
</g>
</g>
@@ -1335,9 +1339,9 @@
</g>
<!-- articlesupplier&#45;&gt;price -->
<g id="edge48" class="edge">
<title>articlesupplier:w&#45;&gt;price:n</title>
<title>articlesupplier:e&#45;&gt;price:n</title>
<g id="a_edge48"><a xlink:title="FK_articlesupplier_price">
<path fill="none" stroke="#c79bff" stroke-width="1.4" d="M3541.46,-1466.6C3454.59,-1466.6 3540.52,-1580.76 3500,-1657.6 3489.73,-1677.07 3486.21,-1684.89 3466,-1693.6 3390.29,-1726.23 3171.95,-1723.19 3095,-1693.6 3006.22,-1659.46 2935.54,-1644.71 2931.21,-1554.56"/>
<path fill="none" stroke="#c79bff" stroke-width="1.4" d="M3662.54,-1480C3704.95,-1480 3681.72,-1538.66 3660.54,-1575.4 3610.02,-1663.05 3563.43,-1666.32 3466,-1693.6 3386.61,-1715.83 3171.95,-1723.19 3095,-1693.6 3006.22,-1659.46 2935.54,-1644.71 2931.21,-1554.56"/>
<polygon fill="#c79bff" stroke="#c79bff" stroke-width="1.4" points="2933.66,-1554.66 2931.05,-1547.72 2928.76,-1554.77 2933.66,-1554.66"/>
</a>
</g>

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 201 KiB