first commit

This commit is contained in:
orohi
2026-07-25 00:37:09 +03:00
commit 3ca7f9f7cc
35 changed files with 2478 additions and 0 deletions
+26
View File
@@ -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