Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace Sitecore.Feature.ExternalProfiling.Models
- {
- using System.Web.Mvc;
- using Newtonsoft.Json;
- using Sitecore.Feature.ExternalProfiling.Engine.Actions;
- public class RulesLogicModel
- {
- public Rule rule { get; set; }
- }
- public class Rule
- {
- [JsonIgnore]
- public string Description { get; set; } // Manual for now, will be auto generated later.
- public Trigger[] triggers { get; set; }
- public Condition[] conditions { get; set; }
- public Action[] actions { get; set; }
- }
- public class Trigger
- {
- public string triggerType { get; set; } // For now always 'PropertyChanged'
- public string facetType { get; set; } // 'GolfFacet' or 'DemographicFacet'
- public string facetProperty { get; set; } // 'Handicap', 'DateOfBirth'
- }
- public class Condition
- {
- public Statement statementPre { get; set; }
- public Operation operation { get; set; }
- public Statement statementPost { get; set; }
- }
- public class Statement
- {
- [JsonIgnore]
- public List<SelectListItem> PropTypeValues { get; internal set; }
- public string statementType { get; set; } //'constant' or 'property'
- public string propertyOrigin { get; set; } // 'int', 'string' or 'GolfFacet'
- public string propertyValue { get; set; } // '5', 'Clara', or 'Handicap'
- }
- public class Operation
- {
- public string stateType { get; set; } // 'GreaterThan', 'LesserThan' or 'Equals'
- }
- public class Action
- {
- public string actionType { get; set; } // For now always 'ProfileCard'
- public string operationType { get; set; } // 'Increment' or 'Decrement'
- public string itemName { get; set; } // 'Expert Golfer'
- public string amount { get; set; } // '5'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement