14 lines
471 B
Python
14 lines
471 B
Python
from sqlalchemy import Column, String, DateTime, UUID
|
|
from sqlalchemy.orm import relationship
|
|
from uuid import uuid4
|
|
|
|
from models.base import Base
|
|
|
|
class Team(Base):
|
|
__tablename__ = "teams"
|
|
id = Column(UUID, primary_key=True, default=uuid4)
|
|
name = Column(String)
|
|
microsoft_team_id = Column(UUID)
|
|
created_at = Column(DateTime)
|
|
updated_at = Column(DateTime)
|
|
webhooks = relationship("Webhook", back_populates="team", cascade="all, delete-orphan") |