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

11
app/models/admin_user.rb Normal file
View File

@@ -0,0 +1,11 @@
class AdminUser < ApplicationRecord
has_secure_password
validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP }
validates :name, presence: true
validates :password, length: { minimum: 8 }, if: -> { password.present? }
def update_last_login!
update!(last_login_at: Time.current)
end
end