Sha256: 0bcdc5c56fa3ac25838ec3a0d39d0f9ad41ce9fa9f13d1d27862e6e83d7b7ae4

Contents?: true

Size: 1.03 KB

Versions: 108

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: user_accounts
#
#  id                 :bigint           not null, primary key
#  profiles           :integer          default([]), not null, is an Array
#  created_at         :datetime         not null
#  updated_at         :datetime         not null
#  account_id         :bigint           not null, indexed
#  actualizado_por_id :bigint           indexed
#  creado_por_id      :bigint           indexed
#  user_id            :bigint           not null, indexed
#
# Foreign Keys
#
#  fk_rails_...  (account_id => accounts.id)
#  fk_rails_...  (actualizado_por_id => users.id)
#  fk_rails_...  (creado_por_id => users.id)
#  fk_rails_...  (user_id => users.id)
#

class UserAccount < ApplicationRecord
  audited

  belongs_to :user
  belongs_to :account

  belongs_to :creado_por, optional: true, class_name: 'User'
  belongs_to :actualizado_por, optional: true, class_name: 'User'

  enumerize :profiles, in: {
    admin: 1,
    dueƱo: 2,
    invitado: 3
  }, multiple: true
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
pg_rails-7.0.8.pre.alpha.88 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.87 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.86 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.56 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.55 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.54 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.53 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.52 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.51 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.50 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.49 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.48 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.47 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.46 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.45 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.44 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.43 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.42 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.41 pg_engine/app/models/user_account.rb
pg_rails-7.0.8.pre.alpha.40 pg_engine/app/models/user_account.rb