Class: PartnerTicketCode

Inherits:
ApplicationRecord show all
Extended by:
Enumerize
Defined in:
app/models/partner_ticket_code.rb

Overview

Schema Information

Table name: partner_ticket_codes

id                :bigint           not null, primary key
status            :string(191)
voucher_no        :string(191)
voucher_serial_no :string(191)
created_at        :datetime         not null
updated_at        :datetime         not null
ticket_group_id   :bigint
voucher_id        :string(191)

Indexes

index_partner_ticket_codes_on_ticket_group_id    (ticket_group_id)
index_partner_ticket_codes_on_voucher_serial_no  (voucher_serial_no)

Instance Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Instance Method Details

#masked_voucher_serial_noObject



32
33
34
35
# File 'app/models/partner_ticket_code.rb', line 32

def masked_voucher_serial_no
  prefix = 'X' * (voucher_serial_no.length - 7)
  "#{prefix}#{voucher_serial_no[-7..]}"
end