mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
26 lines
625 B
Ruby
Vendored
26 lines
625 B
Ruby
Vendored
# 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
|
|
# topic_id :integer not null
|
|
# usage_count :integer default(0), not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_discourse_templates_usage_count_on_topic_id (topic_id) UNIQUE
|
|
#
|