52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
30 lines
798 B
Python
30 lines
798 B
Python
"""Voice library domain entity."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from datetime import datetime, timezone
|
|
from typing import List, Optional
|
|
|
|
|
|
@dataclass
|
|
class VoiceLibraryItem:
|
|
"""配音库条目"""
|
|
|
|
id: str
|
|
user_id: str
|
|
name: str
|
|
text: str = ""
|
|
voice_provider: str = ""
|
|
voice_id: str = ""
|
|
voice_name: str = ""
|
|
audio_url: str = ""
|
|
duration: float = 0
|
|
file_size: int = 0
|
|
status: str = "completed"
|
|
project_id: Optional[str] = None
|
|
tags: List[str] = field(default_factory=list)
|
|
metadata_: dict = field(default_factory=dict)
|
|
created_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
|
|
updated_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
|