//
//  IapStoreModel.m
//  EGirl
//
//  Created by donglyu on 2020/6/24.
//  Copyright © 2020 EGirl. All rights reserved.
//

#import "IapModels.h"

@implementation IapVerifyModel



@end

@implementation IapStoreModel

@end

@implementation PaymentTransactionModel

- (void)UpdateDataForm:(PaymentTransactionModel *)model{
    self.transactionId = model.transactionId;
    
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        _tradeNo = @"";
    }
    return self;
}


- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        _userId = [coder decodeIntegerForKey:@"userId"];
        _transactionId = [coder decodeObjectForKey:@"transactionId"];
        _tradeNo = [coder decodeObjectForKey:@"tradeNo"];
        if (_tradeNo == nil || _tradeNo.length == 0){
            _tradeNo = @"";
        }
        _productId = [coder decodeObjectForKey:@"productId"];
        if ([coder containsValueForKey:@"tradeTime"]) {
            _tradeTime = [coder decodeIntegerForKey:@"tradeTime"];
        }
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)coder{
    [coder encodeInteger:self.userId forKey:@"userId"];
    [coder encodeObject:self.transactionId forKey:@"transactionId"];
    [coder encodeObject:self.tradeNo forKey:@"tradeNo"];
    [coder encodeObject:self.productId forKey:@"productId"];
    [coder encodeInteger:self.tradeTime forKey:@"tradeTime"];
}

@end
