diff --git a/app/models/local_stage.rb b/app/models/local_stage.rb new file mode 100644 index 00000000..7cdabca4 --- /dev/null +++ b/app/models/local_stage.rb @@ -0,0 +1,3 @@ +class LocalStage < ActiveRecord::Base + # attr_accessible :description, :local_subject_id, :name, :position, :shixuns_count, :subject_id +end diff --git a/app/models/local_stage_shixun.rb b/app/models/local_stage_shixun.rb new file mode 100644 index 00000000..c2408b63 --- /dev/null +++ b/app/models/local_stage_shixun.rb @@ -0,0 +1,3 @@ +class LocalStageShixun < ActiveRecord::Base + # attr_accessible :local_subject_id, :position, :shixun_id, :stage_id, :subject_id +end diff --git a/app/models/local_subject.rb b/app/models/local_subject.rb new file mode 100644 index 00000000..83eb8522 --- /dev/null +++ b/app/models/local_subject.rb @@ -0,0 +1,3 @@ +class LocalSubject < ActiveRecord::Base + # attr_accessible :description, :introduction, :learning_notes, :name, :shixuns_count, :stage_shixuns_count, :stages_count, :status +end diff --git a/db/migrate/20190924070347_create_local_subjects.rb b/db/migrate/20190924070347_create_local_subjects.rb new file mode 100644 index 00000000..db8087d3 --- /dev/null +++ b/db/migrate/20190924070347_create_local_subjects.rb @@ -0,0 +1,17 @@ +class CreateLocalSubjects < ActiveRecord::Migration + def change + create_table :local_subjects do |t| + t.string :name + t.text :description + t.integer :status + t.text :learning_notes + t.string :introduction + t.integer :stages_count + t.integer :stage_shixuns_count + t.integer :shixuns_count + t.integer :subject_id + + t.timestamps + end + end +end diff --git a/db/migrate/20190924072232_create_local_stages.rb b/db/migrate/20190924072232_create_local_stages.rb new file mode 100644 index 00000000..309a30e1 --- /dev/null +++ b/db/migrate/20190924072232_create_local_stages.rb @@ -0,0 +1,14 @@ +class CreateLocalStages < ActiveRecord::Migration + def change + create_table :local_stages do |t| + t.integer :subject_id + t.string :name + t.text :description + t.integer :position + t.integer :shixuns_count + t.integer :local_subject_id + + t.timestamps + end + end +end diff --git a/db/migrate/20190924072622_create_local_stage_shixuns.rb b/db/migrate/20190924072622_create_local_stage_shixuns.rb new file mode 100644 index 00000000..93c1d5da --- /dev/null +++ b/db/migrate/20190924072622_create_local_stage_shixuns.rb @@ -0,0 +1,15 @@ +class CreateLocalStageShixuns < ActiveRecord::Migration + def change + create_table :local_stage_shixuns do |t| + t.integer :subject_id + t.integer :local_subject_id + t.integer :stage_id + t.integer :local_stage_id + t.integer :shixun_id + t.integer :local_shixun_id + t.integer :position + + t.timestamps + end + end +end