// // InventoryFreezeOrderListModel.m // IBOSS // // Created by 关宏厚 on 2020/5/7. // Copyright © 2020 elongtian. All rights reserved. // #import "InventoryFreezeOrderListModel.h" @implementation InventoryFreezeOrderListModel /*! * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的 * 前:模型的属性 后:字典里的属性 */ + (nullable NSDictionary *)modelCustomPropertyMapper{ return @{ @"freezeId":@"FreezeID", @"unfreezeId":@"UnFreezeID", @"freezeNo":@"FreezeNo", @"customerId":@"CustomerID", @"customerCode":@"CustomerCode", @"customerName":@"CustomerName", @"staffId":@"Salesman", @"staffName":@"StaffName", @"freezePeriod":@"FreezePeriod", @"unfreezeStatusName":@"UnFreezeStatusName", @"accountDate":@"AccountDate", @"freezeReason":@"FreezeReason", @"invoiceStatus":@"Status", @"invoiceStatusName":@"InvoiceStatusName" }; } /*! * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法 * NSDate *time dic[@"t"]是double类型的的秒数 */ /// Dic -> model - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic { _accountDate=[dic objectForKey:@"AccountDate"]; _accountDate =[DateFormat dateFormatSplit:_accountDate]; _freezePeriod=[dic objectForKey:@"FreezePeriod"]; _freezePeriod =[DateFormat dateFormatSplit:_freezePeriod]; return YES; } @end