From 185e8957e67afe8d08aa1b37d33fcda08ec897e1 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 14 Dec 2016 16:00:38 +0800 Subject: [PATCH] student_works_scores_appeal model --- app/models/student_works_scores_appeal.rb | 3 +++ ...1214080008_create_student_works_scores_appeals.rb | 12 ++++++++++++ spec/factories/student_works_scores_appeals.rb | 9 +++++++++ spec/models/student_works_scores_appeal_spec.rb | 5 +++++ 4 files changed, 29 insertions(+) create mode 100644 app/models/student_works_scores_appeal.rb create mode 100644 db/migrate/20161214080008_create_student_works_scores_appeals.rb create mode 100644 spec/factories/student_works_scores_appeals.rb create mode 100644 spec/models/student_works_scores_appeal_spec.rb diff --git a/app/models/student_works_scores_appeal.rb b/app/models/student_works_scores_appeal.rb new file mode 100644 index 000000000..b69a942c2 --- /dev/null +++ b/app/models/student_works_scores_appeal.rb @@ -0,0 +1,3 @@ +class StudentWorksScoresAppeal < ActiveRecord::Base + attr_accessible :appeal_status, :comment, :student_works_score_id, :user_id +end diff --git a/db/migrate/20161214080008_create_student_works_scores_appeals.rb b/db/migrate/20161214080008_create_student_works_scores_appeals.rb new file mode 100644 index 000000000..b5dd9d74a --- /dev/null +++ b/db/migrate/20161214080008_create_student_works_scores_appeals.rb @@ -0,0 +1,12 @@ +class CreateStudentWorksScoresAppeals < ActiveRecord::Migration + def change + create_table :student_works_scores_appeals do |t| + t.integer :student_works_score_id + t.integer :user_id + t.text :comment + t.integer :appeal_status + + t.timestamps + end + end +end diff --git a/spec/factories/student_works_scores_appeals.rb b/spec/factories/student_works_scores_appeals.rb new file mode 100644 index 000000000..359487602 --- /dev/null +++ b/spec/factories/student_works_scores_appeals.rb @@ -0,0 +1,9 @@ +FactoryGirl.define do + factory :student_works_scores_appeal do + student_works_score_id 1 +user_id 1 +comment "MyText" +appeal_status 1 + end + +end diff --git a/spec/models/student_works_scores_appeal_spec.rb b/spec/models/student_works_scores_appeal_spec.rb new file mode 100644 index 000000000..89802b950 --- /dev/null +++ b/spec/models/student_works_scores_appeal_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe StudentWorksScoresAppeal, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end