--- title: "Creating Compliance Rule / Rule Data Model" slug: "creating-compliance-rule-rule-data-model-1" updated: 2025-06-03T09:17:51Z published: 2025-09-03T06:22:32Z canonical: "docs.powerworker.com/creating-compliance-rule-rule-data-model-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.powerworker.com/llms.txt > Use this file to discover all available pages before exploring further. # Creating Compliance Rule / Rule Data Model Compliance Rules can be written against the below properties on the C# class. The ShiftModel object will be referenced by a variable name of input1. For example, here is a rule expression checking a shift has a clock on value **input1.ClockOn.HasValue && input1.ClockOn.Value != DateTime.MinValue**. ```csharp    public class ShiftModel    {        public Guid Id { get; set; }        public string ShiftType { get; set; }        public Guid ResourceId { get; set; }                public string ResourceName { get; set; }        public DateTime? Start { get; set; }        public DateTime? End { get; set; }        public DateTime? ClockOn { get; set; }        public DateTime? ClockOff { get; set; }        public List PreviousShifts { get; set; } = new List();        public List FutureShifts { get; set; } = new List();    } ```