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; } #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; } /// /// 更新个人信息 /// [System.Serializable] public class UpdateMemberNameRes { /// /// 用户昵称 /// public string memberName; } /// /// 绑定认证(手机/邮箱) /// [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; } [Serializable] public class AddOrUpdateHomeObj { /// /// /// public string homeId; /// /// /// public string homeType; /// /// /// public double latitude; /// /// /// public double longitude; /// /// 住宅名称 /// public string homeName; } //[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 { /// /// 网关 /// public string id; /// /// 住宅ID /// public string homeId; /// /// /// public string untieMark; /// /// /// public string gwFirmwareVersion; /// /// /// public string mac; /// /// /// public string projectName; /// /// /// public string userName; /// /// /// public string groupName; /// /// /// public string gatewayName; /// /// /// public string primaryKey; /// /// /// public string aesKey; /// /// /// public string encryptionType; /// /// /// public string gatewayType; /// /// 子网号 /// public int subnetId; /// /// 设备号 /// public int deviceId; } #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 添加、查询、删除子账号 /// /// 添加子账号 /// [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 { /// /// /// public string childAccountId; /// /// 住宅 /// public string homeId; } /// /// HomeIdObj /// [System.Serializable] public class HomeIdObj { /// /// 住宅ID /// public string homeId; } //获取项目 (住宅)下面的子账号 /// /// 获取成员信息的结果 /// /// [Serializable] public class SubAccountNewRes { /// /// /// public string id; /// /// /// public string homeId; /// /// /// public string homeRegionId; /// /// /// public string childAccountId; /// /// /// public string childAccountRegionId; /// /// 子账户类型 ORDINARY、DEBUG、ADMIN /// public string childAccountType; /// /// 是否允许远程控制 /// public bool isRemoteControl; /// /// 昵称1 /// public string nickName; /// /// /// public string createTime; } /// /// 更新远程控制 /// [System.Serializable] public class UpdateRemoteObj { /// /// 子账号ID /// public string childAccountId; /// /// 住宅 /// public string homeId; /// /// 是否允许远程控制 /// public bool isRemoteControl; /// /// 子账户类型 ORDINARY、DEBUG、ADMIN /// public string childAccountType; } #endregion #region 数据分享 /// /// 查询某住宅某子账号的分享文件信息 /// [System.Serializable] public class HomeShareFindAll { /// /// 住宅ID /// public string homeId; /// /// 子账号id /// public string childAccountId; } /// /// 查询某住宅某子账号的分享文件信息 /// [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; /// /// /// public string deviceType; /// /// /// public bool produce = true; /// /// 推送ID /// public string pushid; /// /// 1是HDL_ON、2HDL_Zigbee /// //public string software = MainPage.RequestSource; public string software = "HDL_ON"; } [System.Serializable] public class PushserivceIdObj { /// /// /// public string id; } ///// ///// 推送消息列表 ///// //[System.Serializable] //public class PushMesInfoRes //{ // /// // /// // /// // public string pushId; // /// // /// // /// // public string pushTitle; // /// // /// // /// // public string pushContent; // /// // /// // /// // public string pushType; // /// // /// // /// // public bool isRead; // /// // /// // /// // public string pushDatetime; //} #endregion /// /// 手机区号 /// [System.Serializable] public class AreaCodeRes { /// /// /// public string Name; /// /// /// public string Code; /// /// /// public string Id; } #endregion #region ■ 枚举 ____________________________ /// /// 客户端类型 如HdlOn、EvoyoHome、调试宝 /// public enum APIClientType { HdlOn, EvoyoHome, 调试宝, } /// /// 备份类型 /// public enum BackupClassify { /// /// 交互备份 /// INTERACTIVE_ENGINEERING_BACKUP, /// /// 自定义工程备份 /// CUSTOM_PROJECT_BACKUP, /// /// 用户自动备份 /// AUTOMATIC_USER_BACKUP, /// /// 用户自定义备份 /// USER_DEFINED_BACKUP } /// /// BackupDataType /// public enum BackupDataType { HDL_ON, ZIGBEE, ZIGBEE_HOME, HDL_ON_PRO, BUSPRO } /// /// 住宅类型 /// public enum HomeTypeEnum { ZIGBEE = 1, BUSPRO, A, ALL } /// /// 语言类型 /// public enum LanguageTypeEnum { CHINESE, ENGLISH, } /// /// 发送验证码功能类型 /// public enum VerifyType { /// /// 用户注册 /// REGISTER_USER = 1, /// /// 忘记密码,找回密码 /// FIND_PASSWORD, /// /// 绑定 /// REGISTER_USER_SYSTEM, /// /// 验证码登陆 /// VERIFY_LOGIN, /// /// 敏感数据验证 /// SENSITIVE_DATA, } /// /// ChildAccountType /// public enum ChildAccountType { /// /// 主账号自己(本人) /// MYSELF = 0, /// /// 普通 /// ORDINARY = 1, /// /// 调试人员 /// DEBUG, /// /// 管理员 /// ADMIN, } #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 }