Skip to content

Commit adc9167

Browse files
authored
Merge pull request #818 from iceljc/master
add criteria
2 parents 062a209 + c5f5ebd commit adc9167

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentRule.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ public class AgentRule
1313

1414
[JsonPropertyName("entity_type")]
1515
public string EntityType { get; set; }
16+
17+
[JsonPropertyName("criteria")]
18+
public string Criteria { get; set; }
1619
}

src/Plugins/BotSharp.Plugin.MongoStorage/Models/AgentRuleMongoElement.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public class AgentRuleMongoElement
88
public bool Disabled { get; set; }
99
public string EventName { get; set; }
1010
public string EntityType { get; set; }
11+
public string Criteria { get; set; }
1112

1213
public static AgentRuleMongoElement ToMongoElement(AgentRule rule)
1314
{
@@ -16,7 +17,8 @@ public static AgentRuleMongoElement ToMongoElement(AgentRule rule)
1617
TriggerName = rule.TriggerName,
1718
Disabled = rule.Disabled,
1819
EventName = rule.EventName,
19-
EntityType = rule.EntityType
20+
EntityType = rule.EntityType,
21+
Criteria = rule.Criteria
2022
};
2123
}
2224

@@ -27,7 +29,8 @@ public static AgentRule ToDomainElement(AgentRuleMongoElement rule)
2729
TriggerName = rule.TriggerName,
2830
Disabled = rule.Disabled,
2931
EventName = rule.EventName,
30-
EntityType = rule.EntityType
32+
EntityType = rule.EntityType,
33+
Criteria = rule.Criteria
3134
};
3235
}
3336
}

0 commit comments

Comments
 (0)