summaryrefslogtreecommitdiff
path: root/lib/validation.rb
blob: ced9596e1edde73ae8b859f37c2cbcba63fa9f55 (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, default: 0
      field :nr_unpredicted, type: Integer, default: 0
      field :predictions, type: Hash, default: {}
      field :finished_at, type: Time 

      def model
        Model::Lazar.find model_id
      end

    end

  end

end