RQUserModel.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // RQUserModel.m
  3. // RQCommon
  4. //
  5. // Created by 张嵘 on 2018/11/16.
  6. // Copyright © 2018 张嵘. All rights reserved.
  7. //
  8. #import "RQUserModel.h"
  9. @implementation AccountInfoItem
  10. @end
  11. @implementation LoginBindInfosItem
  12. + (NSDictionary *)modelCustomPropertyMapper {
  13. return @{
  14. @"_id" : @"id",
  15. };
  16. }
  17. @end
  18. @implementation ParamsItem
  19. @end
  20. @implementation SchInfo
  21. + (NSDictionary *)modelCustomPropertyMapper {
  22. return @{
  23. @"_id" : @"id",
  24. };
  25. }
  26. @end
  27. @implementation RQUserModel
  28. // 返回容器类中的所需要存放的数据类型 (以 Class 或 Class Name 的形式)。
  29. + (NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass {
  30. return @{
  31. @"accountInfo" : [AccountInfoItem class],
  32. @"params" : [ParamsItem class],
  33. @"schInfo" : [SchInfo class],
  34. @"loginBindInfos" : [LoginBindInfosItem class],
  35. };
  36. }
  37. + (NSDictionary *)modelCustomPropertyMapper {
  38. return @{
  39. @"_id" : @"id",
  40. @"a_c" : @"a c",
  41. };
  42. }
  43. - (void)updatePxjdWithPxjd:(NSString *)pxjd {
  44. self.pxjd = pxjd;
  45. /// 存储用户数据
  46. [RQ_USER_MANAGER saveUser:self];
  47. }
  48. - (void)updateNickNameWithNickName:(NSString *)nickName {
  49. self.nickName = nickName;
  50. /// 存储用户数据
  51. [RQ_USER_MANAGER saveUser:self];
  52. }
  53. - (void)updateSchInfoWithSchInfo:(SchInfo *)schInfo {
  54. self.schInfo = schInfo;
  55. /// 存储用户数据
  56. [RQ_USER_MANAGER saveUser:self];
  57. }
  58. @end