feat: initialize aivideo project

This commit is contained in:
2026-04-17 18:33:05 +08:00
commit 14b18d67fe
162 changed files with 26251 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from datetime import datetime
from random import choices
from string import ascii_uppercase, digits
from uuid import uuid4
def new_public_id(prefix: str) -> str:
return f"{prefix}_{uuid4().hex[:16]}"
def new_order_no(prefix: str) -> str:
return f"{prefix}_{datetime.now():%Y%m%d%H%M%S}{uuid4().hex[:6]}"
def new_invite_code(length: int = 6) -> str:
return "".join(choices(ascii_uppercase + digits, k=length))

View File

@@ -0,0 +1,7 @@
from pydantic import BaseModel, Field
class PaginationQuery(BaseModel):
page: int = Field(default=1, ge=1)
page_size: int = Field(default=10, ge=1, le=100)