2021-05-05 00:10:41 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Users
|
|
|
|
class CreditCardValidation < ApplicationRecord
|
2021-05-12 00:10:27 +00:00
|
|
|
RELEASE_DAY = Date.new(2021, 5, 17)
|
|
|
|
|
2021-05-05 00:10:41 +00:00
|
|
|
self.table_name = 'user_credit_card_validations'
|
|
|
|
|
|
|
|
belongs_to :user
|
2021-10-05 12:12:58 +00:00
|
|
|
|
|
|
|
validates :holder_name, length: { maximum: 26 }
|
|
|
|
validates :last_digits, allow_nil: true, numericality: {
|
|
|
|
greater_than_or_equal_to: 0, less_than_or_equal_to: 9999
|
|
|
|
}
|
2021-05-05 00:10:41 +00:00
|
|
|
end
|
|
|
|
end
|