Files
ai-worker-platform/backend/app/schemas/tenant.py
T

27 lines
617 B
Python
Raw Normal View History

"""Tenant schemas."""
from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime
class TenantCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=200)
slug: str = Field(..., min_length=1, max_length=100)
description: str = ""
class TenantUpdate(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
is_active: Optional[bool] = None
class TenantResponse(BaseModel):
id: int
name: str
slug: str
description: str
is_active: bool
created_at: datetime
model_config = {"from_attributes": True}