# 随机组卷的提醒分数配置 class ExaminationBankRandomSetting < ApplicationRecord # difficulty: 1 简单 2 适中 3 困难 validates_presence_of :difficulty, :quanlity, :item_type, :sub_discipline_id validates :quanlity, numericality: {only_integer: true, greater_than: 0} belongs_to :examination_bank belongs_to :sub_discipline enum item_type: { SINGLE: 0, MULTIPLE: 1, JUDGMENT: 2, COMPLETION: 3, SUBJECTIVE: 4, PRACTICAL: 5, PROGRAM: 6 } end