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.
13 lines
334 B
13 lines
334 B
6 years ago
|
class UserExtension < ApplicationRecord
|
||
|
# identity 0: 教师教授 1: 学生, 2: 专业人士, 3: 开发者
|
||
|
enum identity: { teacher: 0, student: 1, professional: 2, developer: 3 }
|
||
|
|
||
|
belongs_to :user
|
||
|
belongs_to :school
|
||
|
belongs_to :department
|
||
|
|
||
|
def identity_text
|
||
|
I18n.t("user.identity.#{identity}")
|
||
|
end
|
||
|
end
|