class User < EEntity
expose :id, :name, :pinyin, :account_id, :hidden, :dept_id, :actived
expose :initialism, as: :short_pinyin
expose :role_code
expose :login_name
expose(:email, if: lambda { |u, op| op[:included_user_email] == true }) do |u, options|
u.email
end
expose :cellvoice1, if: lambda { |u, op| !op[:no_privacy] } do |u, options|
if u.get_user_info
u.get_user_info.cellvoice1
else
nil
end
end
expose :nickname do |u, options|
if u.get_user_info
u.get_user_info.nickname
else
nil
end
end
expose :workvoice do |u, options|
if u.get_user_info
u.get_user_info.workvoice
else
nil
end
end
expose :dept_name do |u, options|
uinfo = u.get_user_info
if uinfo
uinfo.get_dept_display_name
else
nil
end
end
end
User Entity
How to get some of these exposes? example:
Result: