//
//  IntegralDetailsTableViewCell.m
//  Lighting
//
//  Created by 曹云霄 on 2016/11/21.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "IntegralDetailsTableViewCell.h"

@implementation IntegralDetailsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setIntegralEntity:(TOScoreRecordEntity *)integralEntity
{
    _integralEntity = integralEntity;
    self.integralTypeLabel.text = _integralEntity.sourceReason;
    self.integralTimeLabel.text = _integralEntity.createDate;
    NSString *string = nil;
    if (_integralEntity.score < 0) {
        string = [NSString stringWithFormat:@"%-.2lf",_integralEntity.score];
    }else {
        string = [NSString stringWithFormat:@"%+.2lf",_integralEntity.score];
    }
    self.integralNumberLabel.text = string;
}

@end
