Files
kwork/app/models.py
2026-07-14 13:38:43 +07:00

22 lines
419 B
Python

from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class Offer:
source: str
external_id: str
title: str
description: str
price: str
price_amount: int | None
url: str
category_id: int
published_at: str
seller_username: str | None = None
@property
def dedup_key(self) -> str:
return f"{self.source}:{self.external_id}"