Files
featherVoice/QXLive/HomePage(声播)/Model/QXRedPacketModel.m
2025-10-20 09:43:10 +08:00

41 lines
825 B
Objective-C

//
// QXRedPacketModel.m
// QXLive
//
// Created by 启星 on 2025/10/11.
//
#import "QXRedPacketModel.h"
@implementation QXRedPacketModel
- (long)remainingTime {
long needTime = 0;
NSTimeInterval timeInterval = [[NSDate date] timeIntervalSince1970];
// 将秒转换为毫秒
long long milliseconds = (long long)(timeInterval);
needTime = self.start_time - milliseconds;
return needTime;
}
- (BOOL)canOpenNow {
return [self remainingTime] <= 0;
}
@end
@implementation QXDrawRedPacketModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"redpacket_info": @"QXRedPacketModel",
@"my_record": @"QXDrawRedpacketRecordModel",
@"records": @"QXDrawRedpacketRecordModel",
};
}
@end
@implementation QXDrawRedpacketRecordModel
@end