mirror of
https://github.com/Rarebuffalo/securelens-backend.git
synced 2026-06-19 07:00:30 +00:00
updated the architecture
This commit is contained in:
17
app/schemas/apikey.py
Normal file
17
app/schemas/apikey.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ApiKeyCreate(BaseModel):
|
||||
name: str
|
||||
|
||||
|
||||
class ApiKeyResponse(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
key_prefix: str
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class ApiKeyCreateResponse(ApiKeyResponse):
|
||||
key: str # The raw API key returned only once upon creation
|
||||
Reference in New Issue
Block a user