lib/archeometer/schema/app_xref.ex

defmodule Archeometer.Schema.AppXRef do
  @moduledoc """
  Represents an cross reference between applications.

  The schema has the following fields:
  - `caller` is a reference to `Archeometer.Schema.Application`. The module were the
  referece took place.
  - `callee` is a reference to `Archeometer.Schema.Application`. The module being
  referenced.
  """

  use Archeometer.Schema

  alias Archeometer.Schema.Application

  defschema(:apps_xrefs) do
    belongs_to(Application, as: :caller, primary_key: true)
    belongs_to(Application, as: :callee, primary_key: true)
  end
end