# generated by datamodel-codegen:
#   filename:  read_only_write_only_nested_allof.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from typing import Optional

from pydantic import AwareDatetime, BaseModel


class BaseTimestamps(BaseModel):
    created_at: Optional[AwareDatetime] = None


class ExtendedTimestamps(BaseTimestamps):
    updated_at: Optional[AwareDatetime] = None


class UserRequest(BaseModel):
    name: str
    password: Optional[str] = None


class UserResponse(BaseModel):
    created_at: Optional[AwareDatetime] = None
    updated_at: Optional[AwareDatetime] = None
    name: str


class User(ExtendedTimestamps):
    name: str
    password: Optional[str] = None
