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.
educoder/app/models/graduation_task_group_assig...

13 lines
651 B

6 years ago
class GraduationTaskGroupAssignation < ApplicationRecord
# temporary 0: 正式分配 1临时分配交叉评阅设置中临时分配的作品点取消时会删除 2: 删除标志
6 years ago
belongs_to :graduation_task
belongs_to :graduation_group
belongs_to :assign_group, class_name: 'GraduationGroup', foreign_key: :assign_graduation_group_id, optional: true # 分配的互评组
belongs_to :graduation_work, optional: true
6 years ago
scope :temporary, -> {where(temporary: 1)}
scope :formal, -> {where(temporary: 0)}
scope :temporary_delete, -> {where(temporary: 2)}
scope :temporary_formal, -> {where(temporary: [0, 1])}
6 years ago
end