service_man/api/infrastructure/persistence/models/company.py

18 lines
389 B
Python
Raw Normal View History

2024-04-10 00:33:31 +03:00
import uuid
from sqlalchemy import UUID
from sqlalchemy.orm import Mapped, mapped_column
from api.infrastructure.persistence.models.base import Base
class CompanyModel(Base):
__tablename__ = "companies"
id: Mapped[uuid.UUID] = mapped_column(
UUID(as_uuid=True),
primary_key=True,
)
name: Mapped[str]
email: Mapped[str] = mapped_column(unique=True)