feat(presets): admin preset stories (premade example videos) end-to-end
Build backend images / build content-svc (push) Failing after 31s
Build backend images / build file-svc (push) Failing after 31s
Build backend images / build gateway (push) Failing after 31s
Build backend images / build identity-svc (push) Failing after 30s
Build backend images / build notification-svc (push) Failing after 30s
Build backend images / build render-svc (push) Failing after 31s
Build backend images / build studio-svc (push) Failing after 31s
Build backend images / build content-svc (push) Failing after 31s
Build backend images / build file-svc (push) Failing after 31s
Build backend images / build gateway (push) Failing after 31s
Build backend images / build identity-svc (push) Failing after 30s
Build backend images / build notification-svc (push) Failing after 30s
Build backend images / build render-svc (push) Failing after 31s
Build backend images / build studio-svc (push) Failing after 31s
Epic A — admins author premade example videos per template; users pick one on the template detail page to start a pre-filled project. Backend (content-svc): - PresetStory DTOs + PresetStoryService (admin CRUD + public published-only filter via role check + soft-delete) + PresetStoriesController (/v1/preset-stories) - DI registration; gateway route /v1/preset-stories (optionalAuth, public read) Frontend: - ProjectPresetStories admin authoring UI (name/description/demo upload/published/ sort + scene picker with order+duration + advanced scenes_spa); «ویدیوهای نمونه» button + modal in ProjectsAdmin - TemplateDetailExamples renders real published stories (image/video preview, hover → "use this example" → creates a pre-bound project), falls back to placeholders when none; selected aspect's variant id keys the fetch - public /api/preset-stories route; preset_story_id plumbed through createProjectFromTemplate + projects POST route; usePreset i18n (fa+en) Verified: full CRUD via gateway (public hides unpublished); creating a project with presetStoryId persists selected_preset_story_id on the saved project. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
namespace FlatRender.ContentSvc.Models;
|
||||
|
||||
// ── Preset stories (admin-authored premade example videos per template) ───────
|
||||
// A preset story is a ready-made, pre-filled version of a template that a user can
|
||||
// pick to start a project already populated with text + media. The filled values
|
||||
// live in ScenesSpa (the studio scene JSON); PresetScene rows order the scenes.
|
||||
|
||||
public record PresetSceneInput(Guid SceneId, int Sort, decimal? DefaultDurationSec);
|
||||
|
||||
public record PresetSceneResponse(
|
||||
Guid Id, Guid SceneId, string? SceneKey, string? SceneTitle, int Sort, decimal? DefaultDurationSec
|
||||
);
|
||||
|
||||
// Light projection for list endpoints (omits the heavy ScenesSpa blob).
|
||||
public record PresetStorySummary(
|
||||
Guid Id, Guid ProjectId, string Name, string? Description, string? Demo,
|
||||
Guid? MusicId, int Sort, bool IsPublished, int SceneCount,
|
||||
DateTime CreatedAt, DateTime UpdatedAt
|
||||
);
|
||||
|
||||
// Full story incl. scenes + the filled-values blob (GET one).
|
||||
public record PresetStoryResponse(
|
||||
Guid Id, Guid ProjectId, string Name, string? Description, string? Demo,
|
||||
Guid? MusicId, string? ScenesSpa, int Sort, bool IsPublished,
|
||||
DateTime CreatedAt, DateTime UpdatedAt, List<PresetSceneResponse> Scenes
|
||||
);
|
||||
|
||||
public record SavePresetStoryRequest(
|
||||
Guid ProjectId, string Name, string? Description = null, string? Demo = null,
|
||||
Guid? MusicId = null, string? ScenesSpa = null, int Sort = 0, bool IsPublished = true,
|
||||
List<PresetSceneInput>? Scenes = null
|
||||
);
|
||||
Reference in New Issue
Block a user