зеркало из https://github.com/Azure/Sia-Root.git
Reconciled domain models with data models
This commit is contained in:
Родитель
6f07c377a0
Коммит
600dc3e46c
|
@ -7,7 +7,6 @@ namespace Sia.Domain.ApiModels.Playbooks
|
|||
{
|
||||
public class CreateAction
|
||||
{
|
||||
public bool IsUrl { get; set; }
|
||||
public CreateActionTemplate NewActionTemplate { get; set; }
|
||||
public long? ExistingActionTemplateId { get; set; }
|
||||
public ICollection<CreateConditionSet> NewConditionSets { get; set; }
|
||||
|
|
|
@ -9,6 +9,8 @@ namespace Sia.Domain.ApiModels.Playbooks
|
|||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public bool IsUrl { get; set; }
|
||||
public string Template { get; set; }
|
||||
public ICollection<CreateActionTemplateSource> NewSources { get; set; }
|
||||
= new List<CreateActionTemplateSource>();
|
||||
public ICollection<long> ExistingSourceIds { get; set; }
|
||||
|
|
|
@ -8,9 +8,14 @@ namespace Sia.Domain.ApiModels.Playbooks
|
|||
public class CreateCondition
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public AssertionType AssertionType { get; set; }
|
||||
= AssertionType.IsOrDoes;
|
||||
public ConditionType ConditionType { get; set; }
|
||||
public DataFormat DataFormat { get; set; }
|
||||
= DataFormat.String;
|
||||
public string ComparisonValue { get; set; }
|
||||
public CreateConditionSource NewConditionSource { get; set; }
|
||||
public long? IntegerComparisonValue { get; set; }
|
||||
public DateTime DateTimeComparisonValue { get; set; }
|
||||
public long? ExistingConditionSourceId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Sia.Shared" Version="1.1.0-alpha" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Sia.Domain\Sia.Domain.csproj" />
|
||||
<ProjectReference Include="..\Sia.Shared\Sia.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -8,7 +8,6 @@ namespace Sia.Domain.Playbook
|
|||
public class Action : IEntity
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public bool IsUrl { get; set; }
|
||||
public ActionTemplate ActionTemplate { get; set; }
|
||||
public ICollection<ConditionSet> ConditionSets { get; set; }
|
||||
= new List<ConditionSet>();
|
||||
|
|
|
@ -9,16 +9,36 @@ namespace Sia.Domain.Playbook
|
|||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public AssertionType AssertionType { get; set; }
|
||||
= AssertionType.IsOrDoes;
|
||||
public ConditionType ConditionType { get; set; }
|
||||
public DataFormat DataFormat { get; set; }
|
||||
= DataFormat.String;
|
||||
public string ComparisonValue { get; set; }
|
||||
public long? IntegerComparisonValue { get; set; }
|
||||
public DateTime DateTimeComparisonValue { get; set; }
|
||||
public ConditionSource ConditionSource { get; set; }
|
||||
}
|
||||
|
||||
public enum AssertionType
|
||||
{
|
||||
IsOrDoes,
|
||||
IsNotOrDoesNot
|
||||
}
|
||||
|
||||
public enum ConditionType
|
||||
{
|
||||
Equals,
|
||||
DoesNotEqual,
|
||||
Contains,
|
||||
DoesNotContain
|
||||
Equal,
|
||||
Contain,
|
||||
HaveValue,
|
||||
GreaterThan,
|
||||
LessThan
|
||||
}
|
||||
|
||||
public enum DataFormat
|
||||
{
|
||||
String,
|
||||
DateTime,
|
||||
Integer
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Sia.Shared" Version="1.1.0-alpha" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Sia.Shared\Sia.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче