//
//  SaveProductModel.m
//  Open
//
//  Created by 雷俊博 on 2020/8/11.
//  Copyright © 2020 黄江涛 . All rights reserved.
//

#import "SaveProductModel.h"


@implementation SaveSubProductModel
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.CLPERIOD forKey:@"CLPERIOD"];
    [aCoder encodeObject:self.MIN_AMT forKey:@"MIN_AMT"];
    [aCoder encodeObject:self.NOTE forKey:@"NOTE"];
    [aCoder encodeObject:self.PERZQ forKey:@"PERZQ"];
    [aCoder encodeObject:self.PRD_KIND forKey:@"PRD_KIND"];
    [aCoder encodeObject:self.PRD_TYPE forKey:@"PRD_TYPE"];
    [aCoder encodeObject:self.PRSTATUS forKey:@"PRSTATUS"];
    [aCoder encodeObject:self.RATE forKey:@"RATE"];
    [aCoder encodeObject:self.RET_PRD_CODE forKey:@"RET_PRD_CODE"];
    [aCoder encodeObject:self.RILLIN_DATE forKey:@"RILLIN_DATE"];
    [aCoder encodeObject:self.ROLLIN_TIME forKey:@"ROLLIN_TIME"];
    [aCoder encodeObject:self.STERM forKey:@"STERM"];
    [aCoder encodeObject:self.TQRATE forKey:@"TQRATE"];
    [aCoder encodeObject:self.UNI_AMT forKey:@"UNI_AMT"];
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super init]) {
        _CLPERIOD = [aDecoder decodeObjectForKey:@"CLPERIOD"];
        _MIN_AMT = [aDecoder decodeObjectForKey:@"MIN_AMT"];
        _NOTE = [aDecoder decodeObjectForKey:@"NOTE"];
        _PERZQ = [aDecoder decodeObjectForKey:@"PERZQ"];
        _PRD_KIND = [aDecoder decodeObjectForKey:@"PRD_KIND"];
        _PRD_TYPE = [aDecoder decodeObjectForKey:@"PRD_TYPE"];
        _PRSTATUS = [aDecoder decodeObjectForKey:@"PRSTATUS"];
        _RATE = [aDecoder decodeObjectForKey:@"RATE"];
        _RET_PRD_CODE = [aDecoder decodeObjectForKey:@"RET_PRD_CODE"];
        _RILLIN_DATE = [aDecoder decodeObjectForKey:@"RILLIN_DATE"];
        _ROLLIN_TIME = [aDecoder decodeObjectForKey:@"ROLLIN_TIME"];
        _STERM = [aDecoder decodeObjectForKey:@"STERM"];
        _TQRATE = [aDecoder decodeObjectForKey:@"TQRATE"];
        _UNI_AMT = [aDecoder decodeObjectForKey:@"UNI_AMT"];
    }
    return self;
}
@end

@implementation SaveProductModel
+(NSDictionary *)mj_objectClassInArray
{
    return @{@"SUBPACKS" : [SaveSubProductModel  class]};
}

-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.CURRNO forKey:@"CURRNO"];
    [aCoder encodeObject:self.CURR_NUM forKey:@"CURR_NUM"];
    [aCoder encodeObject:self.PRD_CODE forKey:@"PRD_CODE"];
    [aCoder encodeObject:self.RETCODE forKey:@"RETCODE"];
    [aCoder encodeObject:self.RETMSG forKey:@"RETMSG"];
    [aCoder encodeObject:self.RTN_IND forKey:@"RTN_IND"];
    [aCoder encodeObject:self.SUBPACKS forKey:@"SUBPACKS"];
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super init]) {
        _CURRNO = [aDecoder decodeObjectForKey:@"CURRNO"];
        _CURR_NUM = [aDecoder decodeObjectForKey:@"CURR_NUM"];
        _PRD_CODE = [aDecoder decodeObjectForKey:@"PRD_CODE"];
        _RETMSG = [aDecoder decodeObjectForKey:@"RETMSG"];
        _RTN_IND = [aDecoder decodeObjectForKey:@"RTN_IND"];
        _SUBPACKS = [aDecoder decodeObjectForKey:@"SUBPACKS"];
    }
    return self;
}

@end
