Files
xiaoxia 295d7f0765
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 52s
CI/CD Pipeline / Unit Tests (push) Successful in 1m31s
CI/CD Pipeline / Frontend Lint (push) Successful in 1m41s
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
feat: 素材智能视图筛选 + 标题使用次数闭环 (#282)
2026-07-14 09:53:07 +08:00

45 lines
967 B
Python
Executable File

"""Title library commands."""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class CreateTitleLibraryCommand:
user_id: str
name: str
text: str
category: str = "default"
description: str = ""
tags: List[str] = field(default_factory=list)
metadata_: dict = field(default_factory=dict)
@dataclass
class UpdateTitleLibraryCommand:
title_id: str
user_id: str
name: Optional[str] = None
text: Optional[str] = None
category: Optional[str] = None
description: Optional[str] = None
tags: Optional[List[str]] = None
is_active: Optional[bool] = None
metadata_: Optional[dict] = None
@dataclass
class IncrementTitleUsageCommand:
title_id: str
user_id: str
increment: int = 1
@dataclass
class PickTitleCommand:
user_id: str
category: Optional[str] = None
exclude_ids: List[str] = field(default_factory=list)