| 12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // IndustryCategoryModel.m
- // BuguLive
- //
- // Created by qitewei on 2025/8/20.
- // Copyright © 2025 xfg. All rights reserved.
- //
- #import "IndustryCategoryModel.h"
- @implementation IndustryCategoryModel
- - (instancetype)initWithDictionary:(NSDictionary *)dict {
- self = [super init];
- if (self) {
- _categoryId = [dict[@"id"] integerValue];
- _name = dict[@"name"] ?: @"";
- _depositAmount = dict[@"deposit_amount"] ?: @"0.00";
- _commissionRate = dict[@"commission_rate"] ?: @"0.00";
- _createTime = [dict[@"create_time"] doubleValue];
- _createTimeText = dict[@"create_time_text"] ?: @"";
- }
- return self;
- }
- + (NSArray<IndustryCategoryModel *> *)modelsFromArray:(NSArray *)array {
- NSMutableArray *models = [NSMutableArray array];
- for (NSDictionary *dict in array) {
- if ([dict isKindOfClass:[NSDictionary class]]) {
- IndustryCategoryModel *model = [[IndustryCategoryModel alloc] initWithDictionary:dict];
- [models addObject:model];
- }
- }
- return [models copy];
- }
- @end
|