add BuyCryptoOrder and SellCryptoOrder entities

This commit is contained in:
João Geonizeli
2021-08-14 17:42:19 -03:00
parent 30ab1b11f1
commit 57a3fcf25f
12 changed files with 437 additions and 49 deletions

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
module Processable
extend Enumerize
extend ActiveSupport::Concern
included do
enumerize :status, in: [:processing, :completed, :canceled], default: :processing
end
def processing?
status == :processing
end
def completed?
status == :completed
end
def canceled?
status == :canceled
end
end