mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-10-29 23:46:32 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # frozen_string_literal: true
 | |
| 
 | |
| class Token < ApplicationRecord
 | |
|   validates :token, presence: true
 | |
|   validates :ttl, presence: true
 | |
| 
 | |
|   belongs_to :user, foreign_key: 'user_id', class_name: 'User', inverse_of: :tokens
 | |
| end
 |