# generated by datamodel-codegen:
#   filename:  order-events.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, RootModel, constr


class Money(BaseModel):
    amount: float
    currency: constr(min_length=3, max_length=3)


class OrderCreatedOrderCreatedHeaders(BaseModel):
    correlationId: str | None = None


class Order(BaseModel):
    id: str
    total: Money
    note: str | None = None
    legacyName: str | None = None


class OrderCreatedPayload(BaseModel):
    order: Order


class OrderCreatedOrderCreatedPayload(RootModel[OrderCreatedPayload]):
    root: OrderCreatedPayload
