Skip to content

Semantic Types

Reusable, high-level types that add constraints to low-level primitives.

TypeBase TypeDetails
col.id()UUIDPrimary key with auto-generation
col.email()string(255)Email validation pattern
col.username()string(50)Lowercase alphanumeric + underscores
col.password_hash()string(255)Hidden from API exports
col.phone()string(50)E.164 international format
col.token()string(64)For API keys and session tokens
TypeBase TypeDetails
col.name()string(100)Person/entity names
col.title()string(200)Article/page titles
col.slug()string(255)URL-safe, unique, lowercase
col.summary()string(500)Short descriptions
col.code()string(20)SKUs, codes (uppercase pattern)
col.body()textLong-form content
TypeBase TypeDetails
col.money()decimal(19,4)Currency amounts, min(0)
col.percentage()decimal(5,2)0-100 range, two decimal places
col.counter()integerAuto-defaults to 0
col.quantity()integerNon-negative integers
col.rating()decimal(2,1)0-5 rating scale
col.duration()integerDuration in seconds, min(0)
TypeBase TypeDetails
col.url()string(2048)Full URLs with scheme
col.ip()string(45)IPv4 or IPv6 with validation
col.ipv4()string(15)IPv4 only with validation
col.ipv6()string(45)IPv6 only with validation
col.user_agent()string(500)Browser user agent strings
TypeBase TypeDetails
col.color()string(7)Hex format (#FF5733)
col.html()textHTML content with format hint
col.markdown()textMarkdown formatted content
TypeBase TypeDetails
col.flag()booleanDefaults to false
col.flag(true)booleanDefaults to true
TypeBase TypeDetails
col.country()string(2)ISO 3166-1 alpha-2 (US)
col.currency()string(3)ISO 4217 (USD)
col.locale()string(10)BCP 47 (en-US)
col.timezone()string(50)IANA timezone names

Valid Values

  • Country: US, GB, DE, JP, BR
  • Currency: USD, EUR, GBP, JPY, BRL
  • Locale: en-US, en-GB, de-DE, ja-JP, pt-BR
  • Timezone: America/New_York, Europe/London, Asia/Tokyo