label: "Kitchen Sink (All Fields)"
description: "A demonstration of every supported field type in ObjectQL"
icon: "layout-grid-line"

fields:
  # --- String Types ---
  simple_text:
    type: text
    label: Simple Text
    required: true
    min_length: 3
    max_length: 100
    help_text: "Basic single-line text"

  long_text:
    type: textarea
    label: Multi-line Text
    rows: 4
  
  rich_content:
    type: markdown
    label: Markdown Content
  
  raw_html:
    type: html
    label: HTML Content
    readonly: true # Usually HTML is generated or read-only

  # --- Number Types ---
  count:
    type: number
    label: Integer Count
    scale: 0
    
  price:
    type: currency
    label: Price
    currency: USD
    scale: 2

  progress:
    type: percent
    label: Progress
    min: 0
    max: 1
    scale: 2 # 0.55 -> 55%

  # --- Boolean ---
  is_active:
    type: boolean
    label: Is Active
    defaultValue: true

  # --- Date & Time ---
  due_date:
    type: date
    label: Due Date
  
  meeting_time:
    type: datetime
    label: Meeting (Date & Time)
  
  alarm:
    type: time
    label: Alarm Time

  # --- Selection ---
  status:
    type: select
    label: Status
    options:
      - label: Draft
        value: draft
      - label: Published
        value: published
      - label: Archived
        value: archived
    defaultValue: draft
  
  tags:
    type: select
    label: Tags
    multiple: true
    options:
      - tech
      - news
      - blog # Simple string array shorthand

  # --- Contact & Web ---
  email_address:
    type: email
    label: Email
  
  phone_number:
    type: phone
    label: Phone
  
  website:
    type: url
    label: Website URL

  # --- Media ---
  profile_pic:
    type: image
    label: Avatar
    multiple: false
    max_size: 1048576  # 1MB
  
  attachment:
    type: file
    label: Attachment document
  
  gallery:
    type: image
    label: Image Gallery
    multiple: true

  # --- Security ---
  secret_code:
    type: password
    label: Secret Code

  # --- Advanced / Complex ---
  coords:
    type: location
    label: GPS Coordinates
  
  metadata:
    type: object
    label: JSON Metadata
  
  embedding:
    type: vector
    label: Vector Embedding
    dimension: 1536 # e.g. OpenAI ada-002

  # --- Relationships ---
  related_project:
    type: lookup
    label: Related Project
    reference_to: projects
  
  # Note: master_detail requires this object to be the detail side
  # parent_project:
  #   type: master_detail
  #   reference_to: projects

  # --- Computed ---
  # auto_id:
  #   type: auto_number
  #   prefix: "KS-"
    
  # calc_value:
  #   type: formula
  #   expression: "{count} * 10"
    
