aboutsummaryrefslogtreecommitdiff
path: root/poker/models.py
blob: e62df178a69f49901c2ca7dbea71426e53e9abec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from pydantic import BaseModel, Field

from poker.constants import Suit, Value


class Card(BaseModel):
    """Card domain model class."""

    suit: Suit
    value: Value


class Hand(BaseModel):
    """Hand domain model class."""

    cards: list[Card] = Field(..., min_length=5, max_length=5)