# 课堂中随机试卷的随机规则配置
class ExerciseRandomSetting < ApplicationRecord
  validates_presence_of :difficulty, :quanlity, :item_type, :sub_discipline_id
  validates :quanlity, numericality: {only_integer: true, greater_than: 0}

  belongs_to :exercise
  belongs_to :sub_discipline

  enum item_type: { SINGLE: 0, MULTIPLE: 1, JUDGMENT: 2, COMPLETION: 3, SUBJECTIVE: 4, PRACTICAL: 5, PROGRAM: 6 }
end
