parent
bb3e0c4c7e
commit
3abfaed081
@ -0,0 +1,7 @@
|
||||
#学生提交作品表
|
||||
class StudentWork < ActiveRecord::Base
|
||||
attr_accessible :name, :description, :homework_common_id, :user_id, :final_score, :teacher_score, :student_score, :teaching_asistant_score
|
||||
|
||||
belongs_to :homework_common
|
||||
belongs_to :user
|
||||
end
|
@ -0,0 +1,16 @@
|
||||
class CreateStudentWorks < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :student_works do |t|
|
||||
t.string :name
|
||||
t.text :description
|
||||
t.integer :homework_common_id
|
||||
t.integer :user_id
|
||||
t.float :final_score, default: 0
|
||||
t.float :teacher_score, default: 0
|
||||
t.float :student_score, default: 0
|
||||
t.float :teaching_asistant_score, default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue