Renamed ebook_backend&admin_panel to ebook_backend_admin_panel The & character was being interpreted by shell as background process operator, causing 'Dockerfile not found' errors in Coolify.
21 lines
775 B
Python
21 lines
775 B
Python
from sqlalchemy import Column, Integer, String, DateTime
|
|
from datetime import datetime
|
|
import pytz
|
|
from utils.auth import Base
|
|
|
|
class AdminUser(Base):
|
|
"""
|
|
SQLAlchemy model representing an admin user.
|
|
|
|
Attributes:
|
|
id (int): Primary key identifier.
|
|
username (str): Unique admin username.
|
|
password_hash (str): Hashed password for authentication.
|
|
created_at (datetime): Timestamp of account creation (stored in Europe/Bratislava timezone).
|
|
"""
|
|
__tablename__ = "admin_users"
|
|
id = Column(Integer, primary_key=True)
|
|
username = Column(String, unique=True, nullable=False)
|
|
password_hash = Column(String, nullable=False)
|
|
created_at = Column(DateTime, default=lambda: datetime.now(pytz.timezone('Europe/Bratislava')))
|