You've already forked hotpocket
This commit is contained in:
21
services/backend/testing/hotpocket_backend_testing/dto/ui.py
Normal file
21
services/backend/testing/hotpocket_backend_testing/dto/ui.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- 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
|
||||
Reference in New Issue
Block a user