portal-template/app/models/offer_application.rb

12 lines
278 B
Ruby

class OfferApplication
include Mongoid::Document
include Mongoid::Timestamps
field :member_profile_id, :type => BSON::ObjectId
field :offer_id, :type => BSON::ObjectId
scope :sort_date, ->{ order_by(:start_date => "desc", :end_date => "desc", :id => "desc") }
end