From c404f2f369710fe72bbcc4cff2b7b8a2c11b5ff1 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 02 三月 2021 17:48:32 +0800 Subject: [PATCH] Merge branch 'master' into wjc --- Crabtree/SmartHome/HDL/Common/HDLLinkScene.cs | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 151 insertions(+), 0 deletions(-) diff --git a/Crabtree/SmartHome/HDL/Common/HDLLinkScene.cs b/Crabtree/SmartHome/HDL/Common/HDLLinkScene.cs new file mode 100644 index 0000000..1f9b2b6 --- /dev/null +++ b/Crabtree/SmartHome/HDL/Common/HDLLinkScene.cs @@ -0,0 +1,151 @@ +锘縰sing System; +using System.Collections.Generic; + +namespace Shared +{ + + + #region 鈻� 鍦烘櫙鍒楄〃鐩稿叧___________________________ + + #endregion + /// <summary> + /// + /// </summary> + public class HDLLinkSceneBase + { + /// <summary> + /// 鍦烘櫙sid + /// </summary> + public string userSceneId; + /// <summary> + /// 鍦烘櫙sid + /// </summary> + public string sid = ""; + /// <summary> + /// 鍦烘櫙鍚嶇О + /// </summary> + public string name = ""; + /// <summary> + /// 缃戝叧ID + /// </summary> + public string gatewayId = ""; + /// <summary> + /// 浜戠oss瀛樺偍鍥剧墖鐨勮矾寰� + /// </summary> + public string image = ""; + /// <summary> + /// 鎵�灞炴埧闂村垪琛� + /// </summary> + public List<string> roomIds = new List<string> (); + /// <summary> + /// 寤舵椂 + /// </summary> + public string delay = "0"; + /// <summary> + /// 鍦烘櫙鍒嗙粍 + /// </summary> + public string group = "1"; + /// <summary> + /// 鍦烘櫙绫诲瀷 + /// </summary> + public SceneType sceneType = SceneType.OrdinaryScenes; + /// <summary> + /// 鏀惰棌鏍囪 + /// </summary> + public bool collect = false; + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public string modifyTime; + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public string createTime; + + + } + + /// <summary> + /// + /// </summary> + public class HDLLinkScene: HDLLinkSceneBase + { + /// <summary> + /// 鍦烘櫙鍔熻兘鍒楄〃 + /// </summary> + public List<SceneFunction> functions = new List<SceneFunction> (); + /// <summary> + /// 鍦烘櫙鎺ㄩ�侀厤缃垪琛� + /// </summary> + public List<ScenePushConfig> pushConfigs = new List<ScenePushConfig> (); + + + } + + + /// <summary> + /// 鍦烘櫙鍔熻兘瀵硅薄 + /// </summary> + public class SceneFunction + { + public string sid = ""; + + public List<SceneFunctionStatus> status = new List<SceneFunctionStatus> (); + /// <summary> + /// 鍔熻兘寤舵椂 + /// </summary> + public string delay = "0"; + + //Function _localFunction; + ///// <summary> + ///// 鏈湴瀵瑰簲鐨勫姛鑳� + ///// </summary> + //[Newtonsoft.Json.JsonIgnore] + //public Function localFunction { + // get { + // if (_localFunction == null) { + // _localFunction = ConvertFunctionObject (); + // } + // return _localFunction; + // } + //} + + ///// <summary> + ///// 杞崲鎴愬姛鑳藉璞� + ///// </summary> + ///// <returns></returns> + //Function ConvertFunctionObject () + //{ + // var localFunction = FunctionList.List.GetDeviceFunctionList ().Find ((obj) => obj.sid == sid); + // return localFunction; + //} + + } + + /// <summary> + /// 鍦烘櫙鍔熻兘灞炴�� + /// </summary> + public class SceneFunctionStatus + { + public string key = ""; + public string value = ""; + } + /// <summary> + /// 鍦烘櫙鎺ㄩ�侀厤缃� + /// </summary> + public class ScenePushConfig + { + /// <summary> + /// 鎺ㄩ�佹柟寮� + /// </summary> + public string pushMethod = ""; + /// <summary> + /// 鎺ㄩ�佸唴瀹� + /// </summary> + public string pushContent = ""; + /// <summary> + /// 鎺ㄩ�佺洰鏍囬泦鍚� + /// </summary> + public List<string> pushTarget = new List<string> (); + } +} -- Gitblit v1.8.0