16 lines
449 B
Python
16 lines
449 B
Python
from datetime import datetime
|
|
|
|
from sqlalchemy import DateTime, String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db import Base
|
|
|
|
|
|
class Box(Base):
|
|
__tablename__ = "boxes"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True, index=True)
|
|
name: Mapped[str] = mapped_column(String(100), nullable=False, default="Sample Box")
|
|
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, nullable=False)
|
|
|