export interface MasterDataType {
  id: string
  code: string
  label: string
  description: string | null
  supports_free_text: boolean
  is_active: boolean
  created_at: string
  updated_at: string
}

export interface MasterDataValue {
  id: string
  type_id: string
  code: string
  label: string
  normalized_label: string
  sort_order: number
  is_active: boolean
  is_hidden: boolean
  valid_from: string | null
  valid_to: string | null
  created_at: string
  updated_at: string
}

export interface MasterDataSuggestion {
  id: string
  type_id: string
  entered_value: string
  normalized_value: string
  linked_value_id: string | null
  status: 'pending' | 'approved' | 'rejected' | 'linked'
  created_by: string | null
  created_at: string
  reviewed_by: string | null
  reviewed_at: string | null
}

/** Stored per project field; one of valueId OR freeText is set. */
export interface ComboboxValue {
  valueId: string | null
  freeText: string | null
}
