"""Models for metadata consistency checks.""" from __future__ import annotations from dataclasses import dataclass from dataclasses import asdict from src.common.models.metadata import ParticipationMixin @dataclass class ProductParticipation(ParticipationMixin): """Product participation.""" product_id: int def dict(self): """Create dict from class instance.""" return asdict(self) def __eq__(self, other): """Check if two participations are equal.""" return self.participant_normalized_name == \ other.participant_normalized_name \ and self.participant_participated_as == \ other.participant_participated_as