Files
serv_benchmark/backend/app/schemas/link.py
Gilles Soulier c67befc549 addon
2026-01-05 16:08:01 +01:00

37 lines
574 B
Python
Executable File

"""
Linux BenchTools - Link Schemas
"""
from pydantic import BaseModel, HttpUrl
from typing import List
class LinkBase(BaseModel):
"""Base link schema"""
label: str
url: str
class LinkCreate(LinkBase):
"""Schema for creating a link"""
pass
class LinkUpdate(LinkBase):
"""Schema for updating a link"""
pass
class LinkResponse(LinkBase):
"""Link response"""
id: int
device_id: int
class Config:
from_attributes = True
class LinkListResponse(BaseModel):
"""List of links"""
items: List[LinkResponse] = []