
- Add is_divisible_by_3 field to database model and schema - Create migration script for the new field - Update existing endpoints to check divisibility by 3 - Add dedicated endpoints for divisibility by 3 - Update README with new endpoint documentation - Fix linting issues with ruff
14 lines
498 B
Python
14 lines
498 B
Python
from sqlalchemy import Column, Integer, Boolean, DateTime
|
|
from sqlalchemy.sql import func
|
|
from app.database.connection import Base
|
|
|
|
|
|
class NumberCheck(Base):
|
|
__tablename__ = "number_checks"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
number = Column(Integer, nullable=False)
|
|
is_divisible_by_2 = Column(Boolean, nullable=False)
|
|
is_divisible_by_3 = Column(Boolean, nullable=False, default=False)
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|