From ea3b80fdc6cde4cff835e49d9a7c7ceed8cdae6a Mon Sep 17 00:00:00 2001 From: nwb Date: Thu, 29 May 2014 16:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0CourseStatus=E8=A1=A8?= =?UTF-8?q?=E5=92=8Cmodel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course_status.rb | 3 +++ db/migrate/20140529084427_create_course_statuses.rb | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 app/models/course_status.rb create mode 100644 db/migrate/20140529084427_create_course_statuses.rb diff --git a/app/models/course_status.rb b/app/models/course_status.rb new file mode 100644 index 000000000..d5a01ac4b --- /dev/null +++ b/app/models/course_status.rb @@ -0,0 +1,3 @@ +class CourseStatus < ActiveRecord::Base + attr_accessible :changesets_count, :course_ac_para, :course_id, :grade, :watchers_count +end diff --git a/db/migrate/20140529084427_create_course_statuses.rb b/db/migrate/20140529084427_create_course_statuses.rb new file mode 100644 index 000000000..1244425db --- /dev/null +++ b/db/migrate/20140529084427_create_course_statuses.rb @@ -0,0 +1,13 @@ +class CreateCourseStatuses < ActiveRecord::Migration + def change + create_table :course_statuses do |t| + t.integer :changesets_count + t.integer :watchers_count + t.integer :course_id + t.float :grade ,default:0 + t.integer :course_ac_para ,default:0 + + t.timestamps + end + end +end