# status:0 审核中 1 同意 2 拒绝 3 撤销 # auth_type:1 实名认证, 2 职业认证 class ApplyUserAuthentication < ApplicationRecord belongs_to :user scope :real_name_auth, -> { where(auth_type: 1) } scope :professional_auth, -> { where(auth_type: 2) } scope :processing, -> { where(status: 0) } scope :passed, -> { where(status: 1) } end