| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // InventoryGoodsModel.m
- // IBOSS
- //
- // Created by 关宏厚 on 2020/4/29.
- // Copyright © 2020 elongtian. All rights reserved.
- //
- #import "InventoryGoodsModel.h"
- @implementation InventoryGoodsModel
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{
- @"codeId":@"CodeID",
- @"code":@"Code",
- @"onlyCode":@"OnlyCode",
- @"code":@"Code",
- @"brandId":@"BrandID",
- @"brandName":@"BrandName",
- @"colorNumber":@"ColorNumber",
- @"specification":@"Specification",
- @"gradeId":@"GradeID",
- @"gradeName":@"GradeName",
- @"kindId":@"KindID",
- @"kindName":@"KindName",
- @"varietyId":@"VarietyID",
- @"varietyName":@"VarietyName",
- @"seriesId":@"SeriesID",
- @"seriesName":@"SeriesName",
- @"warehouseId":@"WarehouseID",
- @"warehouseName":@"WarehouseName",
- @"positionNumber":@"PositionNumber",
- @"unitId":@"UnitID",
- @"unitName":@"UnitName",
- @"package":@"Package",
- @"weight":@"Weight",
- @"circulateType":@"CirculateType",
- @"decimalPlaces":@"DecimalPlaces",
- @"acreage":@"Acreage",
- @"volume":@"Volume",
- @"inventoryId":@"InventoryID",
- @"inventoryQuantity":@"InventoryQuantity",
- @"balanceQuantity":@"BalanceQuantity",
- @"freezeQuantity":@"FreezeQuantity"
- };
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- */
- /// Dic -> model
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
-
- return YES;
- }
- @end
|