New file |
| | |
| | | using System; |
| | | using System.Collections; |
| | | |
| | | namespace Shared.Common |
| | | { |
| | | public class SendDataToServer |
| | | { |
| | | #region IsExistingAccount 验证账号是否被使用 功能描述:验证手机和邮箱是否被注册 |
| | | [System.Serializable] |
| | | public class IsExistingAccountReqDto |
| | | { |
| | | public IsExistingAccountObj ReqDto; |
| | | |
| | | public IsExistingAccountReqDto() |
| | | { |
| | | this.ReqDto = new IsExistingAccountObj(); |
| | | } |
| | | } |
| | | [System.Serializable] |
| | | public class IsExistingAccountObj |
| | | { |
| | | public string Account; |
| | | } |
| | | #endregion |
| | | |
| | | #region GetAreaCode 获取国家或者地区代码列表 列如中国大陆86-暂时不需要传参-但是为了网路请求方法的统一,参数不能为空 |
| | | public class GetAreaCodeOBJ |
| | | { |
| | | public string RequestVersion; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region LoginValidCode 使用验证码登录(不需要加00和区号,直接手机号就行) |
| | | [System.Serializable] |
| | | public class LoginValidCodeOBJ |
| | | { |
| | | public string Account; |
| | | public string Code; |
| | | public string Language; |
| | | public int AreaCode; |
| | | } |
| | | #endregion |
| | | |
| | | #region SignPhone 功能描述:发送手机验证 --海外的需要加上00和区号 |
| | | [System.Serializable] |
| | | public class SignPhoneReqDto |
| | | { |
| | | public RegisterSendVerCodeObj ReqDto; |
| | | |
| | | public SignPhoneReqDto() |
| | | { |
| | | this.ReqDto = new RegisterSendVerCodeObj(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 邮箱和手机发送 --注册 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RegisterSendVerCodeObj |
| | | { |
| | | /// <summary> |
| | | /// 之前为Phone 分布式后改为Account |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4 |
| | | /// 邮箱填0 |
| | | /// </summary> |
| | | public int Company =0; |
| | | /// <summary> |
| | | /// 使用的语言 |
| | | /// </summary> |
| | | public string Language; |
| | | /// <summary> |
| | | /// 国家地区代码,手机号发送验证码时使用 邮箱填0 |
| | | /// </summary> |
| | | public int AreaCode=0; |
| | | } |
| | | /// <summary> |
| | | /// 登录或者重置密码发送验证码 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class LoginSendVerCodeObj |
| | | { |
| | | /// <summary> |
| | | /// 之前为Phone 分布式后改为Account |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4 |
| | | /// 邮箱填0 |
| | | /// </summary> |
| | | public int Company = 0; |
| | | /// <summary> |
| | | /// 使用的语言 |
| | | /// </summary> |
| | | public string Language; |
| | | /// <summary> |
| | | /// 国家地区代码,手机号发送验证码时使用 邮箱填0 |
| | | /// </summary> |
| | | public int AreaCode = 0; |
| | | } |
| | | #endregion |
| | | |
| | | #region ValidatorCode 功能描述:验证验证码 |
| | | /// <summary> |
| | | /// 验证验证码 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ValidatorCodeObj |
| | | { |
| | | /// <summary> |
| | | /// 之前为Phone 分布式后改为Account |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 验证码 |
| | | /// </summary> |
| | | public string Code; |
| | | /// <summary> |
| | | /// 使用的语言 |
| | | /// </summary> |
| | | public string Language; |
| | | /// <summary> |
| | | /// 国家地区代码,手机号发送验证码时使用 |
| | | /// </summary> |
| | | public int AreaCode; |
| | | } |
| | | #endregion |
| | | |
| | | #region 用户注册 功能描述:手机和邮箱注册 |
| | | /// <summary> |
| | | /// 手机和邮箱注册--此前不需要单独验证验证码 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class RegisterAccountObj |
| | | { |
| | | /// <summary> |
| | | /// 用户账户 |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 用户密码(不加密) |
| | | /// </summary> |
| | | public string Password; |
| | | /// <summary> |
| | | /// 确认用户密码 |
| | | /// </summary> |
| | | public string EnterPassword; |
| | | /// <summary> |
| | | /// 用户语言 用于查询当前用户所使用的语言 |
| | | /// 语言 (固定为:Chinese和English) |
| | | /// </summary> |
| | | public string Language; |
| | | /// <summary> |
| | | /// 验证码 |
| | | /// </summary> |
| | | public string Code; |
| | | /// <summary> |
| | | /// RegisterSoruce 注册来源:0:注册来自ON 软件 1:注册来自Zigbee |
| | | ///默认值: 0 |
| | | /// </summary> |
| | | public int RegisterSoruce; |
| | | /// <summary> |
| | | /// The area code.国家或者地区代码 列如中国大陆 86 |
| | | /// </summary> |
| | | public int AreaCode; |
| | | } |
| | | #endregion |
| | | |
| | | #region Login 用户登录 功能描述:登录后获取访问令牌。 |
| | | [System.Serializable] |
| | | public class LoginReqDto |
| | | { |
| | | public LoginObj ReqDto; |
| | | |
| | | public LoginReqDto() |
| | | { |
| | | this.ReqDto = new LoginObj(); |
| | | } |
| | | } |
| | | [System.Serializable] |
| | | public class LoginObj |
| | | { |
| | | /// <summary> |
| | | /// RequestVersion |
| | | /// </summary> |
| | | public string RequestVersion = CommonPage.RequestVersion; |
| | | /// <summary> |
| | | /// 用户账户 |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 用户密码(请使用32为MD5加密后转大写) |
| | | /// </summary> |
| | | public string Password; |
| | | /// <summary> |
| | | /// 登录来源,0:Zigbee |
| | | /// </summary> |
| | | public string RequestSource = "0"; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region 第三方登录 |
| | | |
| | | |
| | | /// <summary> |
| | | /// 添加或者更新微信授权登录信息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AuthUser |
| | | { |
| | | /// <summary> |
| | | /// 第三方token |
| | | /// </summary> |
| | | public string AccessToken; |
| | | /// <summary> |
| | | /// 刷新token |
| | | /// </summary> |
| | | public string RefreshToken; |
| | | /// <summary> |
| | | ///第三方用户唯一标识 |
| | | /// </summary> |
| | | public string OpenID; |
| | | /// <summary> |
| | | /// 用户昵称 |
| | | /// </summary> |
| | | public string UserName; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 第三方绑定账号 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class BindAuthUser |
| | | { |
| | | /// <summary> |
| | | /// 账号的Id |
| | | /// </summary> |
| | | public string AccountGuid; |
| | | /// <summary> |
| | | ///第三方用户唯一标识 |
| | | /// </summary> |
| | | public string OpenID; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ForgetPasswordAction 功能描述:忘记密码,手机号找回密码方法 |
| | | /// <summary> |
| | | /// 忘记密码 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ForgetPasswordObj |
| | | { |
| | | /// <summary> |
| | | /// 之前为Phone 分布式后改为Account |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4 |
| | | /// 邮箱填0 |
| | | /// </summary> |
| | | public int Company; |
| | | /// <summary> |
| | | /// 使用的语言 |
| | | /// </summary> |
| | | public string Language; |
| | | /// <summary> |
| | | /// 国家地区代码,手机号发送验证码时使用 邮箱填0 |
| | | /// </summary> |
| | | public int AreaCode; |
| | | } |
| | | /// <summary> |
| | | /// 重置密码 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ResetPasswordObj |
| | | { |
| | | /// <summary> |
| | | /// 之前为Phone 分布式后改为Account |
| | | /// </summary> |
| | | public string Account; |
| | | /// <summary> |
| | | /// 新密码 |
| | | /// </summary> |
| | | public string Password; |
| | | /// <summary> |
| | | /// 确认密码 |
| | | /// </summary> |
| | | public string AgainPassword; |
| | | /// <summary> |
| | | /// 国家地区代码,手机号发送验证码时使用 邮箱填0 |
| | | /// </summary> |
| | | public int AreaCode=0; |
| | | } |
| | | #endregion |
| | | |
| | | #region ForgetPassword 功能描述:根据账号类型发送验证方式(邮箱账号发送邮件,手机账号发送短信验证码) |
| | | [System.Serializable] |
| | | public class ForgetPasswordReqDto |
| | | { |
| | | public ForgetPasswordObj ReqDto; |
| | | |
| | | public ForgetPasswordReqDto() |
| | | { |
| | | this.ReqDto = new ForgetPasswordObj(); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region UpdatePassword 修改密码 功能描述:修改当前账号的密码 |
| | | /// <summary> |
| | | /// Need Authorization |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class UpdatePasswordObj |
| | | { |
| | | public string OldPassword;// |
| | | public string Password;// |
| | | } |
| | | #endregion |
| | | |
| | | #region ResidenceList 获取用户的住宅区域列表 功能描述:获取用户所有住宅区域的列表 |
| | | [System.Serializable] |
| | | public class ResidenceListReqDto |
| | | { |
| | | public string RequestVersion; |
| | | public ResidenceListObj ReqDto; |
| | | |
| | | public ResidenceListReqDto() |
| | | { |
| | | this.ReqDto = new ResidenceListObj(); |
| | | } |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class ResidenceListObj |
| | | { |
| | | public string LoginAccessToken; |
| | | public ResidenceListPageSettingObj PageSetting; |
| | | public ResidenceListObj() |
| | | { |
| | | this.PageSetting = new ResidenceListPageSettingObj(); |
| | | } |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class ResidenceListPageSettingObj |
| | | { |
| | | public int PageSize; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region AddResidence 添加住宅 功能描述:添加住宅名称 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class AddResidenceObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string Name;//住宅名称 -->键名 : Name |
| | | } |
| | | #endregion |
| | | |
| | | #region EditResidence 编辑住宅 功能描述:编辑住宅信息 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class EditResidenceObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键 -->键名 : Id |
| | | public string Name;//住宅名称 -->键名 : Name |
| | | } |
| | | #endregion |
| | | |
| | | #region DeleteResidence 删除整个住宅区域 功能描述:删除整个住宅区域 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DeleteResidenceObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键 -->键名 : Id |
| | | } |
| | | #endregion |
| | | |
| | | #region DeleteResidence 获取住宅中网关 功能描述:获取某个住宅中的网关 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetSingleZigbeeResidenceGatewayReqDto |
| | | { |
| | | public string RequestVersion;// 原密码 string 是 |
| | | |
| | | public GetSingleZigbeeResidenceGatewayObj ReqDto; |
| | | |
| | | public GetSingleZigbeeResidenceGatewayReqDto() |
| | | { |
| | | this.ReqDto = new GetSingleZigbeeResidenceGatewayObj(); |
| | | } |
| | | } |
| | | [System.Serializable] |
| | | public class GetSingleZigbeeResidenceGatewayObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键 -->键名 : Id |
| | | } |
| | | #endregion |
| | | |
| | | #region DeleteResidence 绑定网关到住宅 功能描述:绑定网关到住宅 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class BindGatewayToZigbeeHomeObj |
| | | { |
| | | public string RequestVersion;// App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键 -->键名 : ZigbeeHomeId |
| | | |
| | | public ArrayList BindGateways = new ArrayList(); |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class BindGatewayObj |
| | | { |
| | | public string ZigbeeUniqueId; |
| | | } |
| | | #endregion |
| | | |
| | | #region DeleteResidence 解绑网关 功能描述:解绑住宅中的网关 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ReleaseGatewayToZigbeeHomeObj |
| | | { |
| | | public string RequestVersion;// App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键 -->键名 : ZigbeeHomeId |
| | | public ArrayList BindGateways = new ArrayList(); |
| | | } |
| | | #endregion |
| | | |
| | | #region GatewayByRegionList 读取用户指定区域网关列表 功能描述:读取当前用户指定区域的所有网关 |
| | | /// <summary> |
| | | /// Need Authorization |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GatewayByRegionListObj |
| | | { |
| | | public int RegionID;// 住宅区域编号 int 是 |
| | | } |
| | | #endregion |
| | | |
| | | #region UploadDataBack 数据备份 - App上传和更新某个家数据备份文件 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class UploadDataBackObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键(通过[获取住宅分页]接口获取) -->键名 : ZigbeeHomeId |
| | | public string BackupFileName;//备份文件名称(请注意唯一性,相同的文件会更新,不同的文件会添加) -->键名 : BackupFileName |
| | | public byte [] BackupContent;//备份文件内容(请把二进制转成字符串) -->键名 : BackupContent |
| | | } |
| | | #endregion |
| | | |
| | | #region DownloadSingleHomeDataBack 数据备份 - App下载某个住宅下一个或者多个备份文件_列表 |
| | | /// <summary> |
| | | /// 获取区域下的备份列表目录 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetReisdenceFolderObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public int Ids;//备份文件唯一Id数组(可下载多个) -->键名 : Ids |
| | | } |
| | | #endregion |
| | | |
| | | #region DelDataBackObj 数据备份 - App删除某个家某个备份数据文件 |
| | | /// <summary> |
| | | /// Need Authorzation |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class DelDataBackObj |
| | | { |
| | | public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion |
| | | public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken |
| | | public string HomeId;//住宅主键(通过[获取住宅分页]接口获取) -->键名 : ZigbeeHomeId |
| | | //有问题:应该删除唯一的文件ID |
| | | public string BackupFileName;//备份文件名称(请注意唯一性,相同的文件会更新,不同的文件会添加) -->键名 : BackupFileName |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 备份文件夹里面的文件目录 |
| | | /// </summary> |
| | | public class UserBackupListObj |
| | | { |
| | | public int LevelID; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取备份文件数据 |
| | | /// return 二进制流数据 |
| | | /// </summary> |
| | | public class BackupDetailObj |
| | | { |
| | | public int Id; |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取Android apk |
| | | /// <summary> |
| | | /// 获取Android apk |
| | | /// </summary> |
| | | public class GetAndroidApkInfoOBJ |
| | | { |
| | | public string RequestVersion; |
| | | /// <summary> |
| | | /// Name 搜索固件名称(apk、APP名称) |
| | | /// </summary> |
| | | public string Name; |
| | | } |
| | | #endregion |
| | | |
| | | #region 下载apk |
| | | /// <summary> |
| | | /// 下载安卓apk |
| | | /// </summary> |
| | | public class DownLoadAndroidApk |
| | | { |
| | | public string RequestVersion; |
| | | /// <summary> |
| | | /// 下载固件的唯一标识 |
| | | /// </summary> |
| | | public string DistributedMark; |
| | | } |
| | | #endregion |
| | | |
| | | #region 登录时添加设备的RegId |
| | | /// <summary> |
| | | /// 登录时添加设备的RegId |
| | | /// </summary> |
| | | public class SignZigbeeNeedPushRegIDObj |
| | | { |
| | | /// <summary> |
| | | /// 请填入从极光获取的RegId / iOS获取系统的设备id |
| | | /// </summary> |
| | | public string RegID; |
| | | /// <summary> |
| | | /// 请填入获取的设备的别名 |
| | | /// </summary> |
| | | public string DeviceAlias; |
| | | /// <summary> |
| | | /// 请填入设备的类型,只能为【iphone】和【android】 |
| | | /// </summary> |
| | | public string DeviceType; |
| | | /// <summary> |
| | | /// 3:Evoyo Home |
| | | /// </summary> |
| | | public int Software = 3; |
| | | } |
| | | #endregion |
| | | |
| | | #region 定时上传实时GPS信息 |
| | | /// <summary> |
| | | /// 定时上传实时GPS信息 |
| | | /// </summary> |
| | | public class ReceiveAppLatAndLonObj |
| | | { |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | | public string Latitude; |
| | | /// <summary> |
| | | /// 纬度 |
| | | /// </summary> |
| | | public string Longitude; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 极光推送消息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class JPushMessageInfo |
| | | { |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string HomeId; |
| | | /// <summary> |
| | | /// 推送标题 |
| | | /// </summary> |
| | | public string Title; |
| | | /// <summary> |
| | | /// 推送内容 |
| | | /// </summary> |
| | | public string Content; |
| | | /// <summary> |
| | | /// 推送附加数据 |
| | | /// </summary> |
| | | public string Extras; |
| | | /// <summary> |
| | | /// 信息类型 |
| | | /// </summary> |
| | | public string messageType = ""; |
| | | /// <summary> |
| | | /// 扩展数据内容 |
| | | /// </summary> |
| | | public string expantContent = ""; |
| | | /// <summary> |
| | | /// spk标志,值为door.gate时表示自研 |
| | | /// </summary> |
| | | public string spk = ""; |
| | | /// <summary> |
| | | /// sip账号 |
| | | /// </summary> |
| | | public string sipAccount; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 极光推送消息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class JPushExpandData |
| | | { |
| | | /// <summary> |
| | | /// 附加内容 |
| | | /// </summary> |
| | | public string expandData; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 极光推送消息 |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ExpandData |
| | | { |
| | | /// <summary> |
| | | /// 住宅ID |
| | | /// </summary> |
| | | public string homeId; |
| | | /// <summary> |
| | | /// 附加内容 |
| | | /// </summary> |
| | | public string expantContent; |
| | | /// <summary> |
| | | /// 信息类型 |
| | | /// </summary> |
| | | public string messageType; |
| | | } |
| | | |
| | | } |
| | | } |