feat: Airwallex 发卡管理后台完整实现

- 后端: FastAPI + SQLAlchemy + SQLite, JWT认证, 代理支持的AirwallexClient
- 前端: React 18 + Vite + Ant Design 5, 中文界面
- 功能: 卡片管理, 持卡人管理, 交易记录, API令牌, 系统设置, 审计日志
- 第三方API: X-API-Key认证, 权限控制
- Docker部署: docker-compose编排前后端
This commit is contained in:
zqq61
2026-03-15 23:05:08 +08:00
commit 4f53889a8e
98 changed files with 10847 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
"""
Models for the Airwallex Issuing Digital Wallet Token API.
"""
from typing import Optional, List, Dict, Any
from datetime import datetime
from pydantic import Field
from .base import AirwallexModel
from .issuing_common import DeviceInformation, HasMoreResponse
class RiskInformation(AirwallexModel):
"""Model for token risk information."""
wallet_provider_account_score: Optional[str] = Field(None, description="Wallet provider account score")
wallet_provider_device_score: Optional[str] = Field(None, description="Wallet provider device score")
class DigitalWalletToken(AirwallexModel):
"""Model for an Airwallex digital wallet token."""
resource_name: str = "issuing/digital_wallet_tokens"
card_id: str = Field(..., description="Unique identifier for card associated with the token")
cardholder_id: str = Field(..., description="Unique identifier for cardholder associated with the token")
create_time: datetime = Field(..., description="The time this token was created")
device_information: Optional[DeviceInformation] = Field(None, description="Device information")
expiry_month: int = Field(..., description="Token expiry month")
expiry_year: int = Field(..., description="Token expiry year")
masked_card_number: str = Field(..., description="Masked card number")
pan_reference_id: str = Field(..., description="Unique identifier for the tokenization of this card")
risk_information: Optional[RiskInformation] = Field(None, description="Risk information")
token_id: str = Field(..., description="Unique Identifier for token")
token_reference_id: str = Field(..., description="Unique identifier of the digital wallet token within the card network")
token_status: str = Field(..., description="Status of the token")
token_type: str = Field(..., description="The type of this token")
class DigitalWalletTokenListResponse(HasMoreResponse):
"""Model for digital wallet token list response."""
items: List[DigitalWalletToken] = Field(..., description="List of digital wallet tokens")