mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
20 lines
501 B
Ruby
20 lines
501 B
Ruby
|
# 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
|