chore: Update Help Center APIs to accomodate locale (#4515)

This commit is contained in:
Pranav Raj S
2022-04-20 16:00:37 +05:30
committed by GitHub
parent 4f3a271355
commit f2f0d466f2
17 changed files with 114 additions and 57 deletions

View File

@@ -4,6 +4,7 @@
#
# id :bigint not null, primary key
# description :text
# locale :string default("en")
# name :string
# position :integer
# created_at :datetime not null
@@ -11,6 +12,10 @@
# account_id :integer not null
# portal_id :integer not null
#
# Indexes
#
# index_kbase_categories_on_locale_and_account_id (locale,account_id)
#
class Kbase::Category < ApplicationRecord
belongs_to :account
belongs_to :portal

View File

@@ -3,8 +3,8 @@
# Table name: kbase_portals
#
# id :bigint not null, primary key
# account_id :integer not null
# color :string
# config :jsonb
# custom_domain :string
# header_text :text
# homepage_link :string
@@ -13,6 +13,7 @@
# slug :string not null
# created_at :datetime not null
# updated_at :datetime not null
# account_id :integer not null
#
# Indexes
#
@@ -26,5 +27,5 @@ class Kbase::Portal < ApplicationRecord
validates :account_id, presence: true
validates :name, presence: true
validates :slug, presence: true
validates :slug, presence: true, uniqueness: true
end