chatwoot-develop/enterprise/app/models/captain/pix_charge.rb
2026-01-12 19:04:15 -03:00

12 lines
381 B
Ruby

class Captain::PixCharge < ApplicationRecord
self.table_name = 'captain_pix_charges'
belongs_to :reservation, class_name: 'Captain::Reservation'
belongs_to :unit, class_name: 'Captain::Unit'
enum status: { active: 'active', paid: 'paid', expired: 'expired', failed: 'failed' }
validates :txid, presence: true, uniqueness: true
validates :unit_id, presence: true
end