summaryrefslogtreecommitdiff
path: root/lib/validation.rb
blob: ff9a9710d4863cb7d56df7dd532dd70672db6566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module OpenTox

  module Validation

    class Validation
      include OpenTox
      include Mongoid::Document
      include Mongoid::Timestamps
      store_in collection: "validations"
      field :name, type: String
      field :model_id, type: BSON::ObjectId
      field :nr_instances, type: Integer
      field :nr_unpredicted, type: Integer
      field :predictions, type: Hash
      field :finished_at, type: Time 

      def model
        Model::Lazar.find model_id
      end

    end

  end

end