Class: Externals::GbPrimepay::Card

Inherits:
ApplicationRecord show all
Defined in:
app/models/externals/gb_primepay/card.rb

Overview

typed: ignore

Schema Information

Table name: externals_gb_primepay_cards

id               :bigint           not null, primary key
card_location    :string(191)
card_type        :string(191)
expiration_month :string(191)
expiration_year  :string(191)
is_primary       :boolean          default(FALSE)
last_digits      :string(191)
name             :text(16777215)
number           :string(191)
token            :string(191)
created_at       :datetime         not null
updated_at       :datetime         not null
reservation_id   :integer
user_id          :integer

Indexes

idx_card_by_user_uniq                                (number,user_id,expiration_year,expiration_month,card_location,card_type) UNIQUE
index_expiration_year_month_last_digits              (expiration_year,expiration_month,last_digits)
index_externals_gb_primepay_cards_on_reservation_id  (reservation_id)
index_externals_gb_primepay_cards_on_user_id         (user_id)

Foreign Keys

fk_rails_...  (reservation_id => reservations.id)
fk_rails_...  (user_id => users.id)

Method Summary

Methods inherited from ApplicationRecord

sync_carrierwave_url