mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
10 lines
229 B
Ruby
10 lines
229 B
Ruby
class Token < ApplicationRecord
|
|
validates :token, presence: true
|
|
validates :ttl, presence: true
|
|
|
|
belongs_to :user,
|
|
foreign_key: 'user_id',
|
|
class_name: 'User',
|
|
inverse_of: :tokens,
|
|
optional: true
|
|
end
|