New file |
| | |
| | | using 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> (); |
| | | } |
| | | } |