{
  "$schema": "mantara.schema.v1",
  "system_name": "Pokemon Card Resell Platform",
  "schema_name": "ai_sch_20260513_032410",
  "description": "A specialized e-commerce marketplace for buying, selling, and trading Pokemon trading cards.",
  "menus": [
    {
      "menu_id": 1,
      "menu_name": "User Management",
      "sequence_number": 1,
      "description": "Manage user accounts, profiles, and roles.",
      "submenus": [
        {
          "submenu_id": 101,
          "submenu_name": "User Accounts",
          "sequence_number": 1,
          "description": "Handles user authentication and account management.",
          "tables": [
            {
              "table_name": "users",
              "comment": "Stores user account information and authentication credentials.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 101 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "email",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "password_hash",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "Stores bcrypt hash, never plain text"
                },
                {
                  "name": "role",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (role IN ('guest', 'buyer', 'seller', 'moderator', 'admin'))"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT true"
                },
                {
                  "name": "is_verified",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "last_login_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "user_profiles",
              "comment": "Stores extended user profile information.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 101 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL UNIQUE REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "first_name",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "last_name",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "display_name",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "bio",
                  "type": "TEXT"
                },
                {
                  "name": "avatar_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "phone",
                  "type": "VARCHAR(20)"
                },
                {
                  "name": "location",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "timezone",
                  "type": "VARCHAR(50)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 102,
          "submenu_name": "Seller Accounts",
          "sequence_number": 2,
          "description": "Manages seller-specific profiles and settings.",
          "tables": [
            {
              "table_name": "seller_profiles",
              "comment": "Stores additional information for users who are sellers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 102 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL UNIQUE REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "store_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "store_description",
                  "type": "TEXT"
                },
                {
                  "name": "store_logo_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "average_rating",
                  "type": "DECIMAL(3,2)",
                  "constraints": "DEFAULT 0.00"
                },
                {
                  "name": "total_sales",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0"
                },
                {
                  "name": "total_reviews",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0"
                },
                {
                  "name": "response_time_hours",
                  "type": "INTEGER"
                },
                {
                  "name": "is_verified_seller",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "addresses",
              "comment": "Stores user addresses for shipping and billing.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 102 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "address_type",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (address_type IN ('shipping', 'billing'))"
                },
                {
                  "name": "is_default",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "recipient_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "address_line1",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "address_line2",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "city",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "state",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "postal_code",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "country",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "phone",
                  "type": "VARCHAR(20)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 2,
      "menu_name": "Card Catalog",
      "sequence_number": 2,
      "description": "Manage the master catalog of Pokemon cards and sets.",
      "submenus": [
        {
          "submenu_id": 201,
          "submenu_name": "Card Sets",
          "sequence_number": 1,
          "description": "Manage Pokemon TCG sets and expansions.",
          "tables": [
            {
              "table_name": "card_sets",
              "comment": "Stores information about Pokemon TCG sets and expansions.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 201 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "series",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "release_date",
                  "type": "DATE"
                },
                {
                  "name": "total_cards",
                  "type": "INTEGER"
                },
                {
                  "name": "set_code",
                  "type": "VARCHAR(50)",
                  "constraints": "UNIQUE"
                },
                {
                  "name": "symbol_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "logo_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 202,
          "submenu_name": "Cards",
          "sequence_number": 2,
          "description": "Manage individual Pokemon cards within sets.",
          "tables": [
            {
              "table_name": "cards",
              "comment": "Stores detailed information about individual Pokemon cards.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 202 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "card_set_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.card_sets(id) ON DELETE CASCADE"
                },
                {
                  "name": "name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "pokemon_name",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "card_number",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "rarity",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "card_type",
                  "type": "VARCHAR(50)",
                  "constraints": "CHECK (card_type IN ('pokemon', 'trainer', 'energy'))"
                },
                {
                  "name": "pokemon_type",
                  "type": "VARCHAR(50)"
                },
                {
                  "name": "hp",
                  "type": "INTEGER"
                },
                {
                  "name": "artist",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "image_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "image_url_hires",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "categories",
              "comment": "Stores categories for organizing cards.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 202 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "name",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "slug",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "parent_category_id",
                  "type": "UUID",
                  "constraints": "REFERENCES pcrp.categories(id) ON DELETE SET NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "card_categories",
              "comment": "Associates cards with categories for filtering and organization.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 202 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "card_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.cards(id) ON DELETE CASCADE"
                },
                {
                  "name": "category_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.categories(id) ON DELETE CASCADE"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 3,
      "menu_name": "Listing Management",
      "sequence_number": 3,
      "description": "Manage card listings, images, and conditions.",
      "submenus": [
        {
          "submenu_id": 301,
          "submenu_name": "Listings",
          "sequence_number": 1,
          "description": "Manage card listings for sale by sellers.",
          "tables": [
            {
              "table_name": "listings",
              "comment": "Stores information about cards listed for sale by sellers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 301 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "seller_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "card_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.cards(id) ON DELETE CASCADE"
                },
                {
                  "name": "title",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "price",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "quantity",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 1"
                },
                {
                  "name": "condition",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (condition IN ('mint', 'near_mint', 'lightly_played', 'moderately_played', 'heavily_played', 'damaged'))"
                },
                {
                  "name": "language",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL DEFAULT 'english'"
                },
                {
                  "name": "is_first_edition",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "is_shadowless",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "is_reverse_holo",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "accepts_offers",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('draft', 'active', 'sold', 'reserved', 'inactive', 'removed')) DEFAULT 'active'"
                },
                {
                  "name": "views_count",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "graded_cards",
              "comment": "Stores information about professionally graded cards.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 301 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "listing_id",
                  "type": "UUID",
                  "constraints": "NOT NULL UNIQUE REFERENCES pcrp.listings(id) ON DELETE CASCADE"
                },
                {
                  "name": "grading_service_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.grading_services(id) ON DELETE CASCADE"
                },
                {
                  "name": "grade",
                  "type": "VARCHAR(20)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "certification_number",
                  "type": "VARCHAR(100)",
                  "constraints": "UNIQUE"
                },
                {
                  "name": "grading_date",
                  "type": "DATE"
                },
                {
                  "name": "population_count",
                  "type": "INTEGER"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 302,
          "submenu_name": "Listing Images",
          "sequence_number": 2,
          "description": "Manage images associated with card listings.",
          "tables": [
            {
              "table_name": "listing_images",
              "comment": "Stores images for card listings, showing front, back, and details.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 302 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "listing_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.listings(id) ON DELETE CASCADE"
                },
                {
                  "name": "image_url",
                  "type": "VARCHAR(500)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "display_order",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0"
                },
                {
                  "name": "is_primary",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 4,
      "menu_name": "Transaction Management",
      "sequence_number": 4,
      "description": "Manage orders, payments, and shipments.",
      "submenus": [
        {
          "submenu_id": 401,
          "submenu_name": "Orders",
          "sequence_number": 1,
          "description": "Manage purchase transactions and order details.",
          "tables": [
            {
              "table_name": "orders",
              "comment": "Stores information about completed purchase transactions.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 401 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_number",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "buyer_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "seller_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('pending', 'paid', 'processing', 'shipped', 'delivered', 'cancelled', 'refunded', 'disputed')) DEFAULT 'pending'"
                },
                {
                  "name": "subtotal",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "shipping_cost",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL DEFAULT 0.00"
                },
                {
                  "name": "tax_amount",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL DEFAULT 0.00"
                },
                {
                  "name": "platform_fee",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL DEFAULT 0.00"
                },
                {
                  "name": "total_amount",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "shipping_address_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.addresses(id) ON DELETE RESTRICT"
                },
                {
                  "name": "billing_address_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.addresses(id) ON DELETE RESTRICT"
                },
                {
                  "name": "notes",
                  "type": "TEXT"
                },
                {
                  "name": "cancelled_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "cancellation_reason",
                  "type": "TEXT"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "order_items",
              "comment": "Stores individual card purchases within an order.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 401 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "listing_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.listings(id) ON DELETE RESTRICT"
                },
                {
                  "name": "card_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.cards(id) ON DELETE RESTRICT"
                },
                {
                  "name": "quantity",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 1"
                },
                {
                  "name": "price",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "condition",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 402,
          "submenu_name": "Payments",
          "sequence_number": 2,
          "description": "Manage payment transactions and records.",
          "tables": [
            {
              "table_name": "payments",
              "comment": "Stores payment transaction records for orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 402 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "payment_method",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (payment_method IN ('credit_card', 'debit_card', 'paypal', 'stripe', 'bank_transfer'))"
                },
                {
                  "name": "amount",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "currency",
                  "type": "VARCHAR(3)",
                  "constraints": "NOT NULL DEFAULT 'USD'"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('pending', 'processing', 'completed', 'failed', 'refunded', 'cancelled')) DEFAULT 'pending'"
                },
                {
                  "name": "transaction_id",
                  "type": "VARCHAR(255)",
                  "constraints": "UNIQUE"
                },
                {
                  "name": "payment_gateway",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "payment_details",
                  "type": "JSONB"
                },
                {
                  "name": "processed_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 403,
          "submenu_name": "Shipments",
          "sequence_number": 3,
          "description": "Manage shipment details and tracking for orders.",
          "tables": [
            {
              "table_name": "shipments",
              "comment": "Stores shipping information and tracking details for orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 403 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "carrier",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "tracking_number",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "shipping_method",
                  "type": "VARCHAR(100)"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('pending', 'label_created', 'in_transit', 'out_for_delivery', 'delivered', 'failed', 'returned')) DEFAULT 'pending'"
                },
                {
                  "name": "shipped_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "estimated_delivery_date",
                  "type": "DATE"
                },
                {
                  "name": "delivered_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 5,
      "menu_name": "Communication and Feedback",
      "sequence_number": 5,
      "description": "Manage user communications, reviews, and disputes.",
      "submenus": [
        {
          "submenu_id": 501,
          "submenu_name": "Messages",
          "sequence_number": 1,
          "description": "Manage communication between buyers and sellers.",
          "tables": [
            {
              "table_name": "conversations",
              "comment": "Stores conversation threads between users.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 501 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "participant1_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "participant2_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "listing_id",
                  "type": "UUID",
                  "constraints": "REFERENCES pcrp.listings(id) ON DELETE SET NULL"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "REFERENCES pcrp.orders(id) ON DELETE SET NULL"
                },
                {
                  "name": "last_message_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "messages",
              "comment": "Stores individual messages within a conversation.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 501 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "conversation_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.conversations(id) ON DELETE CASCADE"
                },
                {
                  "name": "sender_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "message_text",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "is_read",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "read_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 502,
          "submenu_name": "Reviews",
          "sequence_number": 2,
          "description": "Manage buyer reviews and ratings for sellers.",
          "tables": [
            {
              "table_name": "reviews",
              "comment": "Stores buyer feedback and ratings for sellers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 502 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "reviewer_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "seller_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "rating",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (rating >= 1 AND rating <= 5)"
                },
                {
                  "name": "title",
                  "type": "VARCHAR(255)"
                },
                {
                  "name": "comment",
                  "type": "TEXT"
                },
                {
                  "name": "seller_response",
                  "type": "TEXT"
                },
                {
                  "name": "seller_response_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "is_verified_purchase",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT true"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 503,
          "submenu_name": "Disputes",
          "sequence_number": 3,
          "description": "Manage disputes and resolutions between buyers and sellers.",
          "tables": [
            {
              "table_name": "disputes",
              "comment": "Stores records of disputes raised by buyers regarding transactions.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 503 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "complainant_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "respondent_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "reason",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL CHECK (reason IN ('item_not_received', 'item_not_as_described', 'damaged_item', 'counterfeit', 'other'))"
                },
                {
                  "name": "description",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('open', 'under_review', 'resolved', 'closed', 'escalated')) DEFAULT 'open'"
                },
                {
                  "name": "resolution",
                  "type": "TEXT"
                },
                {
                  "name": "resolved_by_id",
                  "type": "UUID",
                  "constraints": "REFERENCES pcrp.users(id) ON DELETE SET NULL"
                },
                {
                  "name": "resolved_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 6,
      "menu_name": "Wishlist and Offers",
      "sequence_number": 6,
      "description": "Manage user wishlists and offer negotiations.",
      "submenus": [
        {
          "submenu_id": 601,
          "submenu_name": "Wishlists",
          "sequence_number": 1,
          "description": "Manage user wishlists for desired cards.",
          "tables": [
            {
              "table_name": "wishlists",
              "comment": "Stores user wishlists for tracking desired cards.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 601 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL UNIQUE REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL DEFAULT 'My Wishlist'"
                },
                {
                  "name": "is_public",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "wishlist_items",
              "comment": "Stores individual cards added to a user's wishlist.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 601 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "wishlist_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.wishlists(id) ON DELETE CASCADE"
                },
                {
                  "name": "card_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.cards(id) ON DELETE CASCADE"
                },
                {
                  "name": "price_alert_threshold",
                  "type": "DECIMAL(10,2)"
                },
                {
                  "name": "notes",
                  "type": "TEXT"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 602,
          "submenu_name": "Offers",
          "sequence_number": 2,
          "description": "Manage buyer offers on card listings.",
          "tables": [
            {
              "table_name": "offers",
              "comment": "Stores buyer offers on card listings allowing negotiations.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 602 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "listing_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.listings(id) ON DELETE CASCADE"
                },
                {
                  "name": "buyer_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "offer_amount",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "message",
                  "type": "TEXT"
                },
                {
                  "name": "status",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (status IN ('pending', 'accepted', 'rejected', 'cancelled', 'expired')) DEFAULT 'pending'"
                },
                {
                  "name": "expires_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "responded_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "response_message",
                  "type": "TEXT"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 7,
      "menu_name": "Configuration",
      "sequence_number": 7,
      "description": "Manage platform settings, promotions, and notifications.",
      "submenus": [
        {
          "submenu_id": 701,
          "submenu_name": "Platform Settings",
          "sequence_number": 1,
          "description": "Configure platform-wide settings and parameters.",
          "tables": [
            {
              "table_name": "platform_settings",
              "comment": "Stores configurable platform parameters and settings.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 701 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "setting_key",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_type",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (setting_type IN ('string', 'number', 'boolean', 'json'))"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 702,
          "submenu_name": "Promotions",
          "sequence_number": 2,
          "description": "Manage promotional campaigns and discount codes.",
          "tables": [
            {
              "table_name": "promotions",
              "comment": "Stores promotional campaigns and discount codes.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 702 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "UNIQUE"
                },
                {
                  "name": "name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "promotion_type",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (promotion_type IN ('percentage_discount', 'fixed_discount', 'free_shipping', 'featured_listing'))"
                },
                {
                  "name": "discount_percentage",
                  "type": "DECIMAL(5,2)"
                },
                {
                  "name": "discount_amount",
                  "type": "DECIMAL(10,2)"
                },
                {
                  "name": "minimum_purchase_amount",
                  "type": "DECIMAL(10,2)"
                },
                {
                  "name": "max_uses",
                  "type": "INTEGER"
                },
                {
                  "name": "current_uses",
                  "type": "INTEGER",
                  "constraints": "NOT NULL DEFAULT 0"
                },
                {
                  "name": "starts_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "expires_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT true"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            },
            {
              "table_name": "promotion_usages",
              "comment": "Tracks usage of promotions by users and orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 702 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "promotion_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.promotions(id) ON DELETE CASCADE"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "order_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.orders(id) ON DELETE CASCADE"
                },
                {
                  "name": "discount_applied",
                  "type": "DECIMAL(10,2)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 703,
          "submenu_name": "Notifications",
          "sequence_number": 3,
          "description": "Manage system notifications for user activities.",
          "tables": [
            {
              "table_name": "notifications",
              "comment": "Stores system notifications for user activities and updates.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY DEFAULT gen_random_uuid()"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 703 NOT NULL REFERENCES pcrp.submenu(submenu_id)"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "constraints": "NOT NULL REFERENCES pcrp.users(id) ON DELETE CASCADE"
                },
                {
                  "name": "notification_type",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL CHECK (notification_type IN ('order', 'message', 'offer', 'review', 'shipment', 'payment', 'system', 'promotion'))"
                },
                {
                  "name": "title",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "message",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "is_read",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT false"
                },
                {
                  "name": "read_at",
                  "type": "TIMESTAMP"
                },
                {
                  "name": "action_url",
                  "type": "VARCHAR(500)"
                },
                {
                  "name": "related_entity_type",
                  "type": "VARCHAR(50)"
                },
                {
                  "name": "related_entity_id",
                  "type": "UUID"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "assumptions": [
    "Each user can have only one active cart and wishlist.",
    "Listings must reference a card from the master catalog.",
    "Offers are valid for a configurable duration and can be accepted, rejected, or countered by the seller."
  ],
  "open_questions": [
    "Should the platform support multi-currency transactions beyond USD?",
    "Is there a need for role-based access control beyond the defined user roles?"
  ]
}
