/**
 * ULID generation. `CHAR(26)` ULIDs are the primary key for every entity the API
 * exposes by id (PLANNING.md §6 key strategy) — lexicographically sortable, so
 * they don't fragment InnoDB's clustered index on insert the way random UUIDv4
 * would, and they don't leak row counts the way auto-increments do.
 */
import { ulid } from 'ulid';

/** A fresh 26-char Crockford-base32 ULID. */
export function newId(): string {
  return ulid();
}
