context: comments

This commit is contained in:
Liam P. White 2019-08-28 12:41:44 -04:00
parent 5cbc64bd1a
commit ba2eb13de0

View file

@ -3,7 +3,23 @@ defmodule Philomena.Comments.Comment do
import Ecto.Changeset import Ecto.Changeset
schema "comments" do schema "comments" do
timestamps() belongs_to :user, Philomena.Users.User
belongs_to :image, Philomena.Images.Images
belongs_to :deleted_by, Philomena.Users.User
field :body, :string
field :ip, EctoNetwork.INET
field :fingerprint, :string
field :user_agent, :string, default: ""
field :referrer, :string, default: ""
field :anonymous, :boolean, default: false
field :hidden_from_users, :boolean, default: false
field :edit_reason, :string
field :deletion_reason, :string, default: ""
field :destroyed_content, :boolean, default: false
field :name_at_post_time, :string
timestamps(inserted_at: :created_at)
end end
@doc false @doc false