MIF_E31232435/docs/bab3_erd.svg

47 lines
8.3 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="850" viewBox="0 0 1500 850"><rect width="1500" height="850" fill="#F7F3EE"/>
<defs><style>.title{font-family:Arial,sans-serif;font-size:28px;font-weight:700;fill:#2D2520}.label{font-family:Arial,sans-serif;font-size:16px;fill:#2D2520}.small{font-family:Arial,sans-serif;font-size:13px;fill:#4B5563}.box{fill:#fff;stroke:#8B5E3C;stroke-width:2}.note{fill:#EAF4FF;stroke:#2B6CB0;stroke-width:2}.decision{fill:#FFF7D6;stroke:#B7791F;stroke-width:2}.term{fill:#EAF8EF;stroke:#2E7D32;stroke-width:2}.db{fill:#EFF2F5;stroke:#4B5563;stroke-width:2}.line{stroke:#4B3A31;stroke-width:2;fill:none}.dash{stroke:#6B7280;stroke-width:1.8;stroke-dasharray:7 5;fill:none}</style><marker id="arrow" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto"><path d="M0,0 L10,4 L0,8 z" fill="#4B3A31"/></marker><marker id="arrow2" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto"><path d="M0,0 L10,4 L0,8 z" fill="#6B7280"/></marker></defs>
<text x="750" y="45" text-anchor="middle" class="title">Entity Relationship Diagram Database Aplikasi</text>
<rect x="80" y="110" width="245" height="170" rx="8" class="box"/>
<text x="202.5" y="134" text-anchor="middle" class="label">login</text>
<text x="94" y="162" text-anchor="start" class="small">PK id</text><text x="94" y="182" text-anchor="start" class="small">name</text><text x="94" y="202" text-anchor="start" class="small">email (unique)</text><text x="94" y="222" text-anchor="start" class="small">username (unique)</text><text x="94" y="242" text-anchor="start" class="small">password</text><text x="94" y="262" text-anchor="start" class="small">created_at</text>
<rect x="80" y="360" width="245" height="190" rx="8" class="box"/>
<text x="202.5" y="384" text-anchor="middle" class="label">password_reset_otps</text>
<text x="94" y="412" text-anchor="start" class="small">PK id</text><text x="94" y="432" text-anchor="start" class="small">FK login_id</text><text x="94" y="452" text-anchor="start" class="small">email</text><text x="94" y="472" text-anchor="start" class="small">otp_code</text><text x="94" y="492" text-anchor="start" class="small">expires_at</text><text x="94" y="512" text-anchor="start" class="small">is_used</text><text x="94" y="532" text-anchor="start" class="small">created_at</text>
<rect x="430" y="90" width="270" height="240" rx="8" class="box"/>
<text x="565.0" y="114" text-anchor="middle" class="label">products</text>
<text x="444" y="142" text-anchor="start" class="small">PK id</text><text x="444" y="162" text-anchor="start" class="small">name/product_name</text><text x="444" y="182" text-anchor="start" class="small">category</text><text x="444" y="202" text-anchor="start" class="small">product_type</text><text x="444" y="222" text-anchor="start" class="small">unit</text><text x="444" y="242" text-anchor="start" class="small">price</text><text x="444" y="262" text-anchor="start" class="small">current_stock</text><text x="444" y="282" text-anchor="start" class="small">min_stock</text><text x="444" y="302" text-anchor="start" class="small">created_at</text><text x="444" y="322" text-anchor="start" class="small">updated_at</text>
<rect x="430" y="405" width="270" height="205" rx="8" class="box"/>
<text x="565.0" y="429" text-anchor="middle" class="label">transactions / Stock In</text>
<text x="444" y="457" text-anchor="start" class="small">PK id</text><text x="444" y="477" text-anchor="start" class="small">product_name</text><text x="444" y="497" text-anchor="start" class="small">category</text><text x="444" y="517" text-anchor="start" class="small">quantity</text><text x="444" y="537" text-anchor="start" class="small">unit_price</text><text x="444" y="557" text-anchor="start" class="small">total_price</text><text x="444" y="577" text-anchor="start" class="small">transaction_date</text><text x="444" y="597" text-anchor="start" class="small">created_at</text>
<rect x="805" y="95" width="245" height="135" rx="8" class="box"/>
<text x="927.5" y="119" text-anchor="middle" class="label">recipes</text>
<text x="819" y="147" text-anchor="start" class="small">PK id</text><text x="819" y="167" text-anchor="start" class="small">recipe_name</text><text x="819" y="187" text-anchor="start" class="small">description</text><text x="819" y="207" text-anchor="start" class="small">created_at</text>
<rect x="805" y="300" width="245" height="155" rx="8" class="box"/>
<text x="927.5" y="324" text-anchor="middle" class="label">recipe_ingredients</text>
<text x="819" y="352" text-anchor="start" class="small">PK id</text><text x="819" y="372" text-anchor="start" class="small">FK recipe_id</text><text x="819" y="392" text-anchor="start" class="small">product_name</text><text x="819" y="412" text-anchor="start" class="small">quantity_needed</text><text x="819" y="432" text-anchor="start" class="small">unit</text>
<rect x="805" y="535" width="270" height="205" rx="8" class="box"/>
<text x="940.0" y="559" text-anchor="middle" class="label">stock_usage_history</text>
<text x="819" y="587" text-anchor="start" class="small">PK id</text><text x="819" y="607" text-anchor="start" class="small">recipe_name</text><text x="819" y="627" text-anchor="start" class="small">production_quantity</text><text x="819" y="647" text-anchor="start" class="small">FK product_id</text><text x="819" y="667" text-anchor="start" class="small">product_name</text><text x="819" y="687" text-anchor="start" class="small">quantity_used</text><text x="819" y="707" text-anchor="start" class="small">unit</text><text x="819" y="727" text-anchor="start" class="small">created_at</text>
<rect x="1160" y="230" width="300" height="265" rx="8" class="box"/>
<text x="1310.0" y="254" text-anchor="middle" class="label">predictions / prediksi</text>
<text x="1174" y="282" text-anchor="start" class="small">PK id</text><text x="1174" y="302" text-anchor="start" class="small">product_name/nama_produk</text><text x="1174" y="322" text-anchor="start" class="small">category</text><text x="1174" y="342" text-anchor="start" class="small">unit_price</text><text x="1174" y="362" text-anchor="start" class="small">prediction_date</text><text x="1174" y="382" text-anchor="start" class="small">predicted_quantity</text><text x="1174" y="402" text-anchor="start" class="small">estimated_needs</text><text x="1174" y="422" text-anchor="start" class="small">accuracy_r2</text><text x="1174" y="442" text-anchor="start" class="small">error_mae</text><text x="1174" y="462" text-anchor="start" class="small">created_at</text>
<rect x="1160" y="565" width="300" height="235" rx="8" class="box"/>
<text x="1310.0" y="589" text-anchor="middle" class="label">bahan / stok_masuk / stok_keluar</text>
<text x="1174" y="617" text-anchor="start" class="small">PK id</text><text x="1174" y="637" text-anchor="start" class="small">FK product_id / bahan_id</text><text x="1174" y="657" text-anchor="start" class="small">nama_bahan</text><text x="1174" y="677" text-anchor="start" class="small">stok / jumlah</text><text x="1174" y="697" text-anchor="start" class="small">unit / satuan</text><text x="1174" y="717" text-anchor="start" class="small">tanggal</text><text x="1174" y="737" text-anchor="start" class="small">created_at</text><text x="1174" y="757" text-anchor="start" class="small">updated_at</text>
<path d="M325,445 L430,180" class="line" marker-end="url(#arrow)"/>
<text x="377.5" y="307.5" text-anchor="middle" class="small">1:N</text>
<path d="M1050,165 L805,345" class="line" marker-end="url(#arrow)"/>
<text x="927.5" y="250.0" text-anchor="middle" class="small">1:N</text>
<path d="M700,210 L805,378" class="line" marker-end="url(#arrow)"/>
<text x="752.5" y="289.0" text-anchor="middle" class="small">N:1</text>
<path d="M700,210 L805,635" class="line" marker-end="url(#arrow)"/>
<text x="752.5" y="417.5" text-anchor="middle" class="small">1:N</text>
<path d="M700,210 L430,510" class="line" marker-end="url(#arrow)"/>
<text x="565.0" y="355.0" text-anchor="middle" class="small">1:N</text>
<path d="M700,210 L1160,360" class="line" marker-end="url(#arrow)"/>
<text x="930.0" y="280.0" text-anchor="middle" class="small">1:N</text>
<path d="M700,210 L1160,680" class="line" marker-end="url(#arrow)"/>
<text x="930.0" y="440.0" text-anchor="middle" class="small">1:N</text>
<path d="M1050,165 L805,635" class="line" marker-end="url(#arrow)"/>
<text x="927.5" y="395.0" text-anchor="middle" class="small">1:N</text>
</svg>