Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
	
		
	
				
					
				
			
						commit
						92cb389e71
					
				| @ -1,4 +0,0 @@ | ||||
| class Curriculum < ApplicationRecord | ||||
|   belongs_to :curriculum_direction | ||||
|   has_many :knowledge_points, dependent: :destroy | ||||
| end | ||||
| @ -1,4 +0,0 @@ | ||||
| class CurriculumDirection < ApplicationRecord | ||||
|   has_many :curriculums | ||||
|   has_many :knowledge_points | ||||
| end | ||||
| @ -1,5 +0,0 @@ | ||||
| class KnowledgePoint < ApplicationRecord | ||||
|   belongs_to :curriculum_direction | ||||
|   belongs_to :curriculum | ||||
|   has_many :knowledge_point_containers, dependent: :destroy | ||||
| end | ||||
| @ -1,3 +0,0 @@ | ||||
| class KnowledgePointContainer < ApplicationRecord | ||||
|   belongs_to :knowledge_point | ||||
| end | ||||
| @ -1,9 +0,0 @@ | ||||
| class CreateCurriculumDirections < ActiveRecord::Migration[5.2] | ||||
|   def change | ||||
|     create_table :curriculum_directions do |t| | ||||
|       t.string :name | ||||
| 
 | ||||
|       t.timestamps | ||||
|     end | ||||
|   end | ||||
| end | ||||
| @ -1,10 +0,0 @@ | ||||
| class CreateCurriculums < ActiveRecord::Migration[5.2] | ||||
|   def change | ||||
|     create_table :curriculums do |t| | ||||
|       t.string :name | ||||
|       t.references :curriculum_direction, index: true | ||||
| 
 | ||||
|       t.timestamps | ||||
|     end | ||||
|   end | ||||
| end | ||||
| @ -1,11 +0,0 @@ | ||||
| class CreateKnowledgePoints < ActiveRecord::Migration[5.2] | ||||
|   def change | ||||
|     create_table :knowledge_points do |t| | ||||
|       t.string :name | ||||
|       t.references :curriculum_direction, index: true | ||||
|       t.references :curriculum, index: true | ||||
| 
 | ||||
|       t.timestamps | ||||
|     end | ||||
|   end | ||||
| end | ||||
| @ -1,12 +0,0 @@ | ||||
| class CreateKnowledgePointContainers < ActiveRecord::Migration[5.2] | ||||
|   def change | ||||
|     create_table :knowledge_point_containers do |t| | ||||
|       t.references :knowledge_point | ||||
|       t.integer :container_id | ||||
|       t.string :container_type | ||||
| 
 | ||||
|       t.timestamps | ||||
|     end | ||||
|     add_index :knowledge_point_containers, [:knowledge_point_id, :container_id, :container_type], name: "container_index", unique: true | ||||
|   end | ||||
| end | ||||
| @ -1,5 +0,0 @@ | ||||
| require 'rails_helper' | ||||
| 
 | ||||
| RSpec.describe CurriculumDirection, type: :model do | ||||
|   pending "add some examples to (or delete) #{__FILE__}" | ||||
| end | ||||
| @ -1,5 +0,0 @@ | ||||
| require 'rails_helper' | ||||
| 
 | ||||
| RSpec.describe Curriculum, type: :model do | ||||
|   pending "add some examples to (or delete) #{__FILE__}" | ||||
| end | ||||
| @ -1,5 +0,0 @@ | ||||
| require 'rails_helper' | ||||
| 
 | ||||
| RSpec.describe KnowledgePointContainer, type: :model do | ||||
|   pending "add some examples to (or delete) #{__FILE__}" | ||||
| end | ||||
| @ -1,5 +0,0 @@ | ||||
| require 'rails_helper' | ||||
| 
 | ||||
| RSpec.describe KnowledgePoint, type: :model do | ||||
|   pending "add some examples to (or delete) #{__FILE__}" | ||||
| end | ||||
					Loading…
					
					
				
		Reference in new issue