Пример #1
0
class MessageModel(db_scratchy.Document):
    content = db_scratchy.StringField()
    author = db_scratchy.ObjectIdField()
    timestamp = db_scratchy.DateTimeField(default=datetime.datetime.utcnow)
    roomId = db_scratchy.ObjectIdField()
Пример #2
0
class UserModel(db_scratchy.Document):
    pseudo = db_scratchy.StringField(unique=True, required=True)
    profileImage = db_scratchy.StringField(required=True)
    rooms = db_scratchy.ListField(db_scratchy.ObjectIdField())
Пример #3
0
class UserModel(db_scratchy.Document):
    pseudo = db_scratchy.StringField()
    profilImage = db_scratchy.StringField()
    user = db_scratchy.StringField()
    roomsId = db_scratchy.ListField(db_scratchy.ObjectIdField())
Пример #4
0
class RoomModel(db_scratchy.Document):
    description = db_scratchy.StringField(required=True)
    title = db_scratchy.StringField(required=True)
    users = db_scratchy.ListField(db_scratchy.ObjectIdField())
Пример #5
0
class RoomModel(db_scratchy.Document):
    description = db_scratchy.StringField()
    title = db_scratchy.StringField()
    user = db_scratchy.ListField(db_scratchy.ObjectIdField())