ADD db schema in models

This commit is contained in:
Jasder
2020-11-23 15:35:03 +08:00
parent ba1115f1f3
commit 60ac66ebe3
82 changed files with 1711 additions and 25 deletions

View File

@@ -1,3 +1,22 @@
# == 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
#
# Indexes
#
# by_email (email)
# by_phone (phone)
#
class VerificationCode < ApplicationRecord
def effective?
created_at + 10.minute > Time.current