Initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// DiscountCoupon.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
//优惠券
|
||||
@interface DiscountCoupon : NSObject
|
||||
|
||||
@property(nonatomic) int couponId;
|
||||
//RBM价值
|
||||
@property(nonatomic) int moneyValue;
|
||||
//兑换需要消耗金币值
|
||||
@property(nonatomic) NSInteger needGold;
|
||||
//订单金额满多少可以使用
|
||||
@property(nonatomic) NSNumber *useNeedMoney;
|
||||
//兑换上限
|
||||
@property(nonatomic) NSNumber * upperLimit;
|
||||
//文字标签
|
||||
@property(nonatomic,copy) NSString *tagText;
|
||||
//有效开始日期
|
||||
@property(nonatomic,copy) NSString *validStartDate;
|
||||
//有效结束日期
|
||||
@property(nonatomic,copy) NSString *validEndDate;
|
||||
|
||||
//该优惠券被兑换总量
|
||||
@property(nonatomic) NSNumber *exchangeCount;
|
||||
|
||||
//优惠券剩余数量
|
||||
@property(nonatomic) NSNumber *couponNumber;
|
||||
|
||||
//激活码
|
||||
@property(nonatomic,copy)NSString *activationCode;
|
||||
//是否使用过
|
||||
@property(nonatomic) BOOL isUsed;
|
||||
|
||||
@property(nonatomic,copy) NSString *createTime;
|
||||
|
||||
|
||||
-(instancetype)initWithDict:(NSDictionary *)dict;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// DiscountCoupon.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 2017/4/26.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DiscountCoupon.h"
|
||||
@implementation DiscountCoupon
|
||||
-(instancetype)initWithDict:(NSDictionary *)dict
|
||||
{
|
||||
if (self=[super init]) {
|
||||
|
||||
_couponId = [[dict objectForKey:@"couponId"] intValue];
|
||||
_moneyValue = [[dict objectForKey:@"moneyValue"] intValue];
|
||||
_needGold = [[dict valueForKey:@"needGold"] integerValue];
|
||||
_useNeedMoney = [dict objectForKey:@"useNeedMoney"] ;
|
||||
_upperLimit = [dict objectForKey:@"upperLimit"] ;
|
||||
_tagText = [dict objectForKey:@"tagText"];
|
||||
_validStartDate = [dict objectForKey:@"validStartDate"];
|
||||
_validEndDate = [dict objectForKey:@"validEndDate"];
|
||||
_exchangeCount = [dict objectForKey:@"exchangeCount"];
|
||||
_couponNumber = [dict objectForKey:@"couponNumber"];
|
||||
_activationCode = [dict objectForKey:@"activationCode"];
|
||||
_isUsed = [[dict valueForKey:@"isUsed"] boolValue];
|
||||
_createTime = [dict objectForKey:@"createTime"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user