mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
context: comments
This commit is contained in:
parent
5cbc64bd1a
commit
ba2eb13de0
1 changed files with 17 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue