-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.py
62 lines (46 loc) · 1.36 KB
/
database.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
50
51
52
53
54
55
56
57
58
59
60
61
62
import peewee
import config
db = peewee.SqliteDatabase(config.DBPATH)
class Chatlog(peewee.Model):
chat_id = peewee.IntegerField()
message_id = peewee.IntegerField()
user_id = peewee.IntegerField()
name = peewee.TextField()
timestamp = peewee.IntegerField()
text = peewee.TextField()
reply_to_message_id = peewee.IntegerField(null=True)
class Meta:
database = db
table_name = "chatlogs"
primary_key = False
class Reminders(peewee.Model):
reply_id = peewee.TextField()
user_id = peewee.TextField()
chat_id = peewee.TextField()
date_now = peewee.TextField()
date_to_remind = peewee.TextField()
message = peewee.TextField()
class Meta:
database = db
table_name = "reminders"
primary_key = False
class TensorMessage(peewee.Model):
tensor_text = peewee.TextField()
tensor_id = peewee.AutoField()
class Meta:
database = db
table_name = "tensor"
class Quote(peewee.Model):
quote_text = peewee.TextField()
quote_id = peewee.AutoField()
class Meta:
database = db
table_name = "quotes"
class Compleanni(peewee.Model):
user_id = peewee.TextField()
chat_id = peewee.TextField()
birthdate = peewee.TextField()
class Meta:
database = db
table_name = "compleanni"
primary_key = False