add getting company
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from .base import Base
|
||||
from .company import CompanyModel
|
||||
from .user import UserModel
|
||||
|
||||
__all__ = (
|
||||
"Base",
|
||||
"UserModel",
|
||||
"CompanyModel",
|
||||
)
|
||||
|
17
api/infrastructure/persistence/models/company.py
Normal file
17
api/infrastructure/persistence/models/company.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
Reference in New Issue
Block a user