Commit d1f7d17e authored by 2458773093's avatar 2458773093

new revision model

parent 64657138
......@@ -24,6 +24,7 @@
# poll_id :bigint(8)
# group_id :integer
# quote_of_id :bigint(8)
# revised_at :datetime
#
class Status < ApplicationRecord
......@@ -61,6 +62,7 @@ class Status < ApplicationRecord
has_many :mentions, dependent: :destroy, inverse_of: :status
has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status
has_many :media_attachments, dependent: :nullify
has_many :revisions, class_name: 'StatusRevision', dependent: :destroy
has_and_belongs_to_many :tags
has_and_belongs_to_many :preview_cards
......
# == Schema Information
#
# Table name: status_revisions
#
# id :bigint(8) not null, primary key
# status_id :bigint(8)
# text :string
# created_at :datetime not null
# updated_at :datetime not null
#
class StatusRevision < ApplicationRecord
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment