first commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
LinkType = Literal["extend", "traffic"]
|
||||
|
||||
|
||||
class GuestLinkCreate(BaseModel):
|
||||
link_type: LinkType
|
||||
title: str = Field(default="", max_length=120)
|
||||
value: int = Field(ge=1, le=100000)
|
||||
max_uses: int = Field(default=1, ge=1, le=100000)
|
||||
expires_at: str | None = None
|
||||
note: str = Field(default="", max_length=500)
|
||||
|
||||
|
||||
class GuestClaimRequest(BaseModel):
|
||||
identifier: str = Field(min_length=1, max_length=128)
|
||||
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
Reference in New Issue
Block a user