core/validations/inbox.py

31 lines
533 B
Python
Raw Normal View History

2023-10-30 21:00:55 +00:00
from typing import List, Optional, Text
2022-12-13 00:44:35 +00:00
from pydantic import BaseModel
class Message(BaseModel):
id: int
body: Text
author: int
chatId: Text
createdAt: int
updatedAt: Optional[int]
replyTo: Optional[int]
class Member(BaseModel):
id: int
name: Text
pic: Optional[Text]
# TODO: extend chat member model
class Chat(BaseModel):
2023-10-30 21:00:55 +00:00
id: int
2022-12-13 00:44:35 +00:00
createdAt: int
createdBy: int
users: List[int]
updatedAt: Optional[int]
title: Optional[Text]
description: Optional[Text]