class HackUserCode < ApplicationRecord # 用户编程题的信息 belongs_to :hack belongs_to :hack_user_lastest_code scope :created_order, ->{ order("created_at desc")} end