|
@@ -19,6 +19,7 @@ NSString *const kRecentCourseModelCourseStartTime = @"courseStartTime";
|
|
|
NSString *const kRecentCourseModelTeacherId = @"teacherId";
|
|
|
NSString *const kRecentCourseModelCourseGroupName = @"courseGroupName";
|
|
|
NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
+NSString *const kRecentCourseModelCourseEndTime = @"courseEndTime";
|
|
|
|
|
|
@interface RecentCourseModel ()
|
|
|
|
|
@@ -39,6 +40,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
@synthesize teacherId = _teacherId;
|
|
|
@synthesize courseGroupName = _courseGroupName;
|
|
|
@synthesize studentId = _studentId;
|
|
|
+@synthesize courseEndTime = _courseEndTime;
|
|
|
|
|
|
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
|
|
|
{
|
|
@@ -63,7 +65,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
self.teacherId = [self objectOrNilForKey:kRecentCourseModelTeacherId fromDictionary:dict];
|
|
|
self.courseGroupName = [self objectOrNilForKey:kRecentCourseModelCourseGroupName fromDictionary:dict];
|
|
|
self.studentId = [self objectOrNilForKey:kRecentCourseModelStudentId fromDictionary:dict];
|
|
|
-
|
|
|
+ self.courseEndTime = [self objectOrNilForKey:kRecentCourseModelCourseEndTime fromDictionary:dict];
|
|
|
}
|
|
|
|
|
|
return self;
|
|
@@ -84,6 +86,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
[mutableDict setValue:self.teacherId forKey:kRecentCourseModelTeacherId];
|
|
|
[mutableDict setValue:self.courseGroupName forKey:kRecentCourseModelCourseGroupName];
|
|
|
[mutableDict setValue:self.studentId forKey:kRecentCourseModelStudentId];
|
|
|
+ [mutableDict setValue:self.courseEndTime forKey:kRecentCourseModelCourseEndTime];
|
|
|
return [NSDictionary dictionaryWithDictionary:mutableDict];
|
|
|
}
|
|
|
|
|
@@ -121,6 +124,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
self.teacherId = [aDecoder decodeObjectForKey:kRecentCourseModelTeacherId];
|
|
|
self.courseGroupName = [aDecoder decodeObjectForKey:kRecentCourseModelCourseGroupName];
|
|
|
self.studentId = [aDecoder decodeObjectForKey:kRecentCourseModelStudentId];
|
|
|
+ self.courseEndTime = [aDecoder decodeObjectForKey:kRecentCourseModelCourseEndTime];
|
|
|
return self;
|
|
|
}
|
|
|
|
|
@@ -138,6 +142,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
[aCoder encodeObject:_teacherId forKey:kRecentCourseModelTeacherId];
|
|
|
[aCoder encodeObject:_courseGroupName forKey:kRecentCourseModelCourseGroupName];
|
|
|
[aCoder encodeObject:_studentId forKey:kRecentCourseModelStudentId];
|
|
|
+ [aCoder encodeObject:_courseEndTime forKey:kRecentCourseModelCourseEndTime];
|
|
|
}
|
|
|
|
|
|
- (id)copyWithZone:(NSZone *)zone
|
|
@@ -157,6 +162,7 @@ NSString *const kRecentCourseModelStudentId = @"studentId";
|
|
|
copy.teacherId = [self.teacherId copyWithZone:zone];
|
|
|
copy.courseGroupName = [self.courseGroupName copyWithZone:zone];
|
|
|
copy.studentId = [self.studentId copyWithZone:zone];
|
|
|
+ copy.courseEndTime = [self.courseEndTime copyWithZone:zone];
|
|
|
}
|
|
|
|
|
|
return copy;
|