@anonymous/

PowderblueInsidiousCubase

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.3829023021211344","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"CiMgbW9kZWxzL3BhcnRpY2lwYW50LnB5CmZyb20gbWVzc2FnZSBpbXBvcnQgTWVzc2FnZQpmcm9tIG1lc3NhZ2VfcmVmZXJlbmNlIGltcG9ydCBNZXNzYWdlX1JlZmVyZW5jZQoKY2xhc3MgUGFydGljaXBhbnQoQmFzZSk6CiAgICBfX3RhYmxlbmFtZV9fID0gJ3BhcnRpY2lwYW50JwoKICAgIHV1aWQgPSBDb2x1bW4oVVVJRCwgcHJpbWFyeV9rZXk9VHJ1ZSwgZGVmYXVsdD11dWlkLnV1aWQ0KQogICAgY29uZmVyZW5jZSA9IENvbHVtbihVVUlELCBGb3JlaWduS2V5KCdjb25mZXJlbmNlLnV1aWQnKSwgbnVsbGFibGU9RmFsc2UpCiAgICB1c2VyID0gQ29sdW1uKFVVSUQsIEZvcmVpZ25LZXkoJ3VzZXIudXVpZCcpLCBudWxsYWJsZT1GYWxzZSkKCiAgICBkZWYgbWVzc2FnZXMoc2VsZik6CiAgICAgICAgcmV0dXJuIHNlc3Npb24ucXVlcnkoTWVzc2FnZSkuam9pbihNZXNzYWdlX1JlZmVyZW5jZSkuZmlsdGVyKAogICAgICAgICAgICBNZXNzYWdlX1JlZmVyZW5jZS51c2VyID09IHNlbGYudXNlcikuYWxsKCkKCgojIG1vZGVscy9tZXNzYWdlLnB5CmNsYXNzIE1lc3NhZ2UoQ29uY3JldGVCYXNlLCBCYXNlKToKICAgIF9fdGFibGVuYW1lX18gPSAnbWVzc2FnZScKCiAgICB1dWlkID0gQ29sdW1uKFVVSUQsIHByaW1hcnlfa2V5ID0gVHJ1ZSwgZGVmYXVsdCA9IHV1aWQudXVpZDQpCiAgICBhdXRob3IgPSBDb2x1bW4oVVVJRCwgbnVsbGFibGUgPSB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="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# models/participant.py
from message import Message
from message_reference import Message_Reference

class Participant(Base):
    __tablename__ = 'participant'

    uuid = Column(UUID, primary_key=True, default=uuid.uuid4)
    conference = Column(UUID, ForeignKey('conference.uuid'), nullable=False)
    user = Column(UUID, ForeignKey('user.uuid'), nullable=False)

    def messages(self):
        return session.query(Message).join(Message_Reference).filter(
            Message_Reference.user == self.user).all()


# models/message.py
class Message(ConcreteBase, Base):
    __tablename__ = 'message'

    uuid = Column(UUID, primary_key = True, default = uuid.uuid4)
    author = Column(UUID, nullable = False)
    readed = Column(BOOLEAN, nullable = False, default = False)
    date =  Column(TIMESTAMP(timezone = True), nullable = False, default = datetime.datetime.utcnow)

    __mapper_args__ = {
        'polymorphic_identity': 'message',
        'concrete': True
    }

class Text_Message(Message):
    __tablename__ = 'text_message'

    uuid = Column(UUID, primary_key = True, default = uuid.uuid4)
    author = Column(UUID, nullable = False)
    readed = Column(BOOLEAN, nullable = False, default = False)
    date =  Column(TIMESTAMP(timezone = True), nullable = False, default = datetime.datetime.utcnow)
    content = Column(TEXT, nullable = False)
    edited = Column(BOOLEAN, nullable = False, default = False)

    __mapper_args__ = {
        'polymorphic_identity': 'text_message',
        'concrete': True
    }