Fix: Rename directory to remove & character causing shell issues

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.
This commit is contained in:
richardtekula
2025-11-11 17:06:39 +01:00
parent a3b609eab7
commit f78c2199e1
35 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
from sqlalchemy import Column, Integer, String, DateTime
from datetime import datetime
import pytz
from utils.auth import Base
class Coupon(Base):
"""
SQLAlchemy model representing a coupon code entry in the database.
Attributes:
id (int): Primary key identifier.
code (str): Unique coupon code string.
usage_count (int): Number of times the coupon has been used.
created_at (datetime): Timestamp of coupon creation (stored in Europe/Bratislava timezone).
used_at (datetime | None): Timestamp of the last usage, nullable.
"""
__tablename__ = "coupon_codes"
id = Column(Integer, primary_key=True)
code = Column(String, unique=True)
usage_count = Column(Integer, default=0)
created_at = Column(DateTime, default=lambda: datetime.now(pytz.timezone('Europe/Bratislava')))
used_at = Column(DateTime, nullable=True)