enums.py
677 Bytes
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
class Table:
id = "id"
path = "path"
serv = "serv"
dest = "dest"
type = "type"
state = "state"
@staticmethod
def validate(column):
return hasattr(Table, column)
class States:
queued = "queued"
delivered = "delivered"
preprocess = "preprocess"
@staticmethod
def validate(state):
return hasattr(States, state)
class Services:
wpp1 = "wpp1"
mail = "mail"
@staticmethod
def validate(serv):
return hasattr(Services, serv)
class Datatypes:
text = "text"
image = "image"
document = "document"
link = "link"
audio = "audio"
html = "html"
@staticmethod
def validate(datatype):
return hasattr(Datatypes, datatype)