| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- //
- // RepairReceiptListModel.m
- // IBOSS
- //
- // Created by apple on 16/1/19.
- // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved.
- //
- // 功能描述:维修已回执模型类
- #import "RepairReceiptListModel.h"
- @implementation RepairReceiptListModel
- #pragma 私有函数
- /*!
- * 1.该方法是 `字典里的属性Key` 和 `要转化为模型里的属性名` 不一样 而重写的
- * 前:模型的属性 后:字典里的属性
- */
- + (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper{
-
- return @{@"repairId":@"RepairID",
- @"repairNo":@"RepairNo",
- @"arrangementId":@"ArrangementID",
- @"arrangementNo":@"ArrangementNo",
- @"receiptNo":@"ReceiptNo",
- @"receiptType":@"ReceiptType",
- @"customerName":@"CustomerName",
- @"customerAddress":@"Address",
- @"customerTelephone":@"Telephone",
- @"receiptDate":@"ReceiptTime",
- @"receiptFlag":@"ReceiptFlag",
- @"recReceiptType":@"recReceiptType",
- @"delayDate":@"NextRepairDate",
- @"serviceStaffName":@"ServiceStaffName"
- };
-
-
- }
- /*!
- * 2. 下面的两个方法 `字典里值`与`模型的值`类型不一样`需要转换`而重写的方法
- * NSDate *time dic[@"t"]是double类型的的秒数
- * Dic -> model
- */
- - (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
- self.repairId = [[dic objectForKey:@"RepairID"] stringValue];
- self.arrangementId = [[dic objectForKey:@"ArrangementID"]stringValue];
- self.receiptType = [[dic objectForKey:@"ReceiptType"] stringValue];
- self.recReceiptType = [[dic objectForKey:@"recReceiptType"] stringValue];
- return YES;
- }
- @end
|