Trash.Schema.trashable_fields

You're seeing just the macro trashable_fields, go back to Trash.Schema module for more information.
Link to this macro

trashable_fields()

(macro)

Specs

trashable_fields() :: Macro.t()

Declares fields on Ecto.Schema necessary for Trash.

This is a macro that can be used inside of an Ecto.Schema.schema/2 block to add the necessary fields.

Fields

  • discarded_at - :utc_datetime
  • discarded? - :boolean (virtual)

Note: under normal circumstances, discarded? will be nil since it's not possible to load a virtual field in Ecto. Instead, use Trash.Query.select_trashable/1 to hydrate this field with a computed value from the database.