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

export default function BlogDataModel(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="966" height="632" viewBox="0 0 966 632" 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`}>
        Blog data model
      </title>
      <desc id={`${uid}-sdw-desc`}>
        Blog data model. 6 components. Connections: users to posts (writes); posts to comments (has); members to comments (writes); posts to posts_tags (filed as); tags to posts_tags (files).
      </desc>
      <rect width="966" height="632" fill="#ffffff" />
      <text fontSize="20" fontWeight="600" fill="#000000">
        <tspan x="28" y="43.78">
          Blog data model
        </tspan>
      </text>
      <text fontSize="13" fill="#5f6b7a">
        <tspan x="28" y="66.18">
          The core of Ghost&#39;s schema: staff write posts, members comment, tags file posts
        </tspan>
      </text>
      <g id={`${uid}-e-e1`}>
        <path d="M196 361 L359 361" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M204 355 L204 367 M209 355 L209 367" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M359 368 L347 361 L359 354" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="340" cy="361" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e2`}>
        <path d="M574 332 L650.5 332 Q658.5 332 658.5 324 L658.5 271 Q658.5 263 666.5 263 L743 263" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M582 326 L582 338 M587 326 L587 338" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M743 270 L731 263 L743 256" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="724" cy="263" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e3`}>
        <path d="M550.5 161 L638.75 161 Q646.75 161 646.75 169 L646.75 233 Q646.75 241 654.75 241 L743 241" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M558.5 155 L558.5 167 M563.5 155 L563.5 167" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M743 248 L731 241 L743 234" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="724" cy="241" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e4`}>
        <path d="M574 346 L655.25 346 Q663.25 346 663.25 354 L663.25 403 Q663.25 411 671.25 411 L752.5 411" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M582 340 L582 352 M587 340 L587 352" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M752.5 418 L740.5 411 L752.5 404" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="733.5" cy="411" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-e-e5`}>
        <path d="M550.5 545 L643.5 545 Q651.5 545 651.5 537 L651.5 441 Q651.5 433 659.5 433 L752.5 433" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M558.5 539 L558.5 551 M563.5 539 L563.5 551" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <path d="M752.5 440 L740.5 433 L752.5 426" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        <circle cx="733.5" cy="433" r="3.5" fill="#ffffff" stroke="#545b64" strokeWidth="1.5" />
      </g>
      <g id={`${uid}-el-e1`}>
        <rect x="254.5" y="337" width="46" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="277.5" y="351.68">
            writes
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e2`}>
        <rect x="614.33" y="308" width="32" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="630.33" y="322.68">
            has
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e3`}>
        <rect x="591.67" y="137" width="46" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="614.67" y="151.68">
            writes
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e4`}>
        <rect x="607.5" y="349" width="52" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="633.5" y="363.68">
            filed as
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e5`}>
        <rect x="657.5" y="478.5" width="35" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="675" y="493.18">
            files
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-users`}>
        <rect x="28" y="296" width="168" height="146" rx="8" fill="#ffffff" />
        <path d="M28 346 V304 Q28 296 36 296 H188 Q196 296 196 304 V346 Z" fill="#f4f4f4" />
        <path d="M28 346 H196" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="40" y="317.23">
            users
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a">
          <tspan x="40" y="334.63">
            Staff
          </tspan>
        </text>
        <rect x="40" y="354" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="50" y="364.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="69" y="365.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="117" y="365" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="29" y="372" width="166" height="22" fill="#f9f9f9" />
        <rect x="40" y="376" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="50.5" y="386.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="69" y="387.37" fontSize="12" fill="#000000">
          email
        </text>
        <text x="117" y="387" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="69" y="409.37" fontSize="12" fill="#000000">
          name
        </text>
        <text x="117" y="409" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="29" y="416" width="166" height="22" fill="#f9f9f9" />
        <rect x="40" y="420" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="50.5" y="430.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="69" y="431.37" fontSize="12" fill="#000000">
          slug
        </text>
        <text x="117" y="431" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="28" y="296" width="168" height="146" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-members`}>
        <rect x="382.5" y="96" width="168" height="146" rx="8" fill="#ffffff" />
        <path d="M382.5 146 V104 Q382.5 96 390.5 96 H542.5 Q550.5 96 550.5 104 V146 Z" fill="#f4f4f4" />
        <path d="M382.5 146 H550.5" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="394.5" y="117.23">
            members
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a">
          <tspan x="394.5" y="134.63">
            Readers
          </tspan>
        </text>
        <rect x="394.5" y="154" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="404.5" y="164.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="423.5" y="165.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="477.5" y="165" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="383.5" y="172" width="166" height="22" fill="#f9f9f9" />
        <rect x="394.5" y="176" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="405" y="186.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="423.5" y="187.37" fontSize="12" fill="#000000">
          email
        </text>
        <text x="477.5" y="187" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="423.5" y="209.37" fontSize="12" fill="#5f6b7a">
          name
        </text>
        <text x="477.5" y="209" fontSize="11" fill="#5f6b7a">
          text?
        </text>
        <rect x="383.5" y="216" width="166" height="22" fill="#f9f9f9" />
        <text x="423.5" y="231.37" fontSize="12" fill="#000000">
          status
        </text>
        <text x="477.5" y="231" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="382.5" y="96" width="168" height="146" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-posts`}>
        <rect x="359" y="290" width="215" height="174" rx="8" fill="#ffffff" />
        <path d="M359 324 V298 Q359 290 367 290 H566 Q574 290 574 298 V324 Z" fill="#f4f4f4" />
        <path d="M359 324 H574" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="371" y="311.73">
            posts
          </tspan>
        </text>
        <rect x="371" y="332" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="381" y="342.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="400" y="343.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="492" y="343" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="360" y="350" width="213" height="22" fill="#f9f9f9" />
        <rect x="371" y="354" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="380.5" y="364.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="400" y="365.37" fontSize="12" fill="#000000">
          author_id
        </text>
        <text x="492" y="365" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <text x="400" y="387.37" fontSize="12" fill="#000000">
          title
        </text>
        <text x="492" y="387" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="360" y="394" width="213" height="22" fill="#f9f9f9" />
        <rect x="371" y="398" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="381.5" y="408.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="400" y="409.37" fontSize="12" fill="#000000">
          slug
        </text>
        <text x="492" y="409" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="400" y="431.37" fontSize="12" fill="#000000">
          status
        </text>
        <text x="492" y="431" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="360" y="438" width="213" height="22" fill="#f9f9f9" />
        <text x="400" y="453.37" fontSize="12" fill="#5f6b7a">
          published_at
        </text>
        <text x="492" y="453" fontSize="11" fill="#5f6b7a">
          timestamptz?
        </text>
        <rect x="359" y="290" width="215" height="174" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-tags`}>
        <rect x="382.5" y="496" width="168" height="108" rx="8" fill="#ffffff" />
        <path d="M382.5 530 V504 Q382.5 496 390.5 496 H542.5 Q550.5 496 550.5 504 V530 Z" fill="#f4f4f4" />
        <path d="M382.5 530 H550.5" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="394.5" y="517.73">
            tags
          </tspan>
        </text>
        <rect x="394.5" y="538" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="404.5" y="548.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="423.5" y="549.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="471.5" y="549" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="383.5" y="556" width="166" height="22" fill="#f9f9f9" />
        <text x="423.5" y="571.37" fontSize="12" fill="#000000">
          name
        </text>
        <text x="471.5" y="571" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="394.5" y="582" width="21" height="14" rx="3" fill="#e9eaec" />
        <text x="405" y="592.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#434b55">
          UQ
        </text>
        <text x="423.5" y="593.37" fontSize="12" fill="#000000">
          slug
        </text>
        <text x="471.5" y="593" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <rect x="382.5" y="496" width="168" height="108" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-comments`}>
        <rect x="743" y="170" width="195" height="152" rx="8" fill="#ffffff" />
        <path d="M743 204 V178 Q743 170 751 170 H930 Q938 170 938 178 V204 Z" fill="#f4f4f4" />
        <path d="M743 204 H938" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="755" y="191.73">
            comments
          </tspan>
        </text>
        <rect x="755" y="212" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="765" y="222.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <text x="783" y="223.37" fontSize="12" fontWeight="600" fill="#000000">
          id
        </text>
        <text x="862" y="223" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="744" y="230" width="193" height="22" fill="#f9f9f9" />
        <rect x="755" y="234" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="764.5" y="244.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="783" y="245.37" fontSize="12" fill="#000000">
          member_id
        </text>
        <text x="862" y="245" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="755" y="256" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="764.5" y="266.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="783" y="267.37" fontSize="12" fill="#000000">
          post_id
        </text>
        <text x="862" y="267" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="744" y="274" width="193" height="22" fill="#f9f9f9" />
        <text x="783" y="289.37" fontSize="12" fill="#000000">
          html
        </text>
        <text x="862" y="289" fontSize="11" fill="#5f6b7a">
          text
        </text>
        <text x="783" y="311.37" fontSize="12" fill="#000000">
          created_at
        </text>
        <text x="862" y="311" fontSize="11" fill="#5f6b7a">
          timestamptz
        </text>
        <rect x="743" y="170" width="195" height="152" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
      <g id={`${uid}-n-posts_tags`}>
        <rect x="752.5" y="362" width="176" height="108" rx="8" fill="#ffffff" />
        <path d="M752.5 396 V370 Q752.5 362 760.5 362 H920.5 Q928.5 362 928.5 370 V396 Z" fill="#f4f4f4" />
        <path d="M752.5 396 H928.5" fill="none" stroke="#c6ccd4" strokeWidth="1" />
        <text fontSize="13" fontWeight="600" fill="#000000">
          <tspan x="764.5" y="383.73">
            posts_tags
          </tspan>
        </text>
        <rect x="764.5" y="404" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="774.5" y="414.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <rect x="787.5" y="404" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="797" y="414.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="814.5" y="415.37" fontSize="12" fontWeight="600" fill="#000000">
          post_id
        </text>
        <text x="893.5" y="415" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <rect x="753.5" y="422" width="174" height="22" fill="#f9f9f9" />
        <rect x="764.5" y="426" width="20" height="14" rx="3" fill="#f5ece0" />
        <text x="774.5" y="436.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#805516">
          PK
        </text>
        <rect x="787.5" y="426" width="19" height="14" rx="3" fill="#ddebf9" />
        <text x="797" y="436.09" fontSize="8.5" fontWeight="600" textAnchor="middle" fill="#065094">
          FK
        </text>
        <text x="814.5" y="437.37" fontSize="12" fontWeight="600" fill="#000000">
          tag_id
        </text>
        <text x="893.5" y="437" fontSize="11" fill="#5f6b7a">
          uuid
        </text>
        <text x="814.5" y="459.37" fontSize="12" fill="#000000">
          sort_order
        </text>
        <text x="893.5" y="459" fontSize="11" fill="#5f6b7a">
          int
        </text>
        <rect x="752.5" y="362" width="176" height="108" rx="8" fill="none" stroke="#c6ccd4" strokeWidth="1" />
      </g>
    </svg>
  );
}
