Implement order model
This commit is contained in:
parent
42758636b4
commit
59420ee879
29
lib/rex/order.rb
Normal file
29
lib/rex/order.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user