| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- // NewCustomerModel
- // IOBSS 2.0
- //
- // Created by 刘瀚璘 on 2017.7.14
- // Copyright 2017 沈阳东科云信软件有限公司. All rights reserved.
- //
- // 系统名称:
- // 功能描述:新增定制品列表Model
- #import "NewCustomerModel.h"
- @implementation NewCustomerModel
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{@"detailID":@"DetailID",
- @"fixedID":@"FixedID",
- @"orderDetailID":@"OrderDetailID",
- @"codeID":@"CodeID",
- @"code":@"Code",
- @"onlyCode":@"OnlyCode",
- @"brandID":@"BrandID",
- @"brandName":@"BrandName",
- @"kindID":@"KindID",
- @"kindName":@"KindName",
- @"varietyID":@"VarietyID",
- @"varietyName":@"VarietyName",
- @"seriesID":@"SeriesID",
- @"seriesName":@"SeriesName",
- @"unitID":@"UnitID",
- @"unitName":@"UnitName",
- @"mPackage":@"Package",
- @"weight":@"Weight",
- @"goodsName":@"GoodsName",
- @"receiptSpecification":@"ReceiptSpecification",
- @"expandAttribute":@"ExpandAttribute",
- @"expandAttribute2":@"ExpandAttribute2",
- @"receiptRemarks":@"Receipt"
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- /// Dic -> model
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- self.acreage = [NSString stringWithFormat:@"%f",
- [[dic objectForKey:@"Acreage"] doubleValue]];
- return YES;
- }
- @end
|