forgeplus/app/models/verification_code.rb

20 lines
439 B
Ruby
Raw Normal View History

2020-11-23 15:35:03 +08:00
# == Schema Information
#
# Table name: verification_codes
#
# id :integer not null, primary key
# code :string(255)
# code_type :integer
# status :integer
# phone :string(255)
# email :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
2022-03-30 14:10:19 +08:00
class VerificationCode < ApplicationRecord
def effective?
created_at + 10.minute > Time.current
end
end