chore: Use feature_flags attribute instead of settings_flags (#6820)
* chore: Use feature_flag instead of settings_flag * Remove unnecessary changes
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
# limits :jsonb
|
||||
# locale :integer default("en")
|
||||
# name :string not null
|
||||
# settings_flags :integer default(0), not null
|
||||
# status :integer default("active")
|
||||
# support_email :string(100)
|
||||
# created_at :datetime not null
|
||||
@@ -33,10 +32,6 @@ class Account < ApplicationRecord
|
||||
check_for_column: false
|
||||
}.freeze
|
||||
|
||||
ACCOUNT_SETTINGS_FLAGS = {
|
||||
1 => :custom_email_domain_enabled
|
||||
}.freeze
|
||||
|
||||
validates :name, presence: true
|
||||
validates :auto_resolve_duration, numericality: { greater_than_or_equal_to: 1, less_than_or_equal_to: 999, allow_nil: true }
|
||||
validates :name, length: { maximum: 255 }
|
||||
@@ -82,8 +77,6 @@ class Account < ApplicationRecord
|
||||
has_many :whatsapp_channels, dependent: :destroy_async, class_name: '::Channel::Whatsapp'
|
||||
has_many :working_hours, dependent: :destroy_async
|
||||
|
||||
has_flags ACCOUNT_SETTINGS_FLAGS.merge(column: 'settings_flags').merge(DEFAULT_QUERY_SETTING)
|
||||
|
||||
enum locale: LANGUAGES_CONFIG.map { |key, val| [val[:iso_639_1_code], key] }.to_h
|
||||
enum status: { active: 0, suspended: 1 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user