YHUserInfo.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // YHUserInfo.h
  3. // github: https://github.com/samuelandkevin
  4. //
  5. // Created by kun on 16/4/25.
  6. // Copyright © 2016年 HKP. All rights reserved.
  7. // 当前用户Model
  8. #import <Foundation/Foundation.h>
  9. #import "YHUserSetting.h"
  10. #import "YHWorkExperienceModel.h"
  11. #import "YHEducationExperienceModel.h"
  12. //用户手机号
  13. #define kMobilePhone @"mobilePhone"
  14. //税道账号
  15. #define kTaxAccount @"taxAccount"
  16. //是否已经登录过
  17. #define kLoginOAuth @"isOAuth"
  18. //自有平台的uid
  19. #define kUserUid @"userUid"
  20. //令牌
  21. #define kAccessToken @"accessToken"
  22. //令牌登录时间点
  23. #define kAccessTokenDate @"accessTokenDate"
  24. typedef enum : NSUInteger
  25. {
  26. updateFinish = 101,
  27. updateFailure,
  28. } UpdateStatus;
  29. //好友状态
  30. typedef NS_ENUM(int,FriendShipStatus){
  31. FriendShipStatus_NotpassValidtion = 0,//未通过验证
  32. FriendShipStatus_isMyFriend, //是我的好友
  33. FriendShipStatus_Reject //已拒绝
  34. };
  35. //添加好友的状态 (服务器返回:0 别人申请加我为好友 1 我申请加别人为好友 ->解析后 自定义101 别人申请加我为好友 102 我申请加别人为好友)
  36. typedef NS_ENUM(int,AddFriendStatus){
  37. AddFriendStatus_otherPersonAddMe = 101, //别人申请加我为好友
  38. AddFriendStatus_IAddOtherPerson //我申请加别人为好友
  39. };
  40. //身份类型
  41. typedef NS_ENUM(int,IdentityOption){
  42. Identity_NormalUser = 0, //普通用户
  43. Identity_BigName //大咖
  44. };
  45. @interface YHUserInfo : NSObject {
  46. BOOL _isRegister;
  47. }
  48. @property (nonatomic, assign) BOOL isSelfModel; //用户Model是当前用户还是客人
  49. @property (nonatomic, assign) BOOL isRegister; //是否已注册,判断是否是游客
  50. @property (nonatomic, assign) UpdateStatus updateStatus;
  51. @property (nonatomic, copy) NSString *uid;
  52. @property (nonatomic, copy) NSString *accessToken; //令牌
  53. @property (nonatomic, copy) NSString *taxAccount; //税道账号
  54. @property (nonatomic, copy) NSString *mobilephone; //手机号 (可以用手机号/税道账号来登录)
  55. @property (nonatomic, copy) NSString *userName; //姓名
  56. @property (nonatomic, assign) short sex; // 1-男, 0-女
  57. @property (nonatomic, copy) NSURL *avatarUrl; //用户头像缩略图URL
  58. @property (nonatomic, copy) NSURL *oriAvaterUrl; //用户头像原图URL
  59. @property (nonatomic, copy) NSString *intro; //个人简介
  60. @property (nonatomic, copy) NSString *industry; //行业职能
  61. @property (nonatomic, copy) NSString *job; //职位
  62. @property (nonatomic, copy) NSString *province; //省份
  63. @property (nonatomic, copy) NSString *workCity; //工作城市
  64. @property (nonatomic, copy) NSString *workLocation; //工作地点
  65. @property (nonatomic, copy) NSString *loginTime; //登录时间
  66. @property (nonatomic, copy) NSString *company; //公司名称
  67. @property (nonatomic, copy) NSString *email; //电邮
  68. @property (nonatomic, assign) int dynamicCount; //动态数量
  69. @property (nonatomic, copy) NSString *visitTime; //访问时间
  70. /**
  71. * 用户头像,用strong因为修改头像时要保存引用
  72. */
  73. @property (nonatomic, strong) UIImage *avatarImage;
  74. @property (nonatomic, assign) short fromType; //来自哪个平台
  75. @property (nonatomic, assign) BOOL isOfficial; //官方账号
  76. @property (nonatomic, assign) int nNewFansCount; //新粉丝数量
  77. @property (nonatomic, assign) int fansCount; //粉丝数量
  78. @property (nonatomic, assign) int followCount; //关注的人数量
  79. @property (nonatomic, assign) int likeCount; //点赞数量
  80. @property (nonatomic, assign) IdentityOption identity; //身份类型
  81. @property (nonatomic, assign) FriendShipStatus friShipStatus; //好友关系状态
  82. @property (nonatomic, assign) AddFriendStatus addFriStatus; //添加好友的状态 (服务器返回:0 别人申请加我为好友 1 我申请加别人为好友 ->解析后 自定义101 别人申请加我为好友 102 我申请加别人为好友)
  83. @property (nonatomic, assign) BOOL isFollowed; //已经被关注
  84. @property (nonatomic, assign) int photoCount; //用户照片数量
  85. @property (nonatomic, strong) NSMutableArray *photoAlbum; //相册
  86. @property (nonatomic, strong) YHUserSetting *userSetting; //用户设置
  87. @property (nonatomic, strong) NSMutableArray *jobTags; //职位标签
  88. @property (nonatomic, strong) NSMutableArray <YHWorkExperienceModel *> *workExperiences; //工作经历
  89. @property (nonatomic, strong) NSMutableArray <YHEducationExperienceModel *> *eductaionExperiences; //教育经历
  90. @end