summaryrefslogtreecommitdiff
path: root/lib/pleroma/hashtag_object.ex
blob: 12b570715b7300cb6c4f77ebbd794105ebd8ed06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
defmodule Pleroma.HashtagObject do
  @moduledoc """
  Through table relationship between hashtags and objects.
  https://hexdocs.pm/ecto/polymorphic-associations-with-many-to-many.html
  """
  use Ecto.Schema

  alias Pleroma.Hashtag
  alias Pleroma.Object

  @primary_key false

  schema "hashtags_objects" do
    belongs_to(:hashtag, Hashtag)
    belongs_to(:object, Object, type: FlakeId.Ecto.CompatType)
  end
end