-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtables.py
49 lines (47 loc) · 922 Bytes
/
tables.py
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
47
48
49
from core.library import models, uuid, time
class PromptsModel(models.Model):
''' Contains records of prompts created by users, their status and response '''
uuid = models.CharField(
unique=True,
default=uuid,
null=False,
blank=False,
max_length=36,
primary_key=True
)
user = models.CharField(
null=False,
blank=False,
max_length=36
)
prompt = models.TextField(
null=False,
blank=False
)
potential_cta = models.TextField(
null=False,
blank=False
)
response = models.TextField(
null=True,
blank=True
)
status = models.CharField(
null=False,
blank=False,
default="queued",
max_length=16
)
created = models.DateTimeField(
null=False,
blank=False,
default=time.now
)
finished = models.DateTimeField(
null=True,
blank=True
)
processor = models.CharField(
default="",
max_length=64
)