using System; using System.Collections.Generic; namespace Shared.Common { public class Logic { public static List LogicList = new List(); public static List LockLogicList = new List(); public static List SoneLogicList = new List(); public static List LogicDviceList = new List(); public static Logic CurrentLogic; /// ///0:获取成功 ///1:该逻辑不存在。 ///以下所有字段只有在Result 为1时存在 /// public int Result; /// /// 0.正常自动化;1.门锁自动化;2.门锁常开.关; /// public int LogicType = 0; /// /// 逻辑ID /// public int LogicId; /// ///该逻辑是否被使能。 ///0:禁用该逻辑 ///1:使能该逻辑 ///2: 只触发一次。触发后该字段将自动置为0,即禁用状态。 /// public int IsEnable; /// ///逻辑名称 /// public string LogicName; /// ///逻辑关系。 ///0:满足所有条件触发动作 ///1:满足其中一个条件触发动作 /// public int Relationship; /// /// 推送内容 /// public string LogicCustomPushText=string.Empty; /// /// 记录推送开关状态 /// public int LogicIsCustomPushText = 0; //public Dictionary TimeAttribute = new Dictionary(); public TimeAttributeObj TimeAttribute = new TimeAttributeObj(); /// /// 逻辑条件列表 /// public List> Conditions = new List>(); /// /// 条件满足后执行的动作列表 /// public List> Actions = new List>(); /// /// 关联app账号列表 /// public List> Accounts = new List>(); } /// /// 描述逻辑时间属性 /// [System.Serializable] public class TimeAttributeObj { public int Calendar; public int Repeat = 2; public int WeekDay; public int SetYear; public int MonthDate; public int SelectMonth; public List SelectMonDate = new List(); } }