--- /dev/null
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+class Review < ActiveRecord::Base
+ belongs_to :users
+ belongs_to :rule_failures
+ belongs_to :projects, :class_name => 'Project', :foreign_key => 'resource_id'
+ has_many :review_datas, :dependent => :destroy
+
+
+
+ def inherited?
+ inheritance=='INHERITED'
+ end
+
+ def overrides?
+ inheritance=='OVERRIDES'
+ end
+end
--- /dev/null
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+class ReviewData < ActiveRecord::Base
+ belongs_to :users
+ belongs_to :reviews
+
+
+
+ def inherited?
+ inheritance=='INHERITED'
+ end
+
+ def overrides?
+ inheritance=='OVERRIDES'
+ end
+end
--- /dev/null
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+
+#
+# Sonar 2.8
+#
+class CreateReview < ActiveRecord::Migration
+
+ def self.up
+ create_table 'reviews' do |t|
+ t.column 'user_id', :integer
+ t.column 'created_at', :datetime
+ t.column 'review_type', :string, :limit => 20
+ t.column 'status', :string, :limit => 20
+ t.column 'severity', :integer, :null => true
+ t.column 'external_link', :string, :null => true, :limit => 200
+ t.column 'rule_failure_id', :integer, :null => true
+ t.column 'resource_id', :integer, :null => true
+ t.column 'resource_line', :integer, :null => true
+ end
+
+ create_table 'review_datas' do |t|
+ t.column 'user_id', :integer
+ t.column 'review_id', :integer
+ t.column 'created_at', :datetime
+ t.column 'review_text', :string, :limit => 5000
+ end
+
+ end
+
+end