123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // FKCouponItem.m
- // FirstLink
- //
- // Created by ascii on 16/4/9.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKCouponItem.h"
- @implementation FKCouponItem
- + (NSDictionary *)mts_mapping {
- return @{@"id": mts_key(itemID),
- @"code": mts_key(code),
- @"amount": mts_key(amount),
- @"start_date": mts_key(startDate),
- @"expiry_date": mts_key(expiryDate),
- @"min_use_amount": mts_key(minUseAmount),
- @"remain_count": mts_key(remainCount),
- @"type": mts_key(type),
- @"type_desc": mts_key(typeDesc),
- @"description": mts_key(desc),
- @"time_description": mts_key(timeDesc),
- @"sale_activity_name": mts_key(saleActivityName),
- @"target_user": mts_key(targetUser),
- @"target_goods": mts_key(targetGoods),
- @"discount_rule": mts_key(discountRule),
- @"status": mts_key(status),
- @"use_mark": mts_key(useMark),
- @"create_time": mts_key(createTime),
- @"target_url" : mts_key(targetUrl)
- };
- }
- + (BOOL)mts_shouldSetUndefinedKeys {
- return NO;
- }
- -(FKCouponType)getCouponType{
- if ([self.type isEqualToString:@"1"]) {
- return FKCouponTypeMoney;
- }else if ([self.type isEqualToString:@"2"]){
- return FKCouponTypePostage;
- }else if ([self.type isEqualToString:@"3"]){
- return FKCouponTypeAcitivityCard;
- }
- return FKCouponTypeNone;
- }
- - (BOOL)isCouponValid{
- if ([self.status isEqualToString:@"1"]) {
- return YES;
- }
- return NO;
-
- }
- @end
|