From 7b5ddef6b8565bd5f25d4359dde88d735bafb633 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 24 Sep 2019 17:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=89=88=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/local_stage.rb | 3 +++ app/models/local_stage_shixun.rb | 3 +++ app/models/local_subject.rb | 3 +++ .../20190924070347_create_local_subjects.rb | 17 +++++++++++++++++ .../20190924072232_create_local_stages.rb | 14 ++++++++++++++ ...20190924072622_create_local_stage_shixuns.rb | 15 +++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 app/models/local_stage.rb create mode 100644 app/models/local_stage_shixun.rb create mode 100644 app/models/local_subject.rb create mode 100644 db/migrate/20190924070347_create_local_subjects.rb create mode 100644 db/migrate/20190924072232_create_local_stages.rb create mode 100644 db/migrate/20190924072622_create_local_stage_shixuns.rb 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