fix
This commit is contained in:
@@ -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):
|
||||
...
|
||||
22
python_core/database/types.py
Normal file
22
python_core/database/types.py
Normal 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
|
||||
Reference in New Issue
Block a user