diff --git a/src/lib/db_init.rb b/src/lib/db_init.rb index a5c6a3c..84f8e07 100644 --- a/src/lib/db_init.rb +++ b/src/lib/db_init.rb @@ -5,6 +5,7 @@ LOAD_MODELS = [ Role, User_Role_relation, Auction, + Bid, Auction_Category_relation, Category, Image diff --git a/src/lib/db_models.rb b/src/lib/db_models.rb index 0094211..2a15a66 100644 --- a/src/lib/db_models.rb +++ b/src/lib/db_models.rb @@ -352,6 +352,16 @@ class Auction < EntityModel end end +# Auction bids +class Bid < EntityModel + attr_reader :amount, :auction_id, :user_id, :message + def initialize(data) + super data + @amount = data["amount"].to_f + # stuff + end +end + class Category < EntityModel attr_reader :name, :color