Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m45s
Run linting on the backend code / Build (pull_request) Successful in 27s
Run testing on the backend code / Build (pull_request) Failing after 45s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 25s
27 lines
708 B
Python
27 lines
708 B
Python
"""Definition of the Toilets class."""
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class Toilets(BaseModel) :
|
|
"""
|
|
Model for toilets. When false/empty the information is either false either not known.
|
|
"""
|
|
location : tuple
|
|
wheelchair : Optional[bool] = False
|
|
changing_table : Optional[bool] = False
|
|
fee : Optional[bool] = False
|
|
opening_hours : Optional[str] = ""
|
|
|
|
|
|
def __str__(self) -> str:
|
|
"""
|
|
String representation of the Toilets object.
|
|
|
|
Returns:
|
|
str: A formatted string with the toilets location.
|
|
"""
|
|
return f'Toilets @{self.location}'
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|