completed SMS gateway project

This commit is contained in:
Min Zeya Phyo
2025-10-22 17:22:17 +08:00
commit c883fa7128
190 changed files with 16294 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
class CreateOtpCodes < ActiveRecord::Migration[8.0]
def change
create_table :otp_codes do |t|
t.string :phone_number, null: false
t.string :code, null: false
t.string :purpose, default: "authentication"
t.datetime :expires_at, null: false
t.boolean :verified, default: false
t.datetime :verified_at
t.integer :attempts, default: 0
t.string :ip_address
t.jsonb :metadata, default: {}
t.timestamps
end
add_index :otp_codes, :phone_number
add_index :otp_codes, :expires_at
add_index :otp_codes, [:phone_number, :verified, :expires_at]
end
end