PhoenixKitKnowledgeBase.Schemas.Folder (PhoenixKitKnowledgeBase v0.1.0)

Copy Markdown View Source

An index row for a directory inside a vault.

There is no parent_uuid. The filesystem already expresses the hierarchy, and a second representation in the database is a second thing that can disagree with the disk — so the tree is rebuilt from relative_path when the sidebar needs it (PhoenixKitKnowledgeBase.Notes.folder_tree/1).

Folders play no part in [[wiki-link]] resolution, which matches on title across the vault and only consults paths to break a tie.

Summary

Functions

Changeset for an indexed directory.

Types

t()

@type t() :: %PhoenixKitKnowledgeBase.Schemas.Folder{
  __meta__: term(),
  inserted_at: term(),
  name: term(),
  relative_path: term(),
  updated_at: term(),
  uuid: term(),
  vault: term(),
  vault_uuid: term()
}

Functions

changeset(folder, attrs)

Changeset for an indexed directory.

:name is derived from the path rather than accepted separately — they can only ever disagree by mistake.