parent
ee5efab7b8
commit
a43a6289e4
@ -0,0 +1,7 @@
|
||||
#老师布置的作业表
|
||||
class HomeworkCommon < ActiveRecord::Base
|
||||
attr_accessible :name, :user_id, :description, :publish_time, :end_time, :homework_type, :late_penalty, :course_id
|
||||
|
||||
belongs_to :course
|
||||
belongs_to :user
|
||||
end
|
@ -0,0 +1,16 @@
|
||||
class CreateHomeworkCommons < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :homework_commons do |t|
|
||||
t.string :name
|
||||
t.integer :user_id
|
||||
t.text :description
|
||||
t.date :publish_time
|
||||
t.date :end_time
|
||||
t.integer :homework_type, default: 1
|
||||
t.string :late_penalty
|
||||
t.integer :course_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue