Sha256: cdb0dc2b236e1302e8e817197078d985d3a5b2f139506eecdb8a9e31f9ec6ff5

Contents?: true

Size: 450 Bytes

Versions: 4

Compression:

Stored size: 450 Bytes

Contents

# frozen_string_literal: true

require 'symmetric-encryption'

module Kaui
  class Tenant < ApplicationRecord
    attribute :encrypted_api_secret, :encrypted, random_iv: false
    alias_attribute :api_secret, :encrypted_api_secret

    has_many :kaui_allowed_user_tenants, class_name: 'Kaui::AllowedUserTenant', foreign_key: 'kaui_tenant_id'
    has_many :kaui_allowed_users, through: :kaui_allowed_user_tenants, source: :kaui_allowed_user
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kaui-3.0.4 app/models/kaui/tenant.rb
kaui-3.0.2 app/models/kaui/tenant.rb
kaui-2.2.1 app/models/kaui/tenant.rb
kaui-3.0.1 app/models/kaui/tenant.rb