1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 06:48:28 +09:00
mastodon/app/models/announcement_mute.rb

20 lines
501 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# == Schema Information
#
# Table name: announcement_mutes
#
# id :bigint(8) not null, primary key
# account_id :bigint(8)
# announcement_id :bigint(8)
# created_at :datetime not null
# updated_at :datetime not null
#
class AnnouncementMute < ApplicationRecord
belongs_to :account
belongs_to :announcement, inverse_of: :announcement_mutes
validates :account_id, uniqueness: { scope: :announcement_id }
end