15 lines
464 B
Python
15 lines
464 B
Python
from sqlalchemy import Column, String, Integer, Float, Boolean, DateTime, Text
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
from datetime import datetime
|
|
|
|
Base = declarative_base()
|
|
|
|
|
|
class Admin(Base):
|
|
__tablename__ = "admins"
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
username = Column(String(50), unique=True, nullable=False)
|
|
password_hash = Column(String(255), nullable=False)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|