hotpocket/services/backend/testing/hotpocket_backend_testing/dto/ui.py
Tomek Wójcik b4338e2769
Some checks failed
CI / Checks (push) Failing after 13m2s
Release v1.0.0
2025-08-20 21:00:50 +02:00

22 lines
482 B
Python

# -*- coding: utf-8 -*-
from __future__ import annotations
import datetime
import pydantic
class PocketImportSaveSpec(pydantic.BaseModel):
title: str | None
url: str
time_added: datetime.datetime
tags: str = pydantic.Field(default='')
status: str = pydantic.Field(default='unread')
def dict(self, *args, **kwargs):
result = super().dict(*args, **kwargs)
result['time_added'] = int(self.time_added.strftime('%s'))
return result