Добавил БД
This commit is contained in:
1
classes/__init__.py
Normal file
1
classes/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .classes import Activity, Tag
|
||||
32
classes/classes.py
Normal file
32
classes/classes.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from enums import ClockifyProjects, VetroProjects
|
||||
|
||||
|
||||
@dataclass
|
||||
class Activity:
|
||||
id: str
|
||||
vetro_project_id: VetroProjects
|
||||
vetro_project_title: str
|
||||
task_id: int
|
||||
task_title: str
|
||||
tag_id: str
|
||||
description: str
|
||||
project_id: ClockifyProjects
|
||||
time_spent: float
|
||||
date_start: datetime
|
||||
date_end: datetime = None
|
||||
is_tracked: bool = False
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.date_start + timedelta(hours=3)}|{self.vetro_project_title}|{self.description} для задачи "{self.task_title}"'
|
||||
|
||||
|
||||
@dataclass
|
||||
class Tag:
|
||||
id: str
|
||||
title: str
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
Reference in New Issue
Block a user