feat(fase4): add GlobalVariable API routes
Add schemas and router for global variables with CRUD operations and admin-only access controls for create/update/delete. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
33
services/api-gateway/app/schemas/global_variable.py
Normal file
33
services/api-gateway/app/schemas/global_variable.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class GlobalVariableCreate(BaseModel):
|
||||
key: str
|
||||
value: Optional[str] = None
|
||||
value_type: str = "string"
|
||||
description: Optional[str] = None
|
||||
is_secret: bool = False
|
||||
|
||||
|
||||
class GlobalVariableUpdate(BaseModel):
|
||||
value: Optional[str] = None
|
||||
value_type: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
is_secret: Optional[bool] = None
|
||||
|
||||
|
||||
class GlobalVariableResponse(BaseModel):
|
||||
id: UUID
|
||||
key: str
|
||||
value: Optional[str]
|
||||
value_type: str
|
||||
description: Optional[str]
|
||||
is_secret: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user