chat_back/app/users/chat/models.py

15 lines
312 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from sqlalchemy import Column, Integer, JSON
from app.database import Base
class Chats(Base):
__tablename__ = "chats"
id = Column(Integer, primary_key=True)
chat = Column(JSON)
allowed_users = Column(JSON)
def __str__(self):
return f"Чат #{self.id} с {self.allowed_users}."