mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
forum has_many subscriptions
This commit is contained in:
parent
d6e07b8316
commit
623b2b486f
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue