-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
42 lines (35 loc) · 1.06 KB
/
models.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
from aiogram.dispatcher.filters.state import StatesGroup, State
from peewee import *
db = SqliteDatabase('notifications.db')
class Notification(Model):
notification_id = AutoField()
user_id = IntegerField(null=False)
task = TextField(null=False)
description = TextField(null=True)
date = DateField(null=False)
time = TimeField(null=False)
attachments = BooleanField(default=False)
is_periodic = BooleanField(default=False)
is_edited = BooleanField(default=False)
interval = IntegerField(null=True)
is_finished = BooleanField(default=False)
is_send = BooleanField(default=False)
class Meta:
database = db
class NotificationForm(StatesGroup):
task = State()
description = State()
date = State()
time = State()
attachments = State()
is_periodic = State()
interval = State()
is_finished = State()
notification_id = State()
class ChooseForm(StatesGroup):
id = State()
date = State()
time = State()
description = State()
current = State()
attachments = State()