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

from __future__ import annotations

from datetime import datetime
from typing import Optional

from pydantic import BaseModel, Field


class User(BaseModel):
    class Config:
        validate_assignment = True

    id: int = Field(..., allow_mutation=False, description='Server-generated ID')
    name: str
    password: str = Field(..., description='User password')
    created_at: Optional[datetime] = Field(None, allow_mutation=False)
