feat(server): persist renderContent texture and cover it in asset lifecycle
Add an optional renderContent field to canvas nodes across the go-zero API type, domain node, SQLC models/queries, PostgreSQL schema, and mappers so a lightweight transparent-WebP display texture persists alongside the original content. Prefer renderContent for project thumbnails and main-canvas previews, and treat both content and renderContent as protected/deletable asset URLs during canvas asset cleanup. Extend round-trip coverage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -199,6 +199,7 @@ func (r *ProjectRepository) Save(ctx context.Context, project design.Project) er
|
||||
Width: node.Width,
|
||||
Height: node.Height,
|
||||
Content: node.Content,
|
||||
RenderContent: node.RenderContent,
|
||||
Tone: node.Tone,
|
||||
Status: node.Status,
|
||||
SortOrder: int32(index),
|
||||
@@ -518,6 +519,7 @@ func mapNodes(rows []sqlcdb.CanvasNode) []design.Node {
|
||||
Width: row.Width,
|
||||
Height: row.Height,
|
||||
Content: row.Content,
|
||||
RenderContent: row.RenderContent,
|
||||
Tone: row.Tone,
|
||||
Status: row.Status,
|
||||
ParentID: row.ParentID,
|
||||
|
||||
Reference in New Issue
Block a user