Implement order model

This commit is contained in:
Tim Kächele 2023-10-27 14:56:05 +02:00
parent 42758636b4
commit 59420ee879

29
lib/rex/order.rb Normal file
View File

@ -0,0 +1,29 @@
module Rex
class Order
attr_accessor(
:next_order,
:remaining_amount
)
attr_reader(
:id,
:is_buy,
:price,
:user_id,
:amount
)
def initialize(attrs = {})
@id = attrs[:id]
@user_id = attrs[:user_id]
@price = attrs[:price]
@is_buy = attrs[:is_buy]
@amount = attrs[:amount]
@remaining_amount = attrs[:amount]
@next_order = nil
end
end
end