Datenmodell AiPromptroutinen
This commit is contained in:
@@ -151,7 +151,11 @@
|
||||
<Compile Include="ViewModel\AiConfigVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinFolderVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptbausteinPromptVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptroutineStepVM.cs" />
|
||||
<Compile Include="ViewModel\AiPromptroutineVM.cs" />
|
||||
<Compile Include="ViewModel\AiUserSettingVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptroutineListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptroutineStepListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinPromptListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinFolderListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\TextModuleListVM.cs" />
|
||||
|
||||
54
BeWo/ViewModel/AiPromptroutineStepVM.cs
Normal file
54
BeWo/ViewModel/AiPromptroutineStepVM.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AiPromptroutineStepVM : AbstractDCMapperVM<AiPromptroutineStepDC>
|
||||
{
|
||||
private int _Position;
|
||||
private AiPromptbausteinPromptDC _PromptReference;
|
||||
private long _ReferenceVersion;
|
||||
|
||||
public AiPromptroutineStepVM(AiPromptroutineStepDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int Position
|
||||
{
|
||||
get => _Position;
|
||||
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
|
||||
}
|
||||
|
||||
public AiPromptbausteinPromptDC PromptReference
|
||||
{
|
||||
get => _PromptReference;
|
||||
set => SetProperty(ref _PromptReference, value, nameof(PromptReference), () => DataContract.PromptReference);
|
||||
}
|
||||
|
||||
public long ReferenceVersion
|
||||
{
|
||||
get => _ReferenceVersion;
|
||||
set => SetProperty(ref _ReferenceVersion, value, nameof(ReferenceVersion), () => DataContract.ReferenceVersion);
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiPromptroutineStepDC pDataContract)
|
||||
{
|
||||
_Position = pDataContract.Position;
|
||||
_PromptReference = pDataContract.PromptReference;
|
||||
_ReferenceVersion = pDataContract.ReferenceVersion;
|
||||
}
|
||||
|
||||
protected override AiPromptroutineStepDC MapToDataContract(AiPromptroutineStepDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Position = _Position;
|
||||
pDataContract.PromptReference = _PromptReference;
|
||||
pDataContract.ReferenceVersion = _ReferenceVersion;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
BeWo/ViewModel/AiPromptroutineVM.cs
Normal file
120
BeWo/ViewModel/AiPromptroutineVM.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class AiPromptroutineVM : AbstractDCMapperVM<AiPromptroutineDC>
|
||||
{
|
||||
private string _Title;
|
||||
private string _Description;
|
||||
private long? _ParentFolderOid;
|
||||
private CompactEmployeeDC _Creator;
|
||||
private bool _IsPublic;
|
||||
private int _Position;
|
||||
private bool _IsFavorite;
|
||||
private AiActionType _ActionType;
|
||||
private bool _CanEdit;
|
||||
private AiPromptroutineStepListVM _Steps;
|
||||
|
||||
public AiPromptroutineVM(AiPromptroutineDC dc) : base(dc, dc.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get => _Title;
|
||||
set => SetProperty(ref _Title, value, nameof(Title), () => DataContract.Title);
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => _Description;
|
||||
set => SetProperty(ref _Description, value, nameof(Description), () => DataContract.Description);
|
||||
}
|
||||
|
||||
public long? ParentFolderOid
|
||||
{
|
||||
get => _ParentFolderOid;
|
||||
set => SetProperty(ref _ParentFolderOid, value, nameof(ParentFolderOid), () => DataContract.ParentFolderOid);
|
||||
}
|
||||
|
||||
public CompactEmployeeDC Creator
|
||||
{
|
||||
get => _Creator;
|
||||
set => SetProperty(ref _Creator, value, nameof(Creator), () => DataContract.Creator);
|
||||
}
|
||||
|
||||
public bool IsPublic
|
||||
{
|
||||
get => _IsPublic;
|
||||
set => SetProperty(ref _IsPublic, value, nameof(IsPublic), () => DataContract.IsPublic);
|
||||
}
|
||||
|
||||
public int Position
|
||||
{
|
||||
get => _Position;
|
||||
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
|
||||
}
|
||||
|
||||
public bool IsFavorite
|
||||
{
|
||||
get => _IsFavorite;
|
||||
set => SetProperty(ref _IsFavorite, value, nameof(IsFavorite), () => DataContract.IsFavorite);
|
||||
}
|
||||
|
||||
public AiActionType ActionType
|
||||
{
|
||||
get => _ActionType;
|
||||
set => SetProperty(ref _ActionType, value, nameof(ActionType), () => DataContract.ActionType);
|
||||
}
|
||||
|
||||
public bool CanEdit
|
||||
{
|
||||
get => _CanEdit;
|
||||
set => SetProperty(ref _CanEdit, value, nameof(CanEdit), () => DataContract.CanEdit);
|
||||
}
|
||||
|
||||
public AiPromptroutineStepListVM Steps
|
||||
{
|
||||
get => _Steps;
|
||||
set => SetProperty(ref _Steps, value, nameof(Steps));
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(AiPromptroutineDC pDataContract)
|
||||
{
|
||||
_Title = pDataContract.Title;
|
||||
_Description = pDataContract.Description;
|
||||
_ParentFolderOid = pDataContract.ParentFolderOid;
|
||||
_Creator = pDataContract.Creator;
|
||||
_IsPublic = pDataContract.IsPublic;
|
||||
_Position = pDataContract.Position;
|
||||
_IsFavorite = pDataContract.IsFavorite;
|
||||
_ActionType = pDataContract.ActionType;
|
||||
_CanEdit = pDataContract.CanEdit;
|
||||
|
||||
_Steps = new AiPromptroutineStepListVM(pDataContract.Steps);
|
||||
}
|
||||
|
||||
protected override AiPromptroutineDC MapToDataContract(AiPromptroutineDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.Title = _Title;
|
||||
pDataContract.Description = _Description;
|
||||
pDataContract.ParentFolderOid = _ParentFolderOid;
|
||||
pDataContract.Creator = _Creator;
|
||||
pDataContract.IsPublic = _IsPublic;
|
||||
pDataContract.Position = _Position;
|
||||
pDataContract.IsFavorite = _IsFavorite;
|
||||
pDataContract.ActionType = _ActionType;
|
||||
pDataContract.CanEdit = _CanEdit;
|
||||
|
||||
pDataContract.Steps = _Steps.CopyToDCList(doCommit);
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
BeWo/ViewModel/ListViewModel/AiPromptroutineListVM.cs
Normal file
17
BeWo/ViewModel/ListViewModel/AiPromptroutineListVM.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class AiPromptroutineListVM : AbstractDCListMapperVM<AiPromptroutineDC, AiPromptroutineVM>
|
||||
{
|
||||
public AiPromptroutineListVM(IEnumerable<AiPromptroutineDC> pDataContracts = null) : base(pDataContracts)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
17
BeWo/ViewModel/ListViewModel/AiPromptroutineStepListVM.cs
Normal file
17
BeWo/ViewModel/ListViewModel/AiPromptroutineStepListVM.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class AiPromptroutineStepListVM : AbstractDCListMapperVM<AiPromptroutineStepDC, AiPromptroutineStepVM>
|
||||
{
|
||||
public AiPromptroutineStepListVM(IEnumerable<AiPromptroutineStepDC> pDataContracts = null) : base(pDataContracts)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,6 +234,8 @@
|
||||
<Compile Include="Access\UserDAO.cs" />
|
||||
<Compile Include="ASPHibernateSessionManager.cs" />
|
||||
<Compile Include="DefaultHibernateSessionManager.cs" />
|
||||
<Compile Include="Entities\AiPromptroutine.cs" />
|
||||
<Compile Include="Entities\AiPromptroutineStep.cs" />
|
||||
<Compile Include="Entities\AiUserSetting.cs" />
|
||||
<Compile Include="Entities\AiVoiceData.cs" />
|
||||
<Compile Include="Entities\OvertimeHistory.cs" />
|
||||
|
||||
38
Data/Entities/AiPromptroutine.cs
Normal file
38
Data/Entities/AiPromptroutine.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class AiPromptroutine : BeWoEntityBase
|
||||
{
|
||||
public AiPromptroutine()
|
||||
{
|
||||
_Tid = TableID.AiPromptroutine;
|
||||
}
|
||||
|
||||
public virtual string Title { get; set; }
|
||||
|
||||
public virtual string Description { get; set; }
|
||||
|
||||
public virtual long? ParentFolderOid { get; set; }
|
||||
|
||||
public virtual long CreatorOid { get; set; }
|
||||
|
||||
public virtual bool IsPublic { get; set; }
|
||||
|
||||
public virtual int Position { get; set; }
|
||||
|
||||
public virtual bool IsFavorite { get; set; }
|
||||
|
||||
public virtual AiActionType ActionType { get; set; }
|
||||
|
||||
public virtual bool CanEdit { get; set; }
|
||||
|
||||
public virtual List<AiPromptroutineStep> Steps { get; set; }
|
||||
}
|
||||
}
|
||||
22
Data/Entities/AiPromptroutineStep.cs
Normal file
22
Data/Entities/AiPromptroutineStep.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class AiPromptroutineStep : BeWoEntityBase
|
||||
{
|
||||
public AiPromptroutineStep()
|
||||
{
|
||||
_Tid = TableID.AiPromptroutineStep;
|
||||
}
|
||||
|
||||
public virtual int Position { get; set; }
|
||||
|
||||
public virtual AiPromptbausteinPrompt PromptReference { get; set; }
|
||||
|
||||
public virtual long ReferenceVersion { get; set; }
|
||||
}
|
||||
}
|
||||
42
Model/Changes_2026-04-17 AiPromptroutine.txt
Normal file
42
Model/Changes_2026-04-17 AiPromptroutine.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
INSERT INTO `.executedscripts`
|
||||
VALUES ('Changes_2026-04-17 AiPromptroutine', CURDATE());
|
||||
|
||||
CREATE TABLE `aipromptroutinestep` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`Tid` int DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`Position` int,
|
||||
`PromptReferenceOid` bigint DEFAULT NULL,
|
||||
`PromptReferenceVersion` bigint,
|
||||
PRIMARY KEY (`Oid`),
|
||||
CONSTRAINT `FK_AIPROMPTROUTINESTEP_PROMPT` FOREIGN KEY (`PromptReferenceOid`) REFERENCES `aipromptbausteinprompt` (`Oid`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `aipromptroutine` (
|
||||
`Oid` bigint NOT NULL AUTO_INCREMENT,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`Tid` int DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint DEFAULT NULL,
|
||||
`IsActive` tinyint DEFAULT NULL,
|
||||
`SystemEntryID` int DEFAULT NULL,
|
||||
`Title` varchar(255),
|
||||
`Description` varchar(255),
|
||||
`ParentFolderOid` bigint DEFAULT NULL,
|
||||
`CreatorOid` bigint,
|
||||
`IsPublic` tinyint,
|
||||
`Position` int,
|
||||
`IsFavorite` tinyint,
|
||||
`ActionType` int,
|
||||
PRIMARY KEY (`Oid`),
|
||||
CONSTRAINT `FK_AIPROMPTROUTINE_EMPLOYEE` FOREIGN KEY (`CreatorOid`) REFERENCES `employee` (`Oid`),
|
||||
CONSTRAINT `FK_AIPROMPTROUTINE_PARENT` FOREIGN KEY (`ParentFolderOid`) REFERENCES `aipromptbausteinfolder` (`Oid`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
59
Service/DCEntityMapper/AiPromptroutineDC_AiPromptroutine.cs
Normal file
59
Service/DCEntityMapper/AiPromptroutineDC_AiPromptroutine.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class AiPromptroutineDC_AiPromptroutine : BeWoDataContract_BeWoEntityBase<AiPromptroutine, AiPromptroutineDC>
|
||||
{
|
||||
public override AiPromptroutineDC MergeWithDC(AiPromptroutine pEntity, AiPromptroutineDC pDataContract)
|
||||
{
|
||||
base.MergeWithDC(pEntity, pDataContract);
|
||||
|
||||
pDataContract.Title = pEntity.Title;
|
||||
pDataContract.Description = pEntity.Description;
|
||||
pDataContract.ParentFolderOid = pEntity.ParentFolderOid;
|
||||
pDataContract.IsPublic = pEntity.IsPublic;
|
||||
pDataContract.Position = pEntity.Position;
|
||||
pDataContract.IsFavorite = pEntity.IsFavorite;
|
||||
pDataContract.ActionType = pEntity.ActionType;
|
||||
pDataContract.CanEdit = pEntity.CanEdit;
|
||||
|
||||
pDataContract.Steps = MapperFactory.AiPromptroutineStep.MapToNewDCs(pEntity.Steps);
|
||||
|
||||
if (pEntity.CreatorOid is long oid)
|
||||
pDataContract.Creator = new EmployeeServiceImp().GetActiveCompactEmployeeWithOid(oid);
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public override AiPromptroutine MergeWithEntity(AiPromptroutineDC pDataContract, AiPromptroutine pEntity)
|
||||
{
|
||||
base.MergeWithEntity(pDataContract, pEntity);
|
||||
|
||||
pEntity.Title = pDataContract.Title;
|
||||
pEntity.Description = pDataContract.Description;
|
||||
pEntity.ParentFolderOid = pDataContract.ParentFolderOid;
|
||||
pEntity.CreatorOid = pDataContract.Creator.EmployeeOid;
|
||||
pEntity.IsPublic = pDataContract.IsPublic;
|
||||
pEntity.Position = pDataContract.Position;
|
||||
pEntity.IsFavorite = pDataContract.IsFavorite;
|
||||
pEntity.ActionType = pDataContract.ActionType;
|
||||
pEntity.CanEdit = pDataContract.CanEdit;
|
||||
|
||||
pEntity.Steps = DAOFactory.GenericDAO.LoadByIDs<AiPromptroutineStep>(pDataContract.Steps.Select(x => x.Oid.Value));
|
||||
|
||||
if (pDataContract.ParentFolderOid is long oid && oid >= 0)
|
||||
pEntity.ParentFolderOid = pDataContract.ParentFolderOid;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class AiPromptroutineStepDC_AiPromptroutineStep : BeWoDataContract_BeWoEntityBase<AiPromptroutineStep, AiPromptroutineStepDC>
|
||||
{
|
||||
public override AiPromptroutineStepDC MergeWithDC(AiPromptroutineStep pEntity, AiPromptroutineStepDC pDataContract)
|
||||
{
|
||||
base.MergeWithDC(pEntity, pDataContract);
|
||||
|
||||
pDataContract.Position = pEntity.Position;
|
||||
pDataContract.PromptReference = MapperFactory.AiPromptbausteinPrompt.MapToNewDC(pEntity.PromptReference);
|
||||
pDataContract.ReferenceVersion = pEntity.ReferenceVersion;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public override AiPromptroutineStep MergeWithEntity(AiPromptroutineStepDC pDataContract, AiPromptroutineStep pEntity)
|
||||
{
|
||||
base.MergeWithEntity(pDataContract, pEntity);
|
||||
|
||||
pEntity.Position = pDataContract.Position;
|
||||
pEntity.PromptReference = DAOFactory.GenericDAO.LoadByID<AiPromptbausteinPrompt>(pDataContract.PromptReference.Oid.Value);
|
||||
pEntity.ReferenceVersion = pDataContract.ReferenceVersion;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -814,6 +814,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
public static AiConfigDC_AiConfig AiConfig { get; } = new AiConfigDC_AiConfig();
|
||||
public static AiPromptbausteinFolderDC_AiPromptbausteinFolder AiPromptbausteinFolder { get; } = new AiPromptbausteinFolderDC_AiPromptbausteinFolder();
|
||||
public static AiPromptbausteinPromptDC_AiPromptbausteinPrompt AiPromptbausteinPrompt { get; } = new AiPromptbausteinPromptDC_AiPromptbausteinPrompt();
|
||||
public static AiPromptroutineDC_AiPromptroutine AiPromptroutine { get; } = new AiPromptroutineDC_AiPromptroutine();
|
||||
public static AiPromptroutineStepDC_AiPromptroutineStep AiPromptroutineStep { get; } = new AiPromptroutineStepDC_AiPromptroutineStep();
|
||||
public static AiUserSettingDC_AiUserSetting AiUserSetting { get; } = new AiUserSettingDC_AiUserSetting();
|
||||
public static AddressDC_Address Address { get; } = new AddressDC_Address();
|
||||
public static GkvAbrechnungLightDC_GkvAbrechnungLight GkvAbrechnungLight { get; } = new GkvAbrechnungLightDC_GkvAbrechnungLight();
|
||||
|
||||
@@ -247,6 +247,8 @@
|
||||
<Compile Include="DCEntityMapper\AiConfigDC_AiConfig.cs" />
|
||||
<Compile Include="DCEntityMapper\AiModelDC_AiModel.cs" />
|
||||
<Compile Include="DCEntityMapper\AiPromptbausteinFolderDC_AiPromptbausteinFolder.cs" />
|
||||
<Compile Include="DCEntityMapper\AiPromptroutineDC_AiPromptroutine.cs" />
|
||||
<Compile Include="DCEntityMapper\AiPromptroutineStepDC_AiPromptroutineStep.cs" />
|
||||
<Compile Include="DCEntityMapper\AiUserSettingDC_AiUserSetting.cs" />
|
||||
<Compile Include="DCEntityMapper\AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs" />
|
||||
<Compile Include="DCEntityMapper\BankAccountDC_BankAccount.cs" />
|
||||
|
||||
@@ -199,7 +199,9 @@ namespace BS.Shared
|
||||
AiVoiceData = 186,
|
||||
AiPromptbausteinPrompt = 187,
|
||||
AiPromptbausteinFolder = 188,
|
||||
AiUserSetting = 189
|
||||
AiUserSetting = 189,
|
||||
AiPromptroutine = 190,
|
||||
AiPromptroutineStep = 191,
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Instrumentation;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.Feature.AI
|
||||
{
|
||||
//[DataContract]
|
||||
//public class AiPromptbausteinFolderStructureDC : IDataContract
|
||||
//{
|
||||
// public AiPromptbausteinFolderDC MyProperty { get; set; }
|
||||
//}
|
||||
}
|
||||
28
Shared/DataContracts/Feature/AI/AiPromptroutineDC.cs
Normal file
28
Shared/DataContracts/Feature/AI/AiPromptroutineDC.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Interface.Feature.AICore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.Feature.AI
|
||||
{
|
||||
public class AiPromptroutineDC : BeWoDataContract, IAiPromptroutine
|
||||
{
|
||||
[DataMember] public string Title { get; set; }
|
||||
[DataMember] public string Description { get; set; }
|
||||
[DataMember] public long? ParentFolderOid { get; set; }
|
||||
[DataMember] public CompactEmployeeDC Creator { get; set; }
|
||||
[DataMember] public bool IsPublic { get; set; }
|
||||
[DataMember] public int Position { get; set; }
|
||||
[DataMember] public bool IsFavorite { get; set; }
|
||||
[DataMember] public AiActionType ActionType { get; set; }
|
||||
|
||||
[DataMember] public bool CanEdit { get; set; }
|
||||
[DataMember] public List<AiPromptroutineStepDC> Steps { get; set; } = new List<AiPromptroutineStepDC> { };
|
||||
|
||||
List<IAiPromptroutineStep> IAiPromptroutine.Steps => this.Steps.Select(x => x as IAiPromptroutineStep).ToList();
|
||||
}
|
||||
}
|
||||
21
Shared/DataContracts/Feature/AI/AiPromptroutineStepDC.cs
Normal file
21
Shared/DataContracts/Feature/AI/AiPromptroutineStepDC.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Interface;
|
||||
using BS.Shared.Interface.Feature.AICore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts.Feature.AI
|
||||
{
|
||||
public class AiPromptroutineStepDC : BeWoDataContract, IAiPromptroutineStep
|
||||
{
|
||||
[DataMember] public int Position { get; set; }
|
||||
[DataMember] public AiPromptbausteinPromptDC PromptReference { get; set; }
|
||||
[DataMember] public long ReferenceVersion { get; set; }
|
||||
|
||||
public IAiPromptbausteinPrompt Reference => PromptReference;
|
||||
}
|
||||
}
|
||||
31
Shared/Extensions/AiPromptroutineExtensions.cs
Normal file
31
Shared/Extensions/AiPromptroutineExtensions.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using BS.Shared.Interface.Feature.AICore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Extensions
|
||||
{
|
||||
public static class AiPromptroutineExtensions
|
||||
{
|
||||
public static bool CanExecuteRoutine(this IAiPromptroutine routine)
|
||||
{
|
||||
if (routine?.Steps is null || !routine.Steps.Any())
|
||||
return false;
|
||||
|
||||
foreach (var step in routine.Steps)
|
||||
{
|
||||
// Delete
|
||||
if (step.Reference is null)
|
||||
return false;
|
||||
|
||||
// Update
|
||||
if (step.Reference.Version != step.ReferenceVersion)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ namespace BS.Shared.Interface
|
||||
{
|
||||
public interface IAiPromptbausteinPrompt
|
||||
{
|
||||
string Prompt { get; set; }
|
||||
long? Version { get; }
|
||||
string Prompt { get; }
|
||||
}
|
||||
}
|
||||
25
Shared/Interface/Feature/AICore/IAiPromptroutine.cs
Normal file
25
Shared/Interface/Feature/AICore/IAiPromptroutine.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Interface.Feature.AICore
|
||||
{
|
||||
public interface IAiPromptroutine
|
||||
{
|
||||
string Title { get; }
|
||||
string Description { get; }
|
||||
long? ParentFolderOid { get; }
|
||||
bool IsPublic { get; }
|
||||
int Position { get; }
|
||||
bool IsFavorite { get; }
|
||||
AiActionType ActionType { get; }
|
||||
|
||||
bool CanEdit { get; }
|
||||
List<IAiPromptroutineStep> Steps { get; }
|
||||
}
|
||||
}
|
||||
17
Shared/Interface/Feature/AICore/IAiPromptroutineStep.cs
Normal file
17
Shared/Interface/Feature/AICore/IAiPromptroutineStep.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using BS.Shared.DataContracts.Feature.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Interface.Feature.AICore
|
||||
{
|
||||
public interface IAiPromptroutineStep
|
||||
{
|
||||
int Position { get; }
|
||||
IAiPromptbausteinPrompt Reference { get; }
|
||||
long ReferenceVersion { get; }
|
||||
}
|
||||
}
|
||||
@@ -194,11 +194,12 @@
|
||||
<Compile Include="DataContracts\AdminService\AdminServiceSumResponseDetailDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\IAdminServiceDC.cs" />
|
||||
<Compile Include="DataContracts\AdminService\AdminServiceSumReqDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiPromptroutineDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiPromptroutineStepDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiUserSettingDC.cs" />
|
||||
<Compile Include="DataContracts\IAbsenceTime.cs" />
|
||||
<Compile Include="DataContracts\AiVoiceDataDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinFolderDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinFolderStructureDC.cs" />
|
||||
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinPromptDC.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberRequestDC.cs" />
|
||||
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberResponseDC.cs" />
|
||||
@@ -419,6 +420,7 @@
|
||||
<Compile Include="Exceptions\BeWoNotImplementedException.cs" />
|
||||
<Compile Include="Exceptions\BeWoInvalidOperationException.cs" />
|
||||
<Compile Include="Exceptions\GkvException.cs" />
|
||||
<Compile Include="Extensions\AiPromptroutineExtensions.cs" />
|
||||
<Compile Include="Extensions\ApiResponseExtension.cs" />
|
||||
<Compile Include="Extensions\BoolExtensions.cs" />
|
||||
<Compile Include="Extensions\ContactExtensions.cs" />
|
||||
@@ -433,8 +435,10 @@
|
||||
<Compile Include="Extensions\TimeIntervalExtensions.cs" />
|
||||
<Compile Include="Interface\Abstract\IAddressable.cs" />
|
||||
<Compile Include="Interface\Feature\AICore\IAiConversationMessage.cs" />
|
||||
<Compile Include="Interface\IAiPromptbaustein.cs" />
|
||||
<Compile Include="Interface\IAiPromptbausteinPrompt.cs" />
|
||||
<Compile Include="Interface\Feature\AICore\IAiPromptbaustein.cs" />
|
||||
<Compile Include="Interface\Feature\AICore\IAiPromptbausteinPrompt.cs" />
|
||||
<Compile Include="Interface\Feature\AICore\IAiPromptroutine.cs" />
|
||||
<Compile Include="Interface\Feature\AICore\IAiPromptroutineStep.cs" />
|
||||
<Compile Include="Interface\IApiErrorExtractor.cs" />
|
||||
<Compile Include="Interface\IContact.cs" />
|
||||
<Compile Include="Interface\IFileStorageDAO.cs" />
|
||||
|
||||
6
Tools/BeWoLogCleaner/.cr/personal/FavoritesList/List.xml
Normal file
6
Tools/BeWoLogCleaner/.cr/personal/FavoritesList/List.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
|
||||
<Options Language="Neutral">
|
||||
<Groups />
|
||||
</Options>
|
||||
</Root>
|
||||
Reference in New Issue
Block a user