//
//  AccountStateModel.m
//  Car
//
//  Created by Javen on 2017/2/10.
//  Copyright © 2017年 上海勾芒信息科技. All rights reserved.
//

#import "AccountStateModel.h"

@implementation AccountStateModel
+ (BaseStateModel *)stateFrom:(NSString *)state {
    BaseStateModel *model = [BaseStateModel stateModel];
    
    if ([state isEqualToString:@"approving"]) {
        model.text = @"待审核";
        model.imgName = @"state_audit";
    }else if ([state isEqualToString:@"approved"]){
        model.text = @"转账中";
        model.imgName = @"state_transfer_account";
    }else if ([state isEqualToString:@"rejected"]){
        model.text = @"已拒绝";
        model.imgName = @"state_reject";
    }else if ([state isEqualToString:@"finished"]){
        model.text = @"已完成";
        model.imgName = @"state_complete";
    }else if ([state isEqualToString:@"returned"]){
        model.text = @"已退还";
        model.imgName = @"state_returned";
    }
    
    return model;
}
@end
