// Generated by orrery. Edit the diagram spec and re-render instead of editing this file.
import { type SVGProps, useId } from "react";

export default function ShopDataModel(props: SVGProps<SVGSVGElement>) {
  const uid = useId().replace(/[^A-Za-z0-9_-]/g, "");
  return (
    <svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" width="1004" height="599" viewBox="0 0 1004 599" role="img" aria-labelledby={`${uid}-sdw-title ${uid}-sdw-desc`} fontFamily="Inter, 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif" {...props}>
      <title id={`${uid}-sdw-title`}>
        Shop data model
      </title>
      <desc id={`${uid}-sdw-desc`}>
        Shop data model. 6 components. Connections: customers to addresses (has); customers to orders (places); addresses to orders (ships to); orders to payments (settled by); orders to order_items (contains); products to order_items (sold as).
      </desc>
      <rect width="1004" height="599" fill="#ffffff" />
      <text fontSize="20" fontWeight="600" fill="#000000">
        <tspan x="28" y="43.78">
          Shop data model
        </tspan>
      </text>
      <text fontSize="13" fill="#5f6b7a">
        <tspan x="28" y="66.18">
          An order holds many products through its items; a payment settles one order
        </tspan>
      </text>
      <g id={`${uid}-e-e1`}>
        <path d="M224 327 L304.5 327 Q312.5 327 312.5 335 L312.5 351 Q312.5 359 320.5 359 L401 359" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M232 321 L232 333 M237 321 L237 333" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M401 366 L389 359 L401 352" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="382" cy="359" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e2`}>
        <path d="M224 313 L296 313 Q304 313 304 305 L304 175 Q304 167 312 167 L384 167" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M232 307 L232 319 M237 307 L237 319" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M384 174 L372 167 L384 160" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="365" cy="167" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e3`}>
        <path d="M569 337 L608 337 Q616 337 616 329 L616 197 Q616 189 608 189 L586 189" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M577 331 L577 343 M582 331 L582 343" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M586 182 L598 189 L586 196" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="605" cy="189" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e4`}>
        <path d="M586 138 L667 138 Q675 138 675 146 L675 170 Q675 178 683 178 L764 178" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M594 132 L594 144 M599 132 L599 144" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M756 184 L756 172" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="748.5" cy="178" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e5`}>
        <path d="M586 152 L661 152 Q669 152 669 160 L669 460 Q669 468 677 468 L772 468" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M594 146 L594 158 M599 146 L599 158" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M772 475 L760 468 L772 461 M755 474 L755 462" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e6`}>
        <path d="M210 490 L772 490" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M218 484 L218 496 M223 484 L223 496" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M772 497 L760 490 L772 483" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="753" cy="490" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-el-e1`}>
        <rect x="267" y="330" width="32" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="283" y="344.68">
            has
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e2`}>
        <rect x="310" y="229.5" width="48" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="334" y="244.18">
            places
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e3`}>
        <rect x="555" y="252.5" width="55" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="582.5" y="267.18">
            ships to
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e4`}>
        <rect x="681" y="147.5" width="66" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="714" y="162.18">
            settled by
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e5`}>
        <rect x="675" y="299.5" width="59" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="704.5" y="314.18">
            contains
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e6`}>
        <rect x="465.5" y="466" width="51" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="491" y="480.68">
            sold as
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-customers`}>
        <rect x="28" y="271" width="196" height="130" rx="8" fill="#ffffff" />
        <path d="M28 305 V279 Q28 271 36 271 H216 Q224 271 224 279 V305 Z" fill="#f4f4f4" />
        <path d="M28 305 H224" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="40" y="292.73">
            customers
          </tspan>
        </text>
        <rect x="40" y="313" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="50" y="323.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="69" y="324.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="148" y="324" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="29" y="331" width="194" height="22" fill="#f9f9f9" />
        <rect x="40" y="335" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="50.5" y="345.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="69" y="346.37" fontSize="12" fill="#000000">
          email
        </text>
        <text x="148" y="346" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="69" y="368.37" fontSize="12" fill="#000000">
          name
        </text>
        <text x="148" y="368" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="29" y="375" width="194" height="22" fill="#f9f9f9" />
        <text x="69" y="390.37" fontSize="12" fill="#000000">
          created_at
        </text>
        <text x="148" y="390" fontSize="11" fill="#5f6b7a">
          timestamptz
        </text>
        <rect x="28" y="271" width="196" height="130" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-products`}>
        <rect x="42" y="441" width="168" height="130" rx="8" fill="#ffffff" />
        <path d="M42 475 V449 Q42 441 50 441 H202 Q210 441 210 449 V475 Z" fill="#f4f4f4" />
        <path d="M42 475 H210" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="54" y="462.73">
            products
          </tspan>
        </text>
        <rect x="54" y="483" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="64" y="493.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="83" y="494.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="131" y="494" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="43" y="501" width="166" height="22" fill="#f9f9f9" />
        <rect x="54" y="505" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="64.5" y="515.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="83" y="516.37" fontSize="12" fill="#000000">
          sku
        </text>
        <text x="131" y="516" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="83" y="538.37" fontSize="12" fill="#000000">
          name
        </text>
        <text x="131" y="538" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="43" y="545" width="166" height="22" fill="#f9f9f9" />
        <text x="83" y="560.37" fontSize="12" fill="#000000">
          price
        </text>
        <text x="131" y="560" fontSize="11" fill="#5f6b7a">
          numeric
        </text>
        <rect x="42" y="441" width="168" height="130" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-orders`}>
        <rect x="384" y="96" width="202" height="152" rx="8" fill="#ffffff" />
        <path d="M384 130 V104 Q384 96 392 96 H578 Q586 96 586 104 V130 Z" fill="#f4f4f4" />
        <path d="M384 130 H586" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="396" y="117.73">
            orders
          </tspan>
        </text>
        <rect x="396" y="138" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="406" y="148.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="424" y="149.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="510" y="149" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="385" y="156" width="200" height="22" fill="#f9f9f9" />
        <rect x="396" y="160" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="405.5" y="170.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="424" y="171.37" fontSize="12" fill="#000000">
          customer_id
        </text>
        <text x="510" y="171" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="396" y="182" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="405.5" y="192.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="424" y="193.37" fontSize="12" fill="#000000">
          address_id
        </text>
        <text x="510" y="193" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="385" y="200" width="200" height="22" fill="#f9f9f9" />
        <text x="424" y="215.37" fontSize="12" fill="#000000">
          status
        </text>
        <text x="510" y="215" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="424" y="237.37" fontSize="12" fill="#000000">
          placed_at
        </text>
        <text x="510" y="237" fontSize="11" fill="#5f6b7a">
          timestamptz
        </text>
        <rect x="384" y="96" width="202" height="152" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-addresses`}>
        <rect x="401" y="288" width="168" height="152" rx="8" fill="#ffffff" />
        <path d="M401 322 V296 Q401 288 409 288 H561 Q569 288 569 296 V322 Z" fill="#f4f4f4" />
        <path d="M401 322 H569" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="413" y="309.73">
            addresses
          </tspan>
        </text>
        <rect x="413" y="330" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="423" y="340.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="441" y="341.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="527" y="341" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="402" y="348" width="166" height="22" fill="#f9f9f9" />
        <rect x="413" y="352" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="422.5" y="362.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="441" y="363.37" fontSize="12" fill="#000000">
          customer_id
        </text>
        <text x="527" y="363" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <text x="441" y="385.37" fontSize="12" fill="#000000">
          line1
        </text>
        <text x="527" y="385" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="402" y="392" width="166" height="22" fill="#f9f9f9" />
        <text x="441" y="407.37" fontSize="12" fill="#000000">
          city
        </text>
        <text x="527" y="407" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="441" y="429.37" fontSize="12" fill="#5f6b7a">
          postcode
        </text>
        <text x="527" y="429" fontSize="11" fill="#5f6b7a">
          text?
        </text>
        <rect x="401" y="288" width="168" height="152" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-payments`}>
        <rect x="764" y="107" width="212" height="130" rx="8" fill="#ffffff" />
        <path d="M764 141 V115 Q764 107 772 107 H968 Q976 107 976 115 V141 Z" fill="#f4f4f4" />
        <path d="M764 141 H976" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="776" y="128.73">
            payments
          </tspan>
        </text>
        <rect x="776" y="149" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="786" y="159.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="827" y="160.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="894" y="160" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="765" y="167" width="210" height="22" fill="#f9f9f9" />
        <rect x="776" y="171" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="785.5" y="181.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <rect x="798" y="171" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="808.5" y="181.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="827" y="182.37" fontSize="12" fill="#000000">
          order_id
        </text>
        <text x="894" y="182" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <text x="827" y="204.37" fontSize="12" fill="#000000">
          provider
        </text>
        <text x="894" y="204" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="765" y="211" width="210" height="22" fill="#f9f9f9" />
        <text x="827" y="226.37" fontSize="12" fill="#5f6b7a">
          paid_at
        </text>
        <text x="894" y="226" fontSize="11" fill="#5f6b7a">
          timestamptz?
        </text>
        <rect x="764" y="107" width="212" height="130" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-order_items`}>
        <rect x="772" y="419" width="196" height="130" rx="8" fill="#ffffff" />
        <path d="M772 453 V427 Q772 419 780 419 H960 Q968 419 968 427 V453 Z" fill="#f4f4f4" />
        <path d="M772 453 H968" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="784" y="440.73">
            order_items
          </tspan>
        </text>
        <rect x="784" y="461" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="794" y="471.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <rect x="807" y="461" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="816.5" y="471.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="834" y="472.37" fontSize="12" fontWeight="600" fill="#000000">
          order_id
        </text>
        <text x="913" y="472" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="773" y="479" width="194" height="22" fill="#f9f9f9" />
        <rect x="784" y="483" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="794" y="493.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <rect x="807" y="483" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="816.5" y="493.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="834" y="494.37" fontSize="12" fontWeight="600" fill="#000000">
          product_id
        </text>
        <text x="913" y="494" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <text x="834" y="516.37" fontSize="12" fill="#000000">
          quantity
        </text>
        <text x="913" y="516" fontSize="11" fill="#5f6b7a">
          int
        </text>
        <rect x="773" y="523" width="194" height="22" fill="#f9f9f9" />
        <text x="834" y="538.37" fontSize="12" fill="#000000">
          unit_price
        </text>
        <text x="913" y="538" fontSize="11" fill="#5f6b7a">
          numeric
        </text>
        <rect x="772" y="419" width="196" height="130" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
    </svg>
  );
}
