From 59420ee879f005bb84256ae36a5b5325af8f738b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20K=C3=A4chele?= Date: Fri, 27 Oct 2023 14:56:05 +0200 Subject: [PATCH] Implement order model --- lib/rex/order.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/rex/order.rb diff --git a/lib/rex/order.rb b/lib/rex/order.rb new file mode 100644 index 0000000..acf1092 --- /dev/null +++ b/lib/rex/order.rb @@ -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