//
//  CommodityListCollectionViewCell.m
//  ALand
//
//  Created by Z on 16/3/23.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "CommodityListCollectionViewCell.h"

@interface CommodityListCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageViewTop;
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;

@property (weak, nonatomic) IBOutlet UILabel *labelCommission;
@property (weak, nonatomic) IBOutlet UILabel *labelPrice;
@property (weak, nonatomic) IBOutlet UILabel *labelOriginalPrice;
@property (weak, nonatomic) IBOutlet UILabel *labelBrokerageRate;

@end

@implementation CommodityListCollectionViewCell

- (void)cellWithModel:(CommotityListModel *)model {
    self.labelPrice.text = [NSString stringWithFormat:@"%.0f",model.price];
    [self.imageViewTop sd_setImageWithURL:[NSURL URLWithString:model.pictures] placeholderImage:nil];
    self.labelOriginalPrice.text = [NSString stringWithFormat:@"%.0f", model.originalPrice];
    self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f", model.brokerageRate];
    
    self.labelTitle.text = model.name;
}

- (void)awakeFromNib {
    // Initialization code
}

@end
