NewTopicModel.m 1.0 KB

123456789101112131415161718192021222324252627
  1. //
  2. // NewTopicModel.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2019/12/16.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "NewTopicModel.h"
  9. @implementation NewTopicModel
  10. - (instancetype)initWithDict:(NSDictionary *)dict
  11. {
  12. if (self = [super init]) {
  13. self.imageUrl = ISEmpty([dict objectForKey:@"File"]) ? @"" : [dict objectForKey:@"File"];
  14. self.content = ISEmpty([dict objectForKey:@"Text"]) ? @"" : [dict objectForKey:@"Text"];
  15. self.title = ISEmpty([dict objectForKey:@"Title"]) ? @"" : [dict objectForKey:@"Title"];
  16. self.FileName = ISEmpty([dict objectForKey:@"FileName"]) ? @"" : [dict objectForKey:@"FileName"];
  17. self.ArticleImgUrl = ISEmpty([dict objectForKey:@"ArticleImgUrl"]) ? @"" : [dict objectForKey:@"ArticleImgUrl"];
  18. self.AuthorName = ISEmpty([dict objectForKey:@"Author"]) ? @"" : [dict objectForKey:@"Author"];
  19. self.FileId = [[dict objectForKey:@"Id"] integerValue];
  20. self.type = [[dict objectForKey:@"Type"] integerValue];
  21. }
  22. return self;
  23. }
  24. @end