feat: V2 microservices stack — backend services, gateway, JWT auth

Add full V2 architecture: identity, content, studio (.NET 10) and file,
render, notification, gateway (Go) services with vendored deps, plus DB
migrations, event/API contracts, and an init-db script.

Wire the Next.js frontend to the gateway: server-side JWT auth routes
(login/register/refresh/logout/me), gateway fetch helper, and session/
cookie/jwt helpers under src/lib.

Containerize the stack via docker-compose.v2.yml and per-service
Dockerfiles. Base images resolve through a Nexus mirror (Docker Hub) and
MCR directly; npm/NuGet pull from Nexus groups. Self-host fonts via
next/font/local to avoid Google Fonts (geo-blocked).

Add CI workflow and ignore .env.v2, *.stackdump, and .NET bin/obj.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-29 23:29:31 +03:30
parent 53ea78a00d
commit 90ac0b81d1
7636 changed files with 3707504 additions and 240 deletions
@@ -0,0 +1,142 @@
namespace FlatRender.ContentSvc.Domain.Entities;
public class SceneCharacter
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public string Key { get; set; } = default!;
public string Name { get; set; } = default!;
public string? Icon { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<SceneCharacterController> Controllers { get; set; } = [];
}
public class SceneCharacterController
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneCharacterId { get; set; }
public SceneCharacter Character { get; set; } = default!;
public string Name { get; set; } = default!;
public string Key { get; set; } = default!;
public string? DefaultValue { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<SceneControllerOption> Options { get; set; } = [];
}
public class SceneControllerOption
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ControllerId { get; set; }
public SceneCharacterController Controller { get; set; } = default!;
public string Name { get; set; } = default!;
public string? Icon { get; set; }
public string Value { get; set; } = default!;
public int Sort { get; set; }
}
public class ProjectCharacterController
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string Name { get; set; } = default!;
public string Key { get; set; } = default!;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<ProjectCharacterControllerOption> Options { get; set; } = [];
}
public class ProjectCharacterControllerOption
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ControllerId { get; set; }
public ProjectCharacterController Controller { get; set; } = default!;
public string Name { get; set; } = default!;
public string? Icon { get; set; }
public string Value { get; set; } = default!;
public int Sort { get; set; }
}
public class ProjectCharacterPreset
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public Guid Key { get; set; } = Guid.NewGuid();
public string Name { get; set; } = default!;
public string? Icon { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<PresetCharacterController> PresetControllers { get; set; } = [];
}
public class PresetCharacterController
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid CharacterPresetId { get; set; }
public ProjectCharacterPreset Preset { get; set; } = default!;
public string Name { get; set; } = default!;
public string Key { get; set; } = default!;
public string Value { get; set; } = default!;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
public class PresetStory
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string Name { get; set; } = default!;
public string? Description { get; set; }
public string? Demo { get; set; }
public Guid? MusicId { get; set; }
public MusicTrack? Music { get; set; }
public string? ScenesSpa { get; set; }
public int Sort { get; set; }
public bool IsPublished { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<PresetScene> Scenes { get; set; } = [];
}
public class PresetScene
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid PresetStoryId { get; set; }
public PresetStory Story { get; set; } = default!;
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public int Sort { get; set; }
public decimal? DefaultDurationSec { get; set; }
}
@@ -0,0 +1,205 @@
using FlatRender.ContentSvc.Domain.Enums;
namespace FlatRender.ContentSvc.Domain.Entities;
public class Blog
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public BlogKind Kind { get; set; } = BlogKind.Blog;
public string Slug { get; set; } = default!;
public string Title { get; set; } = default!;
public string? ShortDescription { get; set; }
public string Content { get; set; } = default!;
public string? MetaTitle { get; set; }
public string? MetaDescription { get; set; }
public string? MetaKeywords { get; set; }
public bool IncludeInSiteMap { get; set; } = true;
public string? Image { get; set; }
public string? Cover { get; set; }
public Guid? AuthorUserId { get; set; }
public string? AuthorDisplayName { get; set; }
public bool IsPublished { get; set; }
public DateTime? PublishDate { get; set; }
public long ViewCount { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<Comment> Comments { get; set; } = [];
}
public class Comment
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public Guid UserId { get; set; }
public Guid? BlogId { get; set; }
public Blog? Blog { get; set; }
public Guid? ContainerId { get; set; }
public ProjectContainer? Container { get; set; }
public Guid? ParentCommentId { get; set; }
public Comment? ParentComment { get; set; }
public string Content { get; set; } = default!;
public decimal? Rate { get; set; }
public bool IsApproved { get; set; }
public bool IsPinned { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<Comment> Replies { get; set; } = [];
}
public class HomePageEvent
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string? Title { get; set; }
public string? Subtitle { get; set; }
public string? Description { get; set; }
public string? Badge { get; set; }
public string? BadgeClass { get; set; }
public string? ButtonText { get; set; }
public string? ButtonUrl { get; set; }
public string? ButtonClass { get; set; }
public string? Color { get; set; }
public string? BackgroundColor { get; set; }
public string? TextColor { get; set; }
public string? Image { get; set; }
public bool IsActive { get; set; } = true;
public int Sort { get; set; }
public DateTime? StartsAt { get; set; }
public DateTime? EndsAt { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class NewSlide
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string? Keyword { get; set; }
public string? Title { get; set; }
public string? Image { get; set; }
public string? Parameter { get; set; }
public SlideType SlideType { get; set; } = SlideType.Hero;
public DateTime? ExpireDate { get; set; }
public int Sort { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class InternalRoute
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string? Name { get; set; }
public string? Image { get; set; }
public string Slug { get; set; } = default!;
public int Priority { get; set; } = 5;
public DateTime? LastDate { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class CustomRoute
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string Target { get; set; } = default!;
public string Destination { get; set; } = default!;
public int RedirectCode { get; set; } = 301;
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class WebsiteSetting
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string Key { get; set; } = default!;
public string Value { get; set; } = "{}";
public string? Description { get; set; }
public bool IsSecret { get; set; }
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class LearnArticle
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string Title { get; set; } = default!;
public string? Body { get; set; }
public string? DemoUrl { get; set; }
public string? Mode { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class Training
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string Title { get; set; } = default!;
public string? Description { get; set; }
public string? VideoUrl { get; set; }
public string? ThumbnailUrl { get; set; }
public int Sort { get; set; }
public bool IsPublished { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class FavoriteFolder
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid UserId { get; set; }
public Guid TenantId { get; set; }
public string Name { get; set; } = default!;
public string? Description { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<FavoriteContainer> Containers { get; set; } = [];
}
public class FavoriteContainer
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid UserId { get; set; }
public Guid TenantId { get; set; }
public Guid ContainerId { get; set; }
public ProjectContainer Container { get; set; } = default!;
public Guid? FolderId { get; set; }
public FavoriteFolder? Folder { get; set; }
public string? Note { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
@@ -0,0 +1,297 @@
using FlatRender.ContentSvc.Domain.Enums;
namespace FlatRender.ContentSvc.Domain.Entities;
public class Scene
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string Key { get; set; } = default!;
public string Title { get; set; } = default!;
public string? LocalizedTitle { get; set; }
public SceneKind SceneType { get; set; } = SceneKind.Normal;
public string? Image { get; set; }
public string? Demo { get; set; }
public string? SceneColorSvg { get; set; }
public string? SnapshotUrl { get; set; }
public bool GenerateKf { get; set; }
public decimal? DefaultDurationSec { get; set; }
public decimal? MinDurationSec { get; set; }
public decimal? MaxDurationSec { get; set; }
public decimal OverlapAtEndSec { get; set; }
public bool CanHandleDuration { get; set; } = true;
public bool ManualColorSelection { get; set; }
public int Sort { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<RepeaterItem> RepeaterItems { get; set; } = [];
public ICollection<SceneContentElement> ContentElements { get; set; } = [];
public ICollection<SceneColorElement> ColorElements { get; set; } = [];
public ICollection<SceneColorPreset> ColorPresets { get; set; } = [];
public ICollection<SceneCharacter> Characters { get; set; } = [];
public ICollection<SceneCategory> SceneCategories { get; set; } = [];
}
public class RepeaterItem
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public string Title { get; set; } = default!;
public string RepeatBoxKey { get; set; } = default!;
public string RepeatItemKey { get; set; } = default!;
public int MaxRepeatCount { get; set; } = 10;
public bool UserCanChangeSort { get; set; } = true;
public RepeatSortStrategy RepeatSortStrategy { get; set; } = RepeatSortStrategy.Manual;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<SceneContentElement> ContentElements { get; set; } = [];
}
public class SceneContentElement
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public Guid? RepeaterItemId { get; set; }
public string Key { get; set; } = default!;
public string Title { get; set; } = default!;
public string? LocalizedTitle { get; set; }
public string? Hint { get; set; }
public ContentElementType Type { get; set; }
public string? DefaultValue { get; set; }
// Text
public Guid? FontId { get; set; }
public string? FontFace { get; set; }
public string? FontFaceName { get; set; }
public int? FontSize { get; set; }
public int? DefaultFontSize { get; set; }
public string? DefaultFontFace { get; set; }
public bool IsFontChangeable { get; set; } = true;
public bool IsFontSizeChangeable { get; set; } = true;
public JustifyKind Justify { get; set; } = JustifyKind.CENTER_JUSTIFY;
public bool CanJustify { get; set; } = true;
public int PositionInContainer { get; set; }
public bool IsTextBox { get; set; }
public int? MaxSize { get; set; }
public string? DirectionLayerKey { get; set; }
public int DirectionLayerValue { get; set; }
// Media
public bool VideoSupport { get; set; }
public decimal? MinDurationSec { get; set; }
public decimal? MaxDurationSec { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public string? Thumbnail { get; set; }
// Misc
public string? MappedList { get; set; }
public string? CounterMode { get; set; }
public AiInputType AiInputType { get; set; } = AiInputType.None;
public bool IsHidden { get; set; }
public bool IsFocused { get; set; }
public string? OpacityControllerKey { get; set; }
// Legacy design pattern variants
public string? Dp1Image { get; set; }
public string? Dp1Title { get; set; }
public string? Dp2Image { get; set; }
public string? Dp2Title { get; set; }
public string? Dp3Image { get; set; }
public string? Dp3Title { get; set; }
public string? Dp4Image { get; set; }
public string? Dp4Title { get; set; }
public int VirtualCount { get; set; } = 1;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class SceneColorElement
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public string ElementKey { get; set; } = default!;
public string Title { get; set; } = default!;
public string? Icon { get; set; }
public AttrValueKind AttrValue { get; set; } = AttrValueKind.fill;
public string DefaultColor { get; set; } = default!;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class SceneColorPreset
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SceneId { get; set; }
public string? Name { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public ICollection<SceneColorPresetItem> Items { get; set; } = [];
}
public class SceneColorPresetItem
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid PresetId { get; set; }
public SceneColorPreset Preset { get; set; } = default!;
public string ElementKey { get; set; } = default!;
public string Value { get; set; } = default!;
public int Sort { get; set; }
}
public class SharedColor
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string ElementKey { get; set; } = default!;
public string Title { get; set; } = default!;
public string? Icon { get; set; }
public AttrValueKind AttrValue { get; set; } = AttrValueKind.fill;
public string DefaultColor { get; set; } = default!;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class SharedLayer
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string Key { get; set; } = default!;
public string Title { get; set; } = default!;
public string? LocalizedTitle { get; set; }
public string? Hint { get; set; }
public ContentElementType Type { get; set; }
public string? DefaultValue { get; set; }
public Guid? FontId { get; set; }
public string? FontFace { get; set; }
public string? FontFaceName { get; set; }
public int? FontSize { get; set; }
public int? DefaultFontSize { get; set; }
public string? DefaultFontFace { get; set; }
public bool IsFontChangeable { get; set; } = true;
public bool IsFontSizeChangeable { get; set; } = true;
public JustifyKind Justify { get; set; } = JustifyKind.CENTER_JUSTIFY;
public bool CanJustify { get; set; } = true;
public int PositionInContainer { get; set; }
public bool IsTextBox { get; set; }
public int? MaxSize { get; set; }
public string? DirectionLayerKey { get; set; }
public int DirectionLayerValue { get; set; }
public bool VideoSupport { get; set; }
public decimal? MinDurationSec { get; set; }
public decimal? MaxDurationSec { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public string? Thumbnail { get; set; }
public string? MappedList { get; set; }
public string? CounterMode { get; set; }
public AiInputType AiInputType { get; set; } = AiInputType.None;
public bool IsHidden { get; set; }
public bool IsFocused { get; set; }
// Legacy design pattern variants
public string? Dp1Image { get; set; }
public string? Dp1Title { get; set; }
public string? Dp2Image { get; set; }
public string? Dp2Title { get; set; }
public string? Dp3Image { get; set; }
public string? Dp3Title { get; set; }
public string? Dp4Image { get; set; }
public string? Dp4Title { get; set; }
public int VirtualCount { get; set; } = 1;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class SceneCategory
{
public Guid SceneId { get; set; }
public Scene Scene { get; set; } = default!;
public Guid CategoryId { get; set; }
public Category Category { get; set; } = default!;
}
public class SharedColorPreset
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ProjectId { get; set; }
public Project Project { get; set; } = default!;
public string? Name { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public ICollection<SharedColorPresetItem> Items { get; set; } = [];
}
public class SharedColorPresetItem
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid PresetId { get; set; }
public SharedColorPreset Preset { get; set; } = default!;
public string ElementKey { get; set; } = default!;
public string Value { get; set; } = default!;
public int Sort { get; set; }
}
public class TemplateSvgPreview
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? ProjectId { get; set; }
public Guid? SceneId { get; set; }
public string? SourceImageUrl { get; set; }
public string SvgUrl { get; set; } = default!;
public string? ThumbnailUrl { get; set; }
public string ColorZones { get; set; } = "[]";
public int? Width { get; set; }
public int? Height { get; set; }
public string? GenerationMethod { get; set; }
public bool GeneratedByAi { get; set; }
public decimal? QualityScore { get; set; }
public Guid? CreatedByUserId { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
@@ -0,0 +1,111 @@
namespace FlatRender.ContentSvc.Domain.Entities;
public class Category
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? ParentId { get; set; }
public Category? Parent { get; set; }
public string Name { get; set; } = default!;
public string Slug { get; set; } = default!;
public string? Description { get; set; }
public string? ImageUrl { get; set; }
public string? Icon { get; set; }
public string? MetaTitle { get; set; }
public string? MetaDescription { get; set; }
public string? MetaKeywords { get; set; }
public bool BotFollow { get; set; } = true;
public int Sort { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<Category> Children { get; set; } = [];
}
public class Tag
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = default!;
public string? LatinName { get; set; }
public string Slug { get; set; } = default!;
public string? AppliesToMode { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
}
public class Font
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = default!;
public string? OriginalName { get; set; }
public string? SystemName { get; set; }
public string? Family { get; set; }
public int? Weight { get; set; }
public string? Style { get; set; }
public string Direction { get; set; } = "LTR";
public string? FileUrl { get; set; }
public string? SampleImageUrl { get; set; }
public bool IsPremium { get; set; }
public bool IsActive { get; set; } = true;
public bool InstalledOnNodes { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
}
public class MusicTrack
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = default!;
public string? Caption { get; set; }
public string? Keywords { get; set; }
public string Url { get; set; } = default!;
public string? WaveformData { get; set; }
public decimal DurationSec { get; set; }
public int? Bpm { get; set; }
public string? Genre { get; set; }
public string? Mood { get; set; }
public bool IsPremium { get; set; }
public bool IsActive { get; set; } = true;
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
}
public class ProjectServer
{
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = default!;
public string Region { get; set; } = default!;
public string? Ip { get; set; }
public string? PhysicalPathOutput { get; set; }
public string? DefaultProjectAddress { get; set; }
public string? RenderOutputLocation { get; set; }
public string? PreNeedFolderAddress { get; set; }
public string? MinioEndpoint { get; set; }
public string? MinioBucketTemplates { get; set; }
public string? MinioBucketOutputs { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class AdminFile
{
public Guid Id { get; set; } = Guid.NewGuid();
public string? Name { get; set; }
public string Url { get; set; } = default!;
public string? ThumbnailUrl { get; set; }
public string? FileType { get; set; }
public long? SizeBytes { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
@@ -0,0 +1,116 @@
using FlatRender.ContentSvc.Domain.Enums;
namespace FlatRender.ContentSvc.Domain.Entities;
public class ProjectContainer
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid? TenantId { get; set; }
public string Slug { get; set; } = default!;
public string Name { get; set; } = default!;
public string? Description { get; set; }
public string? Keywords { get; set; }
public string? NewsText { get; set; }
public string? Image { get; set; }
public string? Demo { get; set; }
public string? FullDemo { get; set; }
public string? MiniDemo { get; set; }
public string? DemoScriptTag { get; set; }
public bool IsPublished { get; set; }
public bool IsPremium { get; set; }
public bool IsMockup { get; set; }
public ChooseMode PrimaryMode { get; set; } = ChooseMode.FLEXIBLE;
public decimal? RateAvg { get; set; }
public int RateCount { get; set; }
public long ViewCount { get; set; }
public long UseCount { get; set; }
public int Sort { get; set; }
public DateTime SortDate { get; set; } = DateTime.UtcNow;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<Project> Projects { get; set; } = [];
public ICollection<ContainerCategory> ContainerCategories { get; set; } = [];
public ICollection<ContainerTag> ContainerTags { get; set; } = [];
public ICollection<Comment> Comments { get; set; } = [];
}
public class ContainerCategory
{
public Guid ContainerId { get; set; }
public ProjectContainer Container { get; set; } = default!;
public Guid CategoryId { get; set; }
public Category Category { get; set; } = default!;
public int Sort { get; set; }
}
public class ContainerTag
{
public Guid ContainerId { get; set; }
public ProjectContainer Container { get; set; } = default!;
public Guid TagId { get; set; }
public Tag Tag { get; set; } = default!;
}
public class Project
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid ContainerId { get; set; }
public ProjectContainer Container { get; set; } = default!;
public Guid? ProjectServerId { get; set; }
public string Name { get; set; } = default!;
public string? Description { get; set; }
public string? Image { get; set; }
public string? FullDemo { get; set; }
public string? DemoScriptTag { get; set; }
public string? DownloadLink { get; set; }
public string? AepMinioBucket { get; set; }
public string? AepMinioKey { get; set; }
public string? AepFileUrl { get; set; }
public string? AepFileMd5 { get; set; }
public long? AepFileSizeBytes { get; set; }
public DateTime? AepUploadedAt { get; set; }
public string? Folder { get; set; }
public int OriginalWidth { get; set; }
public int OriginalHeight { get; set; }
public string? Aspect { get; set; }
public decimal ProjectDurationSec { get; set; }
public decimal? MinDurationSec { get; set; }
public decimal? MaxDurationSec { get; set; }
public int FreeFps { get; set; } = 30;
public ChooseMode ChooseMode { get; set; }
public ResolutionKind Resolution { get; set; } = ResolutionKind.FullHD;
public decimal VipFactor { get; set; } = 1.0m;
public string RenderAepComp { get; set; } = "flatrender";
public string? SharedLayerImage { get; set; }
public string? SharedColorsSvg { get; set; }
public string? SharedColorPresetsSvg { get; set; }
public bool IsPublished { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletedAt { get; set; }
public ICollection<Scene> Scenes { get; set; } = [];
public ICollection<SharedColor> SharedColors { get; set; } = [];
public ICollection<SharedColorPreset> SharedColorPresets { get; set; } = [];
public ICollection<SharedLayer> SharedLayers { get; set; } = [];
public ICollection<ProjectCharacterController> CharacterControllers { get; set; } = [];
public ICollection<ProjectCharacterPreset> CharacterPresets { get; set; } = [];
public ICollection<PresetStory> PresetStories { get; set; } = [];
}
@@ -0,0 +1,18 @@
namespace FlatRender.ContentSvc.Domain.Enums;
public enum ChooseMode { FIX, FLEXIBLE, MockUp, MusicVisualizer, VoiceOver }
public enum ResolutionKind { HD, FullHD, TwoK, FourK }
public enum SceneKind { Normal, Config, DesignStart, DesignEnd }
public enum ContentElementType
{
Text, TextArea, Media, Audio, Voiceover,
CheckBox, DropDown, Fill, Color, Number,
Date, Toggle, Slider, Counter, Hidden
}
public enum JustifyKind { LEFT_JUSTIFY, CENTER_JUSTIFY, RIGHT_JUSTIFY, FULL_JUSTIFY }
public enum AiInputType { None, TitleSuggest, BodySuggest, TranslateRtl, TranslateLtr, RemoveBG, UpscaleImage, TTS }
public enum RepeatSortStrategy { Manual, Alphabetical, Numerical, InsertOrder }
public enum AttrValueKind { fill, stroke, tracking, dropshadow }
public enum BlogKind { Blog, Landing }
public enum SlideType { Hero, Promo, Tutorial, Category, Custom }
public enum ContainerFavoriteKind { Container }