23 lines
726 B
Python
23 lines
726 B
Python
from pydantic import BaseModel, Field
|
|
from typing import Optional
|
|
from datetime import datetime
|
|
from uuid import UUID
|
|
|
|
class FrameworkBase(BaseModel):
|
|
name: str = Field(..., description="Name of the framework")
|
|
language: str = Field(..., description="Programming language associated with the framework")
|
|
|
|
class FrameworkCreate(FrameworkBase):
|
|
pass
|
|
|
|
class FrameworkUpdate(FrameworkBase):
|
|
name: Optional[str] = Field(None, description="Name of the framework")
|
|
language: Optional[str] = Field(None, description="Programming language associated with the framework")
|
|
|
|
class FrameworkSchema(FrameworkBase):
|
|
id: UUID
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
class Config:
|
|
orm_mode = True |