Dual-Key Pattern
Every table in a GoBeaver app has two identifiers:
id BIGINT AUTO_INCREMENT PRIMARY KEY, -- internal joins, FKs, indexesuuid CHAR(36) NOT NULL UNIQUE, -- public API identifieridis fast and compact — perfect for foreign keys and internal joins.uuidis opaque — safe to expose in URLs and APIs without leaking row counts or enabling enumeration attacks.
Never expose id in API responses. Always serialize uuid.