Spaces:
Sleeping
Sleeping
Download app/models/driver.py from Sherry245/rideshare-api: direct link, hf CLI and curl.
- Browser
- Download file 641 Bytes
-
https://huggingface.co/spaces/Sherry245/rideshare-api/resolve/main/app/models/driver.py
- Command line
-
hf download hf://spaces/Sherry245/rideshare-api/app/models/driver.py
-
curl -L -o driver.py https://huggingface.co/spaces/Sherry245/rideshare-api/resolve/main/app/models/driver.py
641 Bytes
| from sqlalchemy import Column, ForeignKey, Boolean, Float, String | |
| from sqlalchemy.dialects.postgresql import UUID | |
| from geoalchemy2 import Geography | |
| from app.core.database import Base | |
| class Driver(Base): | |
| __tablename__ = 'drivers' | |
| user_id = Column(UUID(as_uuid=True), ForeignKey('profiles.id', ondelete='CASCADE'), primary_key=True) | |
| license_no = Column(String, nullable=False) | |
| vehicle_make = Column(String) | |
| vehicle_model = Column(String) | |
| vehicle_plate = Column(String) | |
| is_online = Column(Boolean, default=False) | |
| rating = Column(Float, default=5.0) | |
| current_location = Column(Geography('POINT', srid=4326)) | |