1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // YMCallRecordCellViewModel.m
- // MSYOUPAI
- //
- // Created by YoMi on 2024/3/20.
- // Copyright © 2024 MS. All rights reserved.
- //
- #import "YMCallRecordCellViewModel.h"
- #import "YMCallRecordModel.h"
- @interface YMCallRecordCellViewModel()
- /// 用户Id
- @property (nonatomic, assign, readwrite) NSInteger userId;
- /// 用户头像
- @property (nonatomic, strong, readwrite) NSString *userAvatar;
- /// 用户昵称
- @property (nonatomic, strong, readwrite) NSString *userNickname;
- /// 用户通话时长
- @property (nonatomic, strong, readwrite) NSString *userCallDuration;
- /// 用户通话日期
- @property (nonatomic, strong, readwrite) NSString *userCallDate;
- @end
- @implementation YMCallRecordCellViewModel
- - (void)ym_initialize{
- [super ym_initialize];
-
- if ([self.params[ParamsModel] isKindOfClass:[YMCallRecordModel class]]) {
- YMCallRecordModel *model = self.params[ParamsModel];
- self.userId = model.userid;
- self.userAvatar = model.avatar;
- self.userNickname = model.nickname;
- self.userCallDuration = stringFormat(@"通话时长:%@",model.time);
- self.userCallDate = model.date;
- }
- }
- @end
|