50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Service.DCEntityMapper;
|
|
using BeWo.Service.ServiceImplementations.Enhanced;
|
|
using BS.Shared.DataContracts.Feature.AI;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.BusinessLogic
|
|
{
|
|
public class AiPromptbausteinFolderLogic : GenericBusinessLogic<AiPromptbausteinFolderDC, AiPromptbausteinFolder>
|
|
{
|
|
public override IDCEntityMapper<AiPromptbausteinFolder, AiPromptbausteinFolderDC> Mapper => MapperFactory.AiPromptbausteinFolder;
|
|
|
|
public override void Deactivate(AiPromptbausteinFolderDC dc)
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
public void Deactivate(AiPromptbausteinFolderDC dc, AiPromptbausteinPromptLogic prompt_logic)
|
|
{
|
|
if(dc.SubFolders?.Any() ?? false)
|
|
{
|
|
foreach(var subfolder in dc.SubFolders)
|
|
{
|
|
Deactivate(subfolder, prompt_logic);
|
|
}
|
|
}
|
|
|
|
if(dc.SubPrompts?.Any() ?? false)
|
|
{
|
|
foreach (var prompt in dc.SubPrompts)
|
|
{
|
|
prompt_logic.Deactivate(prompt);
|
|
}
|
|
}
|
|
|
|
base.Deactivate(dc);
|
|
}
|
|
|
|
public override bool Delete(AiPromptbausteinFolderDC dc)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|