satupeta-main/app/schemas/mapset_history_schema.py

25 lines
572 B
Python
Raw Normal View History

2026-01-27 02:11:58 +00:00
from datetime import datetime
from typing import Optional
from pydantic import Field
from app.core.data_types import UUID7Field
from app.schemas.user_schema import UserSchema
from .base import BaseSchema
class MapsetHistorySchema(BaseSchema):
id: UUID7Field
mapset_id: UUID7Field
validation_type: str
notes: Optional[str]
timestamp: datetime
user_info: UserSchema = Field(alias="user")
class MapsetHistoryCreateSchema(BaseSchema):
mapset_id: UUID7Field
validation_type: str = Field(..., min_length=1)
notes: Optional[str] = None