|
1
|
class Authorization < ApplicationRecord |
|
2
|
belongs_to :user |
|
3
|
|
|
4
|
enum onboarding_status: [ |
|
5
|
:pending, # Not onboarding. |
|
6
|
:onboarding, # In progress. |
|
7
|
:onboarded # Done. |
|
8
|
] |
|
9
|
|
|
10
|
def update_token(token, refresh_token) |
|
11
|
update(token: token) |
|
12
|
update(refresh_token: refresh_token) |
|
13
|
end |
|
14
|
end |