This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
class GraduationWorkCommentAssignation < ApplicationRecord
# temporary 0: 正式分配 1:临时分配(交叉评阅设置中临时分配的作品,点取消时会删除) 2: 删除标志
belongs_to :graduation_work
belongs_to :graduation_task
belongs_to :user
belongs_to :graduation_group, optional: true
scope :temporary, -> {where(temporary: 1)}
scope :formal, -> {where(temporary: 0)}
scope :temporary_delete, -> {where(temporary: 2)}
scope :temporary_formal, -> {where(temporary: [0, 1])}
scope :myself, ->(user_id) {where(user_id: user_id)}
end