Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 5735b9e

Browse files
committed
refactor(macros): clean up unused macros
1 parent ec1a26e commit 5735b9e

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

lib/groupher_server/cms/helper/macros.ex

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -207,30 +207,6 @@ defmodule GroupherServer.CMS.Helper.Macros do
207207
end
208208
end
209209

210-
@doc """
211-
for GroupherServer.CMS.Model.Community
212-
213-
# TABLE: "communities_[article]s"
214-
add(:community_id, references(:communities, on_delete: :delete_all), null: false)
215-
add(:[article]_id, references(:cms_[article]s, on_delete: :delete_all), null: false)
216-
217-
create(unique_index(:communities_[article]s, [:community_id, :[article]_id]))
218-
"""
219-
220-
# defmacro community_article_fields() do
221-
# @article_threads
222-
# |> Enum.map(fn thread ->
223-
# quote do
224-
# many_to_many(
225-
# unquote(:"#{thread}s"),
226-
# Module.concat(CMS.Model, Recase.to_pascal(to_string(unquote(thread)))),
227-
# join_through: unquote("communities_#{to_string(thread)}s"),
228-
# join_keys: [community_id: :id] ++ Keyword.new([{unquote(:"#{thread}_id"), :id}])
229-
# )
230-
# end
231-
# end)
232-
# end
233-
234210
@doc """
235211
for GroupherServer.CMS.[Article]
236212

lib/groupher_server/cms/models/community.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ defmodule GroupherServer.CMS.Model.Community do
7070
# on_replace: :delete
7171
)
7272

73-
# community_article_fields()
74-
#
7573
# posts_block_list ...
7674
timestamps(type: :utc_datetime)
7775
end

0 commit comments

Comments
 (0)