admins增加实践课程

dev_local_2
cxt 5 years ago
parent 84e1bb6e18
commit 15f7a58edc

@ -7,6 +7,7 @@ class Subject < ApplicationRecord
#status :0 编辑中 1 审核中 2 发布
belongs_to :repertoire
belongs_to :user
belongs_to :subject_level_system, optional: true
has_many :stages, -> { order("stages.position ASC") }, dependent: :destroy

@ -0,0 +1,5 @@
class SubjectLevelSystem < ApplicationRecord
default_scope { order(level: :asc) }
has_many :subjects, dependent: :nullify
end
Loading…
Cancel
Save