Type Reference

Complete reference for all available data types in FakeDataDSL.

Basic Types

Identifiers

  • uuid - UUID v4 identifier

    id: uuid
    id: uuid(version: 6)  # UUID v6
    id: uuid(version: 7)  # UUID v7
    
  • ulid - ULID identifier

    id: ulid
    
  • id_sequence - Sequential numeric IDs

    id: id_sequence
    id: id_sequence(start: 1000)
    

Strings

  • name - Full person name

    name: name
    
  • text - Random text

    description: text
    bio: text(100..500)  # Length range
    
  • email - Email address

    email: email
    
  • phone - Phone number

    phone: phone
    phone: phone(country: :us)
    
  • url - Web URL

    website: url
    

Numbers

  • number - Numeric value

    age: number(18..65)
    price: number(min: 10, max: 100)
    
  • boolean - True/false

    active: boolean
    

Dates and Times

  • date - Calendar date

    birth_date: date
    birth_date: date(2020-01-01..2024-12-31)
    
  • past_date - Date in the past

    created_at: past_date
    created_at: past_date(days: 30)
    
  • future_date - Date in the future

    expires_at: future_date
    expires_at: future_date(days: 90)
    
  • timestamp - Unix timestamp

    created_at: timestamp
    
  • now - Current timestamp

    updated_at: now
    

Personal Information Types

  • first_name - Given name
  • last_name - Family name
  • full_name - Combined first and last name
  • gender - Gender identity
  • age - Age value
  • username - Username identifier
  • national_id - Government ID (SSN, etc.)

Location Types

  • country - Country name
  • country_code - ISO country code (US, GB, etc.)
  • city - City name
  • state - State/province name
  • address - Full street address
  • postal_code - Postal/ZIP code
  • latitude - Geographic latitude
  • longitude - Geographic longitude
  • timezone - IANA timezone identifier

Commerce Types

  • product_name - Product name
  • product_category - Product category
  • sku - Stock keeping unit
  • money - Monetary amount
  • discount - Discount value
  • tax_rate - Tax rate percentage

Finance Types

  • credit_card - Credit card number (Luhn-valid)
  • bank_name - Bank name
  • account_number - Bank account number
  • iban - International Bank Account Number
  • transaction_amount - Financial transaction amount

Internet/IT Types

  • ip - IPv4 address
  • ipv6 - IPv6 address
  • mac_address - MAC address
  • domain - Domain name
  • user_agent - Browser user agent string

Crypto Types

  • hash - Cryptographic hash
  • bitcoin_address - Bitcoin wallet address
  • ethereum_address - Ethereum wallet address
  • private_key - Cryptographic private key

Health Types

  • blood_type - Blood group (A+, B-, etc.)
  • bmi - Body Mass Index
  • heart_rate - Heart beats per minute
  • medical_code - Medical classification code

Travel Types

  • airport_code - IATA airport code
  • airline - Airline name
  • flight_number - Flight identifier
  • seat_number - Aircraft seat number

Advanced Types

  • enum - Enumeration with values

    status: enum(active, inactive, pending)
    status: enum(active: 80%, inactive: 15%, pending: 5%)
    
  • array - Array of values

    tags: array(text, 3..10)
    scores: array(number(0..100), 5)
    
  • object - Nested object

    address: object(
    street: text,
    city: city,
    zip: postal_code
    )
    
  • reference - Reference another schema

    user_id: reference(User, id)
    
  • custom - Custom function

    slug: custom(:generate_slug)
    
  • formula - Computed value

    total: formula(price * quantity)
    
  • template - String interpolation

    greeting: template("Hello {first_name}!")
    
  • sequence - Sequential values

    order: sequence(start: 1, step: 1)
    
  • default_value - Default value with probability

    status: default_value(value: "active", probability: 0.9)
    

See Also