using System; using System.Collections.Generic; namespace HDL_ON.DAL.Server { #region **************************************新服务器************************************** [System.Serializable] public class BaseNoTokenObj { //public string RequestVersion = MainPage.CodeIDString; ////请求来源 //public string clientType = MainPage.ClientType; } [System.Serializable] public class NullObj { } #region ■ 全球区域列表 ____________________________ [System.Serializable] public class GetRegionListObj { /// /// 区域标识 /// public string regionMark; } [System.Serializable] public class RegionByAccountObj { /// /// 账号 /// public string account; } [System.Serializable] public class GlobalRegionListRes { public string regionId; public string regionName; public string regionUrl; } #endregion #region ■ 登录 ____________________________ [System.Serializable] public class LoginObj { /// /// 账号 /// public string account; /// /// 密码 /// public string loginPwd; /// /// 授权类型,可用值:captcha,refresh_token,password,verify /// public string grantType = "password"; /// /// 平台 WEB、APP、WX、ALIPAY /// public string platform = "APP"; /// /// 验证码,短信登录时候用 /// public string verifyCode; } /// /// 刷新token /// [System.Serializable] public class RefreshTokenObj { /// /// refreshToken /// public string refreshToken; /// /// 授权类型,可用值:captcha,refresh_token,password,verify /// public string grantType = "refresh_token"; /// /// 平台 WEB、APP、WX、ALIPAY /// public string platform = "APP"; } /// /// /// [Serializable] public class UserLoginRes { /// /// /// public string expiresIn; /// /// /// public string refreshToken; /// /// /// public string accessToken; /// /// 账号类型 "C":C端账号 /// public string userType; /// /// Token "Bearer " /// public string headerPrefix; /// /// 用户ID /// public string userId; /// /// 用户名字 /// public string name; } /// /// 登录锁定后的异常扩展参数 /// [Serializable] public class AccountLoginLockExtraRes { /// /// 最大允许的密码错误次数 /// public int maxPwdErrorNum; /// /// 当前错误次数 /// public int currentPwdErrorNum; /// /// 解锁事件 /// public long unlockTime; } #endregion #region ■ 注册 ____________________________ //用户输入手机验证码进行验证注册 [System.Serializable] public class RegisterObj { /// /// 用户账号[手机号] /// public string memberPhone; /// /// 用户账号[邮箱] /// public string memberEmail; /// /// 验证码 /// public string verifyCode; ///// ///// 手机注册的要加这个,短信区域代码,如+86 ///// //public string phoneAreaCode; /// /// 登陆密码,需要MD5处理 /// public string loginPwd; /// /// 会员昵称 /// public string memberName; } /// /// 发送验证码 /// [System.Serializable] public class VerifyCodeSendObj { /// /// 手机号 /// public string phone; /// /// 手机号前缀 /// public string phonePrefix; /// /// 语言 /// public string languageType; /// /// 邮箱 /// public string mail; /// /// 1:注册 2:找回密码 3:绑定4:验证码登陆 5:敏感数据 /// 默认传1 /// public int verifyType = 1; /// /// 验证码过期时间(秒),默认5分钟 /// public int expireSecond = 300; } /// /// 验证验证码 /// [System.Serializable] public class VerifyCodeCheckObj { /// /// 手机号 /// public string phone; /// /// 邮箱 /// public string mail; /// /// 1:注册 2:找回密码 3:绑定 4:验证码登陆 5:敏感数据 /// 默认传1 /// public int verifyType = 1; /// /// 验证码过期时间(秒),默认5分钟 /// public string verifyCode; /// /// 验证成功后验证码是否失效 不传值或者true失效,只有传false的时候,校验通过后验证码也不失效 /// public bool verifySuccessFail = true; } //[System.Serializable] //public class SignPhoneObj //{ // public string phone; // public int Company;// 短信模板编号 int 是 //} #endregion #region ■ 忘记密码 ____________________________ //ForgetPwd 忘记密码,手机或邮箱方式 [System.Serializable] public class ForgetPwdObj { /// /// 手机账号 /// public string memberPhone; /// /// 邮箱账号 /// public string memberEmail; /// /// 验证码 /// public string verifyCode; /// /// 新密码 /// public string loginPwd; } /// /// 更改个人密码 /// [System.Serializable] public class UpdatePwdObj { /// /// 旧密码 /// public string loginPwd; /// /// 新密码 /// public string loginNewPwd; } #endregion #region ■ 帐号信息 ____________________________ /// /// 获取个人信息 /// [System.Serializable] public class MemberInfoRes { /// /// 用户ID /// public string memberId; /// /// 用户昵称 /// public string memberName; /// /// 用户邮箱 /// public string memberEmail; /// /// 用户手机号 /// public string memberPhone; /// /// 国家区号 /// public string memberPhonePrefix; /// /// 登录名 /// public string loginName; /// /// 用户头像 /// public string memberHeadIcon; } /// /// 更新个人信息 /// [System.Serializable] public class UpdateMemberNameRes { /// /// 用户昵称 /// public string memberName; } /// /// 更新个人头像 /// [System.Serializable] public class UpdateMemberHeadIconRes { /// /// 用户头像 /// public string memberHeadIcon; } /// /// 绑定认证(手机/邮箱) /// [System.Serializable] public class BindWithAccountObj { /// /// 用户手机 /// public string memberPhone; /// /// 用户手机 /// public string memberEmail; /// /// 验证吗 /// public string verifyCode; } /// /// 解绑绑定认证(手机/邮箱) /// [System.Serializable] public class UnBindAccountObj { /// /// 解绑标示,PHONE,EMAIL /// public string unBindLabel; } #endregion #region ■ 住宅相关 ____________________________ #region 获取住宅分页 [System.Serializable] public class GetHomeListObj { /// /// 住宅类型 /// public string homeType; /// /// 不自动生成默认住宅 /// public bool autoGenerate = false; } [Serializable] public class AddOrUpdateHomeObj { /// /// /// public string homeId; /// /// /// public string homeType; /// /// /// public double latitude; /// /// /// public double longitude; /// /// 住宅名称 /// public string homeName; /// /// 住宅地址 /// public string homeAddress; } //[Serializable] //public class GethomepagerRes //{ // /// // /// // /// // public int totalPages; // public int totalElements; // public bool last; // public bool first; // public int numberOfElements; // public int size; // public int number; // public bool empty; // public List content = new List (); //} //[Serializable] //public class HomeInfoRes //{ // /// // /// // /// // public int totalPages; // public int totalElements; // public bool last; // public bool first; // public int numberOfElements; // public int size; // public int number; // public bool empty; // public List content = new List (); //} #endregion #region 绑定网关 [System.Serializable] public class BindGatewayObj { /// /// 住宅ID /// public string homeId; /// /// 网关MAC /// public string mac; /// /// 住宅类型 /// public string gatewayType; /// /// 子网号 /// public int subnetId; /// /// 设备号 /// public int deviceId; } #endregion #region 获取住宅网关列表 //[Serializable] //public class HomeGatewayRes //{ // public int totalPages; // public int totalElements; // public bool last; // public bool first; // public int numberOfElements; // public int size; // public int number; // public bool empty; // public List content = new List(); //} [Serializable] public class HomeGatewayInfo { /// /// 网关ID /// public string gatewayId =""; /// /// 网关snID /// public string sn = ""; /// /// /// public string aesKey = ""; /// /// BUSUDPGATEWAY, /// AGATEWAY, /// ZIGBEEGATEWAY, /// KNXGATEWAY /// public string gatewayType = ""; /// /// 住宅ID /// public string homeId = ""; /// /// /// public string mac = ""; /// /// /// public string primaryKey = ""; /// /// /// public string encryptionType = ""; /// /// 子网号 /// public int subnetId; /// /// 设备号 /// public int deviceId; /// /// 网关状态 /// ON_LINE(0,"在线"), /// OFF_LINE(1,"下线"),; /// public bool gatewayStatus; ///// ///// ///// //public string gwFirmwareVersion; ///// ///// ///// //public string projectName; ///// ///// ///// //public string userName; ///// ///// ///// //public string groupName; ///// ///// ///// //public string gatewayName; } #endregion #region 解绑网关 /// /// 解绑网关 /// [System.Serializable] public class UntieGatewayObj { /// /// 住宅ID /// public string homeId; /// /// 网关MAC /// public string mac; } #endregion #endregion #region ■ 备份相关 ____________________________ /// /// 更新文件夹名字 /// /// [System.Serializable] public class BackupFolderCreateObj { /// /// 备份分类 0:交互工程备份 1:自定义工程备份 2:用户自动备份 3:用户自定义备份 [填写 0~3] /// public string backupClassify = string.Empty; /// /// 备份数据分类 /// public string backupDataType = string.Empty; /// /// 住宅 ID /// public string homeId; /// /// APP备份文件夹名字 /// public string folderName; } [System.Serializable] public class BackupFolderCreateRes { /// /// 文件夹id /// public string id; ///// ///// ///// //public string homeId; ///// ///// ///// //public string backupDataType; ///// ///// ///// //public string backupClassify; /// /// 文件夹名字 /// public string folderName; ///// ///// ///// //public int backupUtcTime; ///// ///// ///// //public int createonutc; } /// /// 备份列表名的信息 /// /// [System.Serializable] public class BackupListNameInfoRes { /// /// 文件夹 ID /// public string id; /// /// 住宅 ID /// public string homeId; /// /// backupDataType /// public string backupDataType = string.Empty; /// /// backupClassify /// public string backupClassify; /// /// backupClassify /// public string folderName = string.Empty; /// /// backupUtcTime /// public string backupUtcTime; ///// ///// createonutc ///// //public string createUtcTime; } /// /// 更新文件夹名字 /// /// [System.Serializable] public class UpdateBackupObj { ///// ///// 备份分类 0:交互工程备份 1:自定义工程备份 2:用户自动备份 3:用户自定义备份 [填写 0~3] ///// //public string backupClassify = string.Empty; ///// ///// 备份数据分类 ///// //public string backupDataType = string.Empty; /// /// 住宅 ID /// public string homeId; /// /// APP备份文件夹名字 /// public string folderName; /// /// 文件夹 id /// public string folderId; } /// /// 单个备份文件信息 /// [System.Serializable] public class BackupFileInfoRes { /// /// 文件主键 id /// public string id; /// /// 文件夹主键 id /// public string backupFolderId; /// /// 手机号住宅的文件名称 /// public string fileName; ///// ///// ///// //public long createUtcTime; } /// /// 查找所有文件 或者 删除备份文件夹 /// [System.Serializable] public class BackupFolderIdObj { /// /// 文件夹主键 id /// public string folderId; /// /// 住宅ID /// public string homeId; } /// /// 下载备份 /// [System.Serializable] public class BackupFileDownObj { /// /// 文件夹主键 id /// public string folderId; /// /// 文件id /// public string fileId; /// /// 住宅ID /// public string homeId; } #endregion #region ■ 子账号相关 ____________________________ #region 添加、查询、删除子账号 /// /// ChildBaseObj /// [System.Serializable] public class ChildBaseObj { /// /// 子账号ID childAccountId /// public string childAccountId; /// /// 住宅 /// public string homeId; } /// /// 添加子账号 /// [System.Serializable] public class ChildAddObj { /// /// /// public string homeId; /// /// 子用户的电话或者邮箱 /// public string account; /// /// 子账户类型 ORDINARY、DEBUG、ADMIN /// public string childAccountType; ///// ///// 是否允许远程控制 0:允许 1:不允许 ///// //public bool isRemoteControl = true; /// /// 子账号昵称 /// public string nickName; } /// /// 删除子账号 /// [System.Serializable] public class ChildDeleteObj : ChildBaseObj { } /// /// HomeIdObj /// [System.Serializable] public class HomeIdObj { /// /// 住宅ID /// public string homeId; } /// /// 更新子账号备注名字 /// [System.Serializable] public class UpdateChildNickNameObj : ChildBaseObj { /// /// nickName /// public string nickName; } /// /// 更新远程控制 /// [System.Serializable] public class UpdateRemoteObj : ChildBaseObj { /// /// 是否允许远程控制 /// public bool isRemoteControl; /// /// 子账户类型 ORDINARY、DEBUG、ADMIN /// public string childAccountType; } /// /// 修改是否允许创建场景 /// [System.Serializable] public class UpdateChildAllowCreateSceneObj : ChildBaseObj { /// /// 是否允许创建场景 /// public bool isAllowCreateScene; } /// /// /// [System.Serializable] public class AccountObj { /// /// 账号 /// public string account; } #endregion #region 数据分享 /// /// 查询某住宅某子账号的分享文件信息 /// [System.Serializable] public class HomeShareFindAll : ChildBaseObj { } /// /// 查询某住宅某子账号的分享文件信息 /// [System.Serializable] public class ChildShareFileInfoRes { /// /// 主键ID /// public string id; /// /// 住宅ID /// public string homeId; /// /// 子账号ID /// public string childAccountId; /// /// 文件名 /// public string fileName; /// /// 创建时间 /// public string createTime; } /// /// 下载分享 /// [System.Serializable] public class ShareFileDownObj { /// /// 住宅ID /// public string homeId; /// /// 分享文件id /// public string homeShareId; } #endregion #endregion #region ■ GetMqttRemoteInfo ____________________________ [Serializable] public class GetMqttRemoteInfoObj { /// /// 平台标示 ClientId账号拼接用 /// public string attachClientId; /// /// 住宅类型 1.ZIGBEE 2.BUSPRO 3.A 4.ALL /// public string homeType; } #endregion #region ■ 推送相关 ____________________________ public class AddpushinfoObj { /// /// /// public string deviceName; /// /// Android、IOS、WinPhone /// public string deviceType; /// /// /// public bool produce = true; /// /// 推送ID /// public string pushToken; /// /// 软件来源,Evoyo、ON、ON_Plus /// public string software = SoftwareType.ON_Plus.ToString(); } /// /// /// [System.Serializable] public class PushIdObj { /// /// /// public string pushId; } /// /// /// [System.Serializable] public class GetMessageListObj : PushIdObj { /// /// 住宅主键id /// 1、传空查询全部(需要根据用户域名查询) 2、传指定住宅ID查询指定记录 (需要根据住宅域名查询) /// public string homeId; /// /// "":全部;Default:分享与功能;Alarm:报警类;Prompt:系统消息 /// public string pushType; } /// /// 消息记录Id /// [System.Serializable] public class PushMsgIdObj { /// /// 消息记录Id /// public string msgId; } #endregion /// /// 手机区号 /// [System.Serializable] public class AreaCodeRes { /// /// /// public string Name; /// /// /// public string Code; /// /// /// public string Id; } /// /// AppNameObj /// [System.Serializable] public class AppNameObj { /// /// 软件来源,Evoyo、ON、ON_Plus /// public string appName = SoftwareType.ON_Plus.ToString(); } #region APP版本检测 /// /// AppVersionCheckObj /// [System.Serializable] public class AppVersionCheckObj { /// /// /// public string version = MainPage.VersionString; /// /// 软件来源,Evoyo、ON、ON_Plus /// public string appName = SoftwareType.ON_Plus.ToString(); } /// /// /// [System.Serializable] public class AppVersionRes { /// /// 应用市场名称 /// public string appMarket; /// /// app名称 /// public string appName; /// /// ios下载地址 /// public string iosUrl; /// /// 安卓下载地址 /// public string androidUrl; /// /// 是否是强制更新 /// public bool isEnforce; /// /// 发布系统,IOS、Android /// public string releaseSystem; /// /// 备注 /// public string remark; /// /// 更新说明json,多语言有客户端解析 /// public string updateDescription; /// /// 版本号 /// public string version; } /// /// 更新说明json,多语言有客户端解析 /// public class ReasonStrJson { /// /// 中文 /// public string Chinese; /// /// 英文 /// public string English; /// /// /// public string Czech; } /// /// 检测更新返回字段 /// public class UpdateDialogInfo { ///// ///// 需要强制更新 ///// //public bool IsNeedForceUpdate; /// /// 1.提示更新的内容 /// 2.强制更新原因 /// 3.提示的通知内容 /// public string ReasonStr; /// /// O 不需要更新 /// 1 提示更新 /// 2 强制更新 /// 3 提示通知内容 /// public int UpdateType; /// /// 当前新版本号 /// public string NewVersion; /// /// 当前新版本号 /// public string NewVersionUrl; } ///// ///// 检测APP版本 响应参数 ///// 如果是iOS返回iOS的最新版本和Url下载地址 ///// 如果是Android返回iOS的最新版本和Url下载地址 ///// //public class APPVersion //{ // /// // /// 当前最新的版本号 // /// // public string NewVersion; // /// // /// 当前最新版本下载地址 // /// // public string NewVersionUrl; //} #endregion #region 数据分享 ///// ///// 添加分享 ///// //[System.Serializable] //public class ShareData //{ // /// // /// 住宅ID // /// // public int homeId; // /// // /// // /// // public List shareDatas; // /// // /// 子账号ID // /// // public List childAccountIds; //} /// /// 添加分享 /// [System.Serializable] public class AddShareObj { /// /// 住宅ID /// public string homeId; /// /// /// public List shareDatas; /// /// 子账号ID /// public List childAccountIds; } /// /// /// public class ShareData { /// /// 分享类型表id /// public string shareTypeId; /// /// 子帐号ID /// public string childAccountId; /// /// 分享类型 1.ROOM 2.DEVICE 3.SCENE /// public string shareType = "DEVICE"; } /// /// 删除分享 /// [System.Serializable] public class DeleteShareObj { /// /// 住宅ID /// public string homeId; /// /// /// public List shareDatas; } /// /// 获取分享 /// [System.Serializable] public class GetShareObj { /// /// 住宅ID /// public string homeId; /// /// 子账号ID /// public string childAccountId; ///// ///// 分享类型 1.ROOM 2.DEVICE 3.SCENE ///// 不传默认查全部 ///// //public string shareType = "DEVICE"; } #endregion #region 图片上传下载 /// /// 上传图片 /// [System.Serializable] public class UploadImageObj { /// /// 前缀标识 /// public string prefix; /// /// 关联ID /// public string uid; /// /// 文件名称 /// public string fileName; /// /// 图片二进制流 /// public byte[] content; } /// /// 查询图片路径 /// [System.Serializable] public class GetImageUrlObj { /// /// 图片下载路径标识 /// public string imageKey; } #endregion #endregion /// /// 极光推送消息 /// [System.Serializable] public class JPushMessageInfo { /// /// 住宅ID /// public string HomeId; /// /// 推送标题 /// public string Title; /// /// 推送内容 /// public string Content; /// /// 推送附加数据 /// public string Extras; /// /// 信息类型 /// public string messageType = ""; /// /// 扩展数据内容 /// public string expantContent = ""; } /// /// 极光推送消息 /// [System.Serializable] public class JPushExpandData { /// /// 附加内容 /// public string expandData; } /// /// 极光推送消息 /// [System.Serializable] public class ExpandData { /// /// 住宅ID /// public string homeId; /// /// 附加内容 /// public string expantContent; /// /// 信息类型 /// public string messageType; } /// /// 萤石云子账号token /// [System.Serializable] public class EZChildAccessToken { /// /// token /// public string accessToken; /// /// 过期时间 /// public string expireTime; } #region 音箱 /// /// 获取音箱列表 /// [System.Serializable] public class GetSpeakerObj : HomeIdObj { /// /// 平台名称 /// public string platformName; /// /// 页面大小 /// public int pageSize = 100; /// /// 页面序号 /// public int pageNo = 1; } [System.Serializable] public class SpeakerObj : HomeIdObj { /// /// 记录的主键id /// public string tokenId; } /// /// 更新音箱备注 /// [System.Serializable] public class UpdateSpeakerRemarkObj : SpeakerObj { /// /// 备注 /// public string remark; } /// /// 获取音箱分配的设备和场景列表 /// [System.Serializable] public class GetSpeakerDeviceListObj : HomeIdObj { /// /// 记录的主键id /// public string tokenId; } /// /// 配置的语音设备和场景数据 /// [System.Serializable] public class SpeakerTargetInfo { /// /// 控制的目标Id,云端的设备Id或者场景Id /// public string targetId; /// /// 是否是设备,场景为false /// public bool isDevice; /// /// 目标名称 /// public string targetName; /// /// 扩展参数当前rowview是否选中 /// public bool IsSelect; } //[System.Serializable] //public class SpeakerTargetInfoRow: SpeakerTargetInfo //{ // /// // /// 当前rowview是否选中 // /// // public bool isSelect; //} /// /// 更新音箱控制的设备和场景目标 /// [System.Serializable] public class UpdateSpeakerDeviceListObj : SpeakerObj { /// /// 备注 /// public List targetInfos; } /// /// 更新音箱控制的设备和场景目标 /// [System.Serializable] public class SpeakerListRes { /// /// 音箱列表 /// public List list; } /// /// 音箱信息 /// [System.Serializable] public class SpeakerInfo { /// /// /// public string platformName { get; set; } /// /// /// public string remark { get; set; } /// /// /// public string tokenId { get; set; } /// /// /// public string userId { get; set; } /// /// /// public string userRegion { get; set; } /// /// /// public string homeId { get; set; } /// /// /// public string homeRegion { get; set; } } #endregion //#region 旧接口 ///// ///// ///// //public class FindCityObj //{ // /// // /// 城市ID // /// // public string Cid; // /// // /// // /// // public string Location; // /// // /// 城市 // /// // public string City; // /// // /// // /// // public string Province; // /// // /// // /// // public string Country; // /// // /// // /// // public string TimeZone; //} ///// ///// ///// //public class GetWeatherObj //{ // public string Temperature; // /// // /// // /// // public string Humidity; // /// // /// // /// // public string PM25; // /// // /// // /// // public string Weather; //} //#endregion }