This commit is contained in:
gamer147
2026-05-25 14:36:12 -04:00
parent 558e8288eb
commit 5e7a65fe5a
54 changed files with 39633 additions and 29 deletions

View File

@@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SVSim.Database.Entities.Story;
public class SpecialBattleSetting
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Id { get; set; }
public int PlayerFirstTurn { get; set; }
public int PlayerStartPp { get; set; }
public int EnemyStartPp { get; set; }
public int PlayerStartLife { get; set; }
public int EnemyStartLife { get; set; }
public string PlayerAttachSkill { get; set; } = string.Empty;
public string EnemyAttachSkill { get; set; } = string.Empty;
public string IdOverrideInBattleLog { get; set; } = string.Empty;
public string BanishEffectOverride { get; set; } = string.Empty;
public string TokenDrawEffectOverride { get; set; } = string.Empty;
public string SpecialTokenDrawEffectOverride { get; set; } = string.Empty;
public int ResultSkip { get; set; }
public int VsEffectOverride { get; set; }
public int ClassDestroyEffectOverride { get; set; }
public string? Note { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace SVSim.Database.Entities.Story;
public enum StoryApiType
{
None = 0,
Main = 1,
Limited = 2,
Event = 3,
AllStory = 4,
}

View File

@@ -0,0 +1,51 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SVSim.Database.Entities.Story;
public class StoryChapter
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int StoryId { get; set; }
public int SectionId { get; set; }
public StorySection? Section { get; set; }
public int CharaId { get; set; }
public string ChapterId { get; set; } = string.Empty;
public string NextChapterId { get; set; } = string.Empty;
public string? RequiredChapterId { get; set; }
public string? SelectionDisplayPosition { get; set; }
public string? SelectionTextId { get; set; }
public decimal XCoordinate { get; set; }
public decimal YCoordinate { get; set; }
public int ShowCoordinate { get; set; }
public int IsCameraMovable { get; set; }
public int ShowSubtitles { get; set; }
public bool BattleExists { get; set; }
public int EnemyCharaId { get; set; }
public int EnemyClass { get; set; }
public int EnemyAiId { get; set; }
public string BgFileName { get; set; } = string.Empty;
public string? ChapterEffectPath { get; set; }
public string? ChapterClearTextId { get; set; }
public int Battle3dFieldId { get; set; }
public string BgmId { get; set; } = string.Empty;
public int? SpecialBattleSettingId { get; set; }
public SpecialBattleSetting? SpecialBattleSetting { get; set; }
public int ReleasePoint { get; set; }
public bool IsMaintenanceChapter { get; set; }
public bool IsPlayAnotherEndAppearanceAnimation { get; set; }
public bool IsReleasedAnotherEnd { get; set; }
public bool IsSkipEnabled { get; set; }
// Owned collections — populated via .OwnsMany() in DbContext.
public List<StoryChapterBattleSetting> BattleSettings { get; set; } = new();
public List<StoryChapterReward> Rewards { get; set; } = new();
public List<StorySubChapter> SubChapters { get; set; } = new();
}

View File

@@ -0,0 +1,13 @@
namespace SVSim.Database.Entities.Story;
[Microsoft.EntityFrameworkCore.Owned]
public class StoryChapterBattleSetting
{
public int DeckClassId { get; set; }
public int PlayerEmotionOverride { get; set; }
public int EnemyEmotionOverride { get; set; }
public int SkinIdOverride { get; set; }
public int Battle3dFieldIdOverride { get; set; }
public int BgmIdOverride { get; set; }
public int DeckSkinIdOverride { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace SVSim.Database.Entities.Story;
[Microsoft.EntityFrameworkCore.Owned]
public class StoryChapterReward
{
public int RewardType { get; set; }
public long RewardDetailId { get; set; }
public int RewardNumber { get; set; }
}

View File

@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SVSim.Database.Entities.Story;
public class StorySection
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Id { get; set; }
public int? WorldId { get; set; }
public StoryWorld? World { get; set; }
public StoryApiType StoryApiType { get; set; }
public int OrderId { get; set; }
public int AllStoryOrderId { get; set; }
public string NameTextKey { get; set; } = string.Empty;
public string ImageName { get; set; } = string.Empty;
public bool IsLeaderSelect { get; set; }
public int BackGroundId { get; set; }
public int ChapterSelectType { get; set; }
public int StoryTypeOverwrite { get; set; }
public bool IsUnderMaintenance { get; set; }
public bool IsPlayAnotherEndAppearanceAnimation { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace SVSim.Database.Entities.Story;
[Microsoft.EntityFrameworkCore.Owned]
public class StorySubChapter
{
public int SubChapterId { get; set; }
public int SubChapterStoryId { get; set; }
public bool IsMaintenanceChapter { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SVSim.Database.Entities.Story;
public class StoryWorld
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Id { get; set; }
public string TitleTextKey { get; set; } = string.Empty;
public string PanelImageName { get; set; } = string.Empty;
public string RibbonText { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,9 @@
namespace SVSim.Database.Entities.Story;
// Composite PK (ViewerId, StoryId) — StoryId here is the BRANCH CHILD that was unlocked.
public class ViewerStoryBranchUnlock
{
public long ViewerId { get; set; }
public int StoryId { get; set; }
public DateTime UnlockedAt { get; set; }
}

View File

@@ -0,0 +1,13 @@
namespace SVSim.Database.Entities.Story;
// Composite PK (ViewerId, StoryId) configured via fluent API in SVSimDbContext.
public class ViewerStoryProgress
{
public long ViewerId { get; set; }
public int StoryId { get; set; }
public bool IsFinish { get; set; }
public bool IsSkipped { get; set; }
public DateTime? FinishedAt { get; set; }
public DateTime? SkippedAt { get; set; }
}