<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">

    <table name="autogedal_blog_linking_group" resource="default" engine="innodb" comment="Blog Internal Linking Groups">
        <column xsi:type="int" name="group_id" unsigned="true" nullable="false" identity="true" comment="Group ID"/>
        <column xsi:type="varchar" name="group_name" nullable="true" length="255" comment="Group Internal Name (admin only)"/>
        <column xsi:type="varchar" name="title" nullable="false" length="255" comment="Section Title"/>
        <column xsi:type="varchar" name="cta_text" nullable="true" length="255" comment="CTA Button 1 Text"/>
        <column xsi:type="varchar" name="cta_url" nullable="true" length="255" comment="CTA Button 1 URL"/>
        <column xsi:type="varchar" name="cta_text_2" nullable="true" length="255" comment="CTA Button 2 Text"/>
        <column xsi:type="varchar" name="cta_url_2" nullable="true" length="255" comment="CTA Button 2 URL"/>
        <column xsi:type="smallint" name="show_slider" nullable="false" default="1" comment="Show Product Slider"/>
        <column xsi:type="varchar" name="carousel_category_id" nullable="true" length="255" comment="Carousel Category IDs (comma-separated)"/>
        <column xsi:type="smallint" name="carousel_products_limit" nullable="false" default="6" comment="Max Products in Carousel"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="group_id"/>
        </constraint>
    </table>

    <table name="tm_blog_post" resource="default">
        <column xsi:type="int" name="linking_group_id" nullable="true" unsigned="true" comment="Internal Linking Group ID"/>
    </table>

</schema>
