SelectModel.m 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // SelectModel.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/11/23.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "SelectModel.h"
  9. @implementation SelectModel
  10. - (instancetype)initDict:(NSDictionary *)dict
  11. {
  12. if (self) {
  13. self.Nick = ISEmpty(dict[@"Nick"]) ? @"" : [dict objectForKey:@"Nick"];
  14. self.Phone = ISEmpty(dict[@"Phone"]) ? @"" : [dict objectForKey:@"Phone"];
  15. self.ImId = ISEmpty(dict[@"ImId"]) ? @"" : [dict objectForKey:@"ImId"];
  16. self.UserName = ISEmpty(dict[@"Name"]) ? @"" : [dict objectForKey:@"Name"];
  17. self.CreatedDate = ISEmpty(dict[@"CreatedDate"]) ? @"" : [dict objectForKey:@"CreatedDate"];
  18. self.LastModifiedDate = ISEmpty(dict[@"LastModifiedDate"]) ? @"" : [dict objectForKey:@"LastModifiedDate"];
  19. self.AvatarUrl = ISEmpty(dict[@"AvatarUrl"]) ? @"" : [dict objectForKey:@"AvatarUrl"];
  20. self.DepartmentName = ISEmpty(dict[@"DepartmentName"]) ? @"" : [dict objectForKey:@"DepartmentName"];
  21. self.SourceName = ISEmpty(dict[@"SourceName"]) ? @"" : [dict objectForKey:@"SourceName"];
  22. self.Guid = ISEmpty(dict[@"Guid"]) ? 0 : [[dict objectForKey:@"Guid"] integerValue];
  23. self.UserId = ISEmpty(dict[@"Id"]) ? 0 : [[dict objectForKey:@"Id"] integerValue];
  24. self.MiddleId = ISEmpty(dict[@"MiddleId"]) ? 0 : [[dict objectForKey:@"MiddleId"] integerValue];
  25. self.SourceType = ISEmpty(dict[@"SourceType"]) ? 0 : [[dict objectForKey:@"SourceType"] integerValue];
  26. self.SourceId = ISEmpty(dict[@"SourceId"]) ? 0 : [[dict objectForKey:@"SourceId"] integerValue];
  27. self.hasSon = ISEmpty(dict[@"hasSon"]) ? NO : [[dict objectForKey:@"hasSon"] boolValue];
  28. self.hadSelected = ISEmpty(dict[@"hadSelected"]) ? NO : [[dict objectForKey:@"hadSelected"] boolValue];
  29. self.IsDelete = ISEmpty(dict[@"IsDelete"]) ? NO : [[dict objectForKey:@"IsDelete"] boolValue];
  30. self.IsDisable = ISEmpty(dict[@"IsDisable"]) ? NO : [[dict objectForKey:@"IsDisable"] boolValue];
  31. self.Id = ISEmpty(dict[@"Id"]) ? 0 : [[dict objectForKey:@"Id"] integerValue];
  32. }
  33. return self;
  34. }
  35. @end