Class: BridgeCache::User

Inherits:
BridgeBaseModel show all
Extended by:
Data::BridgeModel
Defined in:
app/models/bridge_cache/user.rb

Constant Summary

Constants included from Data::BridgeModel

Data::BridgeModel::EXCLUDED_COLUMNS, Data::BridgeModel::OVERRIDDEN_COLUMNS

Constants inherited from BridgeBaseModel

BridgeBaseModel::BRIDGE_ID, BridgeBaseModel::DOMAIN_ID, BridgeBaseModel::OWNER_ID, BridgeBaseModel::PARENT_ID

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Data::BridgeModel

adjusted_table_name, cleanup, create_from_csv_row, csv_mapping, extended, for_domain, format_import_row, import_from_csv, is_active?, uniq_constraint_name, unique_column_names, webhook_completed, webhook_created, webhook_deleted, webhook_updated

Methods inherited from BridgeBaseModel

#adjusted_table_name, #bridge_id

Class Method Details

.for_domain(domain_id) ⇒ Object



30
31
32
# File 'app/models/bridge_cache/user.rb', line 30

def self.for_domain(domain_id)
  where('bridge_cache_users.sub_account_id = ?', domain_id)
end

.unique_column_namesObject



38
39
40
# File 'app/models/bridge_cache/user.rb', line 38

def self.unique_column_names
  %w[bridge_id sub_account_id]
end

Instance Method Details

#managerObject



34
35
36
# File 'app/models/bridge_cache/user.rb', line 34

def manager
  domain.owner
end