We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61c4edd commit fa69d09Copy full SHA for fa69d09
backend/app/models/otp.py
@@ -0,0 +1,11 @@
1
+from sqlalchemy import Column, Integer, String, DateTime
2
+from datetime import datetime, timedelta
3
+from app.database import Base
4
+
5
+class OtpModel(Base):
6
+ __tablename__ = "otp_records"
7
8
+ id = Column(Integer, primary_key=True, index=True)
9
+ email = Column(String, index=True, nullable=False)
10
+ otp = Column(String, nullable=False)
11
+ expires_at = Column(DateTime, default=lambda: datetime.utcnow() + timedelta(minutes=10))
0 commit comments