22 lines
419 B
Python
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}"
|