//
//  RDSHomeListCell.m
//  Temperature
//
//  Created by RD on 2022/12/3.
//

#import "RDSHomeListCell.h"
@interface RDSHomeListCell ()
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *onlineLab;
@property (weak, nonatomic) IBOutlet UIImageView *onlineImg;
@property (weak, nonatomic) IBOutlet UILabel *memberLab;

@end

@implementation RDSHomeListCell

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

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(RDSHomeModel *)model{
    _model = model;
    _nameLab.text = model.name;
    _onlineLab.text = model.is_online == 1? @"在线" : @"离线";
    _onlineImg.highlighted = model.is_online == 1? YES:NO;
    _memberLab.text = [NSString stringWithFormat:@"家庭成员:%d",(int)model.member.count];
}

@end
