~cytrogen/masto-fe

ref: 80f89f9cf25436d07ed7dcf908392daf686f7dff masto-fe/app/models/announcement_mute.rb -rw-r--r-- 501 bytes
80f89f9c — Claire Merge commit '9974163776b3e65e7cfa41e6293876909a1635b7' into glitch-soc/merge-upstream 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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