diff --git a/app/blueprints/api/tasks/templates/tasks_cards.j2 b/app/blueprints/api/tasks/templates/tasks_cards.j2
index d102e0e..6335a33 100644
--- a/app/blueprints/api/tasks/templates/tasks_cards.j2
+++ b/app/blueprints/api/tasks/templates/tasks_cards.j2
@@ -4,6 +4,7 @@
{{ task.name }}
+ - Дата и время: {{ task.datetime }}
- Статус: {{ task.status }}
- Сообщение: {{ task.status_message }}
- Действие: {{ task.type }}
diff --git a/app/models/task.py b/app/models/task.py
index 22676d3..ca4c755 100644
--- a/app/models/task.py
+++ b/app/models/task.py
@@ -1,4 +1,6 @@
-from sqlalchemy import Integer
+import datetime
+
+from sqlalchemy import Integer, DateTime
from sqlalchemy.schema import Column, ForeignKey
from sqlalchemy.orm import Mapped, mapped_column, relationship
from app.extensions import db
@@ -11,6 +13,7 @@ class Task(db.Model):
session_id = Column(Integer, ForeignKey("session.id"))
session: Mapped['Session'] = relationship("Session", back_populates="tasks")
+ datetime: Mapped[DateTime] = Column(DateTime, default=datetime.datetime.utcnow().strftime("%d.%m.%y %H:%M"))
status: Mapped[str]
status_message: Mapped[str]
type: Mapped[str]
diff --git a/migrations/versions/cdd471f48b0d_added_datetime_to_task.py b/migrations/versions/cdd471f48b0d_added_datetime_to_task.py
new file mode 100644
index 0000000..94499de
--- /dev/null
+++ b/migrations/versions/cdd471f48b0d_added_datetime_to_task.py
@@ -0,0 +1,32 @@
+"""Added datetime to task
+
+Revision ID: cdd471f48b0d
+Revises: af22ea98e0da
+Create Date: 2024-02-03 11:36:03.826063
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = 'cdd471f48b0d'
+down_revision = 'af22ea98e0da'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('task', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('datetime', sa.DateTime(), nullable=True))
+
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('task', schema=None) as batch_op:
+ batch_op.drop_column('datetime')
+
+ # ### end Alembic commands ###