2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-04 01:15:08 +08:00
discourse/app/models/topic_allowed_group.rb
Jarek Radosz 71834c898f
DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073)
Co-authored-by: Loïc Guitaut <loic@discourse.org>
2025-10-06 16:11:01 +02:00

22 lines
553 B
Ruby

# frozen_string_literal: true
class TopicAllowedGroup < ActiveRecord::Base
belongs_to :topic
belongs_to :group
validates :topic_id, uniqueness: { scope: :group_id }
end
# == Schema Information
#
# Table name: topic_allowed_groups
#
# id :integer not null, primary key
# group_id :integer not null
# topic_id :integer not null
#
# Indexes
#
# index_topic_allowed_groups_on_group_id_and_topic_id (group_id,topic_id) UNIQUE
# index_topic_allowed_groups_on_topic_id_and_group_id (topic_id,group_id) UNIQUE
#