You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psfpeqmhf/app/models/examination_bank_random_set...

11 lines
470 B

# 随机组卷的提醒分数配置
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