mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
annotate models
This commit is contained in:
parent
46f3261025
commit
2db3cfb16b
@ -20,3 +20,20 @@ class ApiKey < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: api_keys
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# key :string(64) not null
|
||||||
|
# user_id :integer
|
||||||
|
# created_by_id :integer
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
# Indexes
|
||||||
|
#
|
||||||
|
# index_api_keys_on_key (key)
|
||||||
|
# index_api_keys_on_user_id (user_id) UNIQUE
|
||||||
|
#
|
||||||
|
@ -310,10 +310,14 @@ end
|
|||||||
# hotness :float default(5.0), not null
|
# hotness :float default(5.0), not null
|
||||||
# read_restricted :boolean default(FALSE), not null
|
# read_restricted :boolean default(FALSE), not null
|
||||||
# auto_close_days :float
|
# auto_close_days :float
|
||||||
|
# post_count :integer default(0), not null
|
||||||
|
# latest_post_id :integer
|
||||||
|
# latest_topic_id :integer
|
||||||
|
# position :integer not null
|
||||||
|
# parent_category_id :integer
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_categories_on_forum_thread_count (topic_count)
|
# index_categories_on_forum_thread_count (topic_count)
|
||||||
# index_categories_on_name (name) UNIQUE
|
# index_categories_on_name (name) UNIQUE
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ end
|
|||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# user_id :integer
|
# user_id :integer
|
||||||
# ip_address :string
|
# ip_address :inet
|
||||||
# current_user_id :integer
|
# current_user_id :integer
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
@ -111,4 +111,3 @@ end
|
|||||||
# index_incoming_links_on_created_at_and_domain (created_at,domain)
|
# index_incoming_links_on_created_at_and_domain (created_at,domain)
|
||||||
# index_incoming_links_on_created_at_and_user_id (created_at,user_id)
|
# index_incoming_links_on_created_at_and_user_id (created_at,user_id)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -455,6 +455,7 @@ end
|
|||||||
# notify_user_count :integer default(0), not null
|
# notify_user_count :integer default(0), not null
|
||||||
# like_score :integer default(0), not null
|
# like_score :integer default(0), not null
|
||||||
# deleted_by_id :integer
|
# deleted_by_id :integer
|
||||||
|
# edit_reason :string(255)
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
@ -462,4 +463,3 @@ end
|
|||||||
# index_posts_on_reply_to_post_number (reply_to_post_number)
|
# index_posts_on_reply_to_post_number (reply_to_post_number)
|
||||||
# index_posts_on_topic_id_and_post_number (topic_id,post_number) UNIQUE
|
# index_posts_on_topic_id_and_post_number (topic_id,post_number) UNIQUE
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -4,3 +4,20 @@ class PostDetail < ActiveRecord::Base
|
|||||||
validates_presence_of :key, :value
|
validates_presence_of :key, :value
|
||||||
validates_uniqueness_of :key, scope: :post_id
|
validates_uniqueness_of :key, scope: :post_id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: post_details
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# post_id :integer
|
||||||
|
# key :string(255)
|
||||||
|
# value :string(255)
|
||||||
|
# extra :text
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
# Indexes
|
||||||
|
#
|
||||||
|
# index_post_details_on_post_id_and_key (post_id,key) UNIQUE
|
||||||
|
#
|
||||||
|
@ -35,11 +35,10 @@ end
|
|||||||
# last_match_at :datetime
|
# last_match_at :datetime
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# ip_address :string
|
# ip_address :inet
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_blocked_emails_on_email (email) UNIQUE
|
# index_blocked_emails_on_email (email) UNIQUE
|
||||||
# index_blocked_emails_on_last_match_at (last_match_at)
|
# index_blocked_emails_on_last_match_at (last_match_at)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -50,3 +50,21 @@ class ScreenedIpAddress < ActiveRecord::Base
|
|||||||
!!b and b.action_type == action_type
|
!!b and b.action_type == action_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: screened_ip_addresses
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# ip_address :inet not null
|
||||||
|
# action_type :integer not null
|
||||||
|
# match_count :integer default(0), not null
|
||||||
|
# last_match_at :datetime
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
# Indexes
|
||||||
|
#
|
||||||
|
# index_screened_ip_addresses_on_ip_address (ip_address) UNIQUE
|
||||||
|
# index_screened_ip_addresses_on_last_match_at (last_match_at)
|
||||||
|
#
|
||||||
|
@ -49,11 +49,10 @@ end
|
|||||||
# last_match_at :datetime
|
# last_match_at :datetime
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# ip_address :string
|
# ip_address :inet
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_screened_urls_on_last_match_at (last_match_at)
|
# index_screened_urls_on_last_match_at (last_match_at)
|
||||||
# index_screened_urls_on_url (url) UNIQUE
|
# index_screened_urls_on_url (url) UNIQUE
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -729,6 +729,7 @@ end
|
|||||||
# auto_close_user_id :integer
|
# auto_close_user_id :integer
|
||||||
# auto_close_started_at :datetime
|
# auto_close_started_at :datetime
|
||||||
# deleted_by_id :integer
|
# deleted_by_id :integer
|
||||||
|
# participant_count :integer default(1)
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
@ -737,4 +738,3 @@ end
|
|||||||
# index_topics_on_deleted_at_and_visible_and_archetype_and_id (deleted_at,visible,archetype,id)
|
# index_topics_on_deleted_at_and_visible_and_archetype_and_id (deleted_at,visible,archetype,id)
|
||||||
# index_topics_on_id_and_deleted_at (id,deleted_at)
|
# index_topics_on_id_and_deleted_at (id,deleted_at)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -53,10 +53,9 @@ end
|
|||||||
# user_id :integer
|
# user_id :integer
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# ip_address :string not null
|
# ip_address :inet not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_forum_thread_link_clicks_on_forum_thread_link_id (topic_link_id)
|
# index_forum_thread_link_clicks_on_forum_thread_link_id (topic_link_id)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ end
|
|||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# sha1 :string(40)
|
# sha1 :string(40)
|
||||||
|
# origin :string(1000)
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
@ -119,4 +120,3 @@ end
|
|||||||
# index_uploads_on_url (url)
|
# index_uploads_on_url (url)
|
||||||
# index_uploads_on_user_id (user_id)
|
# index_uploads_on_user_id (user_id)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -635,7 +635,7 @@ end
|
|||||||
# auto_track_topics_after_msecs :integer
|
# auto_track_topics_after_msecs :integer
|
||||||
# views :integer default(0), not null
|
# views :integer default(0), not null
|
||||||
# flag_level :integer default(0), not null
|
# flag_level :integer default(0), not null
|
||||||
# ip_address :string
|
# ip_address :inet
|
||||||
# new_topic_duration_minutes :integer
|
# new_topic_duration_minutes :integer
|
||||||
# external_links_in_new_tab :boolean default(FALSE), not null
|
# external_links_in_new_tab :boolean default(FALSE), not null
|
||||||
# enable_quoting :boolean default(TRUE), not null
|
# enable_quoting :boolean default(TRUE), not null
|
||||||
@ -656,4 +656,3 @@ end
|
|||||||
# index_users_on_username (username) UNIQUE
|
# index_users_on_username (username) UNIQUE
|
||||||
# index_users_on_username_lower (username_lower) UNIQUE
|
# index_users_on_username_lower (username_lower) UNIQUE
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -42,11 +42,10 @@ end
|
|||||||
# parent_type :string(50) not null
|
# parent_type :string(50) not null
|
||||||
# viewed_at :date not null
|
# viewed_at :date not null
|
||||||
# user_id :integer
|
# user_id :integer
|
||||||
# ip_address :string not null
|
# ip_address :inet not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_views_on_parent_id_and_parent_type (parent_id,parent_type)
|
# index_views_on_parent_id_and_parent_type (parent_id,parent_type)
|
||||||
# index_views_on_user_id_and_parent_type_and_parent_id (user_id,parent_type,parent_id)
|
# index_views_on_user_id_and_parent_type_and_parent_id (user_id,parent_type,parent_id)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user