This commit is contained in:
root
2025-07-12 17:21:49 +08:00
parent 330d3a261e
commit 1afe9026d6
3 changed files with 36 additions and 117 deletions

View File

@@ -1,9 +1,22 @@
# 模板表
from python_core.kv import kv
from .db import Db
from .types import TemplateInfo
class TemplateDb(Db):
def __init__(self):
self.key = "template"
pass
pass
def list(self)->list[TemplateInfo]:
...
def get(self, id: str)->TemplateInfo:
...
def create(self, info: TemplateInfo):
...
def remove(self, id: str):
...

View File

@@ -0,0 +1,22 @@
from dataclasses import dataclass
from typing import Dict, List, Any
@dataclass
class TemplateInfo:
id: str
name: str
description: str
thumbnail_path: str
draft_content_path: str
resources_path: str
created_at: str
updated_at: str
canvas_config: Dict[str, Any]
duration: int
material_count: int
track_count: int
tags: List[str]
# local/cloud
type: str
# 创建用户
user_id: str