90 lines
1.7 KiB
Objective-C
90 lines
1.7 KiB
Objective-C
//
|
|
// MedalsModel.m
|
|
// YuMi
|
|
//
|
|
// Created by P on 2025/6/17.
|
|
//
|
|
|
|
#import "MedalsModel.h"
|
|
|
|
@implementation MedalVo
|
|
|
|
/// 将 expireSeconds 转换为 "yyyy/MM/dd" 格式的字符串
|
|
- (NSString *)expireDateString {
|
|
if (self.expireSeconds <= 0) {
|
|
return YMLocalizedString(@"20.20.61_text_9");
|
|
}
|
|
|
|
// 将秒转换为 NSDate
|
|
NSDate *expireDate = [NSDate dateWithTimeIntervalSince1970:self.expireSeconds];
|
|
|
|
// 创建日期格式化器
|
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
|
formatter.dateFormat = @"yyyy/MM/dd";
|
|
|
|
// 返回格式化后的字符串
|
|
return [NSString stringWithFormat:YMLocalizedString(@"20.20.61_text_8"), [formatter stringFromDate:expireDate]];
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation MedalSeriesItemVo
|
|
+ (NSDictionary *)mj_objectClassInArray {
|
|
return @{
|
|
@"medalVos" : [MedalVo class]
|
|
};
|
|
}
|
|
@end
|
|
|
|
@implementation MedalSeriesVo
|
|
+ (NSDictionary *)mj_objectClassInArray {
|
|
return @{
|
|
@"medalSeries" : [MedalSeriesItemVo class]
|
|
};
|
|
}
|
|
@end
|
|
|
|
@implementation UserMedalsModel
|
|
+ (NSDictionary *)mj_objectClassInArray {
|
|
return @{
|
|
@"medalSeries" : [MedalSeriesVo class],
|
|
@"useMedals" : [MedalVo class]
|
|
};
|
|
}
|
|
@end
|
|
|
|
@implementation VipMedalSeatVo
|
|
|
|
@end
|
|
|
|
@implementation MineAllMedalModel
|
|
|
|
+ (NSDictionary *)mj_objectClassInArray {
|
|
return @{
|
|
@"allMedals" : [MedalVo class],
|
|
@"useMedals" : [MedalVo class],
|
|
// @"vipMedalSeatVos" : [VipMedalSeatVo class],
|
|
// @"allMedals" : [MedalVo class],
|
|
};
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation MedalsRankUserModel
|
|
|
|
@end
|
|
|
|
@implementation MedalsRankModel
|
|
+ (NSDictionary *)mj_objectClassInArray {
|
|
return @{
|
|
@"rankList" : [MedalsRankUserModel class],
|
|
};
|
|
}
|
|
@end
|
|
|
|
|
|
@implementation MedalsModel
|
|
|
|
@end
|
|
|