Commit 94f81e99 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add basic Card type

No person association yet
parent 4411d0de
Loading
Loading
Loading
Loading

poolpay/model/Card.py

0 → 100644
+17 −0
Original line number Diff line number Diff line
from sqlalchemy.orm import Mapped, mapped_column

from poolpay.model.Retrievable import Retrievable


class Card(Retrievable):
    """
    A card, most likely a pool card. It has an id (which is read from the card), and belongs to a person.
    """

    __tablename__ = "card"

    id: Mapped[int] = mapped_column(primary_key=True)

    @property
    def primary_key(self) -> int:
        return self.id