aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-backend/src/dto/vouchers.py
blob: 81dfe02f739761f98cba1fa5a41eecf4dfdba749 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from datetime import datetime
from decimal import Decimal
from uuid import UUID

from pydantic import BaseModel


class VoucherCreate(BaseModel):
    """The data required to create a new Voucher."""

    voucher_code: str
    balance: Decimal


class Voucher(VoucherCreate):
    """A voucher as stored in the database."""

    id: UUID
    created_at: datetime
    updated_at: datetime
    active: bool