18 lines
389 B
Python
18 lines
389 B
Python
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)
|