添加CourseStatus表和model
This commit is contained in:
parent
f936c30ec9
commit
ea3b80fdc6
|
@ -0,0 +1,3 @@
|
|||
class CourseStatus < ActiveRecord::Base
|
||||
attr_accessible :changesets_count, :course_ac_para, :course_id, :grade, :watchers_count
|
||||
end
|
|
@ -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
|
Loading…
Reference in New Issue