yslnewtiku
parent
b8f779b46b
commit
d1dd9c25b9
@ -0,0 +1,2 @@
|
||||
class Curriculum < ApplicationRecord
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class KnowledgePoint < ApplicationRecord
|
||||
belongs_to :curriculum
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class KnowledgePointContainer < ApplicationRecord
|
||||
belongs_to :knowledge_point
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class CreateCurriculums < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :curriculums do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,10 @@
|
||||
class CreateKnowledgePoints < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :knowledge_points do |t|
|
||||
t.references :curriculum, foreign_key: true
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
class CreateKnowledgePointContainers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :knowledge_point_containers do |t|
|
||||
t.integer :container_id
|
||||
t.string :container_type
|
||||
t.references :knowledge_point, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Curriculum, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe KnowledgePointContainer, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe KnowledgePoint, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in new issue