Spaces:
Sleeping
Sleeping
Download app/models/base.py from harshbhatiyaa/constructhire-back: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/spaces/harshbhatiyaa/constructhire-back/resolve/main/app/models/base.py
- Command line
-
hf download hf://spaces/harshbhatiyaa/constructhire-back/app/models/base.py
-
curl -L -o base.py https://huggingface.co/spaces/harshbhatiyaa/constructhire-back/resolve/main/app/models/base.py
546 Bytes
| import uuid | |
| from datetime import datetime | |
| from sqlalchemy import Column, DateTime | |
| from sqlalchemy.dialects.postgresql import UUID | |
| from sqlalchemy.orm import declarative_base | |
| Base = declarative_base() | |
| class BaseDBModel(Base): | |
| __abstract__ = True | |
| id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True, nullable=False) | |
| created_at = Column(DateTime, default=datetime.utcnow, nullable=False, index=True) | |
| updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False) | |