forum has_many subscriptions

This commit is contained in:
byte[] 2019-11-18 22:41:57 -05:00
parent d6e07b8316
commit 623b2b486f

View file

@ -4,11 +4,13 @@ defmodule Philomena.Forums.Forum do
alias Philomena.Posts.Post
alias Philomena.Topics.Topic
alias Philomena.Forums.Subscription
@derive {Phoenix.Param, key: :short_name}
schema "forums" do
belongs_to :last_post, Post
belongs_to :last_topic, Topic
has_many :subscriptions, Subscription
field :name, :string
field :short_name, :string