# -*- 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