//
//  CSFileModel.m
//  zhuxun
//
//  Created by winsoft on 17/6/16.
//
//

#import "CSFileModel.h"
#import <MJExtension/MJExtension.h>
//#import "NSDate+Helper.h"
@implementation CSFileModel
- (instancetype)mj_setKeyValues:(id)keyValues
{
    if([super mj_setKeyValues:keyValues])
    {
       
        if (keyValues[@"_id"]) {
            self.sid = keyValues[@"_id"];
        }else self.sid = keyValues[@"sid"];

//        self.server_ctime = [NSDate stringFromDate:[NSDate dateWithTimeIntervalSince1970:[server_ctime doubleValue]/1000] withFormat:@"yyyy-MM-dd HH:mm"];
//        self.update_time = [NSDate stringFromDate:[NSDate dateWithTimeIntervalSince1970:[update_time doubleValue]/1000] withFormat:@"yyyy-MM-dd HH:mm"];
        
        
    }
    return self;
}

#warning 2017-07-31 待针对手动修改name情况的进行处理.
- (void)setName:(NSString *)name
{
    if([name rangeOfString:@"'"].location != NSNotFound){
        
        _name = [name stringByReplacingOccurrencesOfString:@"'" withString:@"''"];
        
    }else _name = name;
    
}


@end
