Skip to content

A platform for community discussion. Free, open, simple.

625 B
Raw Blame
# frozen_string_literal: true

module DiscourseTemplates
  class UsageCount < ActiveRecord::Base
    self.table_name = "discourse_templates_usage_count"

    belongs_to :topic

    validates :topic_id, presence: true
  end
end

# == Schema Information
#
# Table name: discourse_templates_usage_count
#
#  id          :bigint           not null, primary key
#  usage_count :integer          default(0), not null
#  created_at  :datetime         not null
#  updated_at  :datetime         not null
#  topic_id    :integer          not null
#
# Indexes
#
#  index_discourse_templates_usage_count_on_topic_id  (topic_id) UNIQUE
#