enums.py
674 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
class Table:
id = "id"
file = "file"
serv = "serv"
dest = "dest"
type = "type"
state = "state"
class States:
queued = "queued"
delivered = "delivered"
class Services:
wpp1 = "wpp1"
@staticmethod
def validate(serv):
if serv == Services.wpp1:
return True
return False
class Datatypes:
text = "text"
image = "image"
document = "document"
link = "link"
@staticmethod
def validate(datatype):
if datatype == Datatypes.text:
return True
if datatype == Datatypes.image:
return True
if datatype == Datatypes.document:
return True
if datatype == Datatypes.link:
return True
return False