-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
43 lines (34 loc) · 1.12 KB
/
models.py
File metadata and controls
43 lines (34 loc) · 1.12 KB
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
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import (
Column,
ForeignKey,
Integer,
String,
Text,
Float,
DateTime,
Boolean
)
Base = declarative_base()
class Property(Base):
__tablename__ = 'properties'
id = Column(Integer, primary_key=True, autoincrement=True)
user_id = Column(String, nullable=False)
channel_id = Column(String, nullable=False)
value = Column(String, nullable=True)
class Admin(Base):
__tablename__ = 'admins'
id = Column(Integer, primary_key=True, autoincrement=True)
user_id = Column(String, nullable=False)
channel_id = Column(String, nullable=False)
class Phrase(Base):
__tablename__ = 'phrases'
id = Column(Integer, primary_key=True, autoincrement=True)
name = Column(String, nullable=False)
phrase = Column(String, nullable=False)
class Moderator(Base):
# for some reason moderator > admin in this bot.............
__tablename__ = 'moderators'
id = Column(Integer, primary_key=True, autoincrement=True)
user_id = Column(String, nullable=False)
username = Column(String, nullable=True)