//
//  PatrolExamState.m
//  patrol
//
//  Created by Javen on 2017/3/13.
//  Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
//

#import "PatrolExamState.h"

@implementation PatrolExamState

+ (PatrolExamState *)stateWithCode:(NSNumber *)state {
    NSInteger code = [state integerValue];
    PatrolExamState *stateModel = [PatrolExamState new];
    if (code == 0) {
        stateModel.type = PatrolExamStateUnStart;
        stateModel.text = @"未开始";
    }else if (code == 1){
        stateModel.type = PatrolExamStateFinish;
        stateModel.text = @"已结束";
    }else if (code == 2){
        stateModel.type = PatrolExamStateProcessing;
        stateModel.text = @"进行中";
    }
    return stateModel;
}
@end
