add criteria

This commit is contained in:
Jicheng Lu 2025-01-08 11:20:57 -06:00
parent a09eaffe92
commit c5f5ebd7ed
2 changed files with 8 additions and 2 deletions

View file

@ -13,4 +13,7 @@ public class AgentRule
[JsonPropertyName("entity_type")]
public string EntityType { get; set; }
[JsonPropertyName("criteria")]
public string Criteria { get; set; }
}

View file

@ -8,6 +8,7 @@ public class AgentRuleMongoElement
public bool Disabled { get; set; }
public string EventName { get; set; }
public string EntityType { get; set; }
public string Criteria { get; set; }
public static AgentRuleMongoElement ToMongoElement(AgentRule rule)
{
@ -16,7 +17,8 @@ public class AgentRuleMongoElement
TriggerName = rule.TriggerName,
Disabled = rule.Disabled,
EventName = rule.EventName,
EntityType = rule.EntityType
EntityType = rule.EntityType,
Criteria = rule.Criteria
};
}
@ -27,7 +29,8 @@ public class AgentRuleMongoElement
TriggerName = rule.TriggerName,
Disabled = rule.Disabled,
EventName = rule.EventName,
EntityType = rule.EntityType
EntityType = rule.EntityType,
Criteria = rule.Criteria
};
}
}