2020-08-27 10:29:57 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-03-22 23:29:08 +02:00
|
|
|
module ::DiscourseDataExplorer
|
2020-08-27 10:29:57 +10:00
|
|
|
class QueryGroup < ActiveRecord::Base
|
2022-12-29 12:31:29 +00:00
|
|
|
self.table_name = "data_explorer_query_groups"
|
2020-08-27 10:29:57 +10:00
|
|
|
|
|
|
|
belongs_to :query
|
|
|
|
belongs_to :group
|
2022-06-14 23:07:02 +08:00
|
|
|
|
|
|
|
has_many :bookmarks, as: :bookmarkable
|
2020-08-27 10:29:57 +10:00
|
|
|
end
|
|
|
|
end
|
2024-10-25 05:42:37 -03:00
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: data_explorer_query_groups
|
|
|
|
#
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
# query_id :bigint
|
|
|
|
# group_id :integer
|
|
|
|
#
|
|
|
|
# Indexes
|
|
|
|
#
|
|
|
|
# index_data_explorer_query_groups_on_group_id (group_id)
|
|
|
|
# index_data_explorer_query_groups_on_query_id (query_id)
|
|
|
|
# index_data_explorer_query_groups_on_query_id_and_group_id (query_id,group_id) UNIQUE
|
|
|
|
#
|