toCompanion method
Implementation
CourseOfferingsCompanion toCompanion(bool nullToAbsent) {
return CourseOfferingsCompanion(
id: Value(id),
fetchedAt: fetchedAt == null && nullToAbsent
? const Value.absent()
: Value(fetchedAt),
courseCode: courseCode == null && nullToAbsent
? const Value.absent()
: Value(courseCode),
semester: Value(semester),
number: number == null && nullToAbsent
? const Value.absent()
: Value(number),
nameZh: Value(nameZh),
nameEn: nameEn == null && nullToAbsent
? const Value.absent()
: Value(nameEn),
credits: credits == null && nullToAbsent
? const Value.absent()
: Value(credits),
hours: hours == null && nullToAbsent
? const Value.absent()
: Value(hours),
phase: phase == null && nullToAbsent
? const Value.absent()
: Value(phase),
courseType: courseType == null && nullToAbsent
? const Value.absent()
: Value(courseType),
status: status == null && nullToAbsent
? const Value.absent()
: Value(status),
language: language == null && nullToAbsent
? const Value.absent()
: Value(language),
remarks: remarks == null && nullToAbsent
? const Value.absent()
: Value(remarks),
enrolled: enrolled == null && nullToAbsent
? const Value.absent()
: Value(enrolled),
withdrawn: withdrawn == null && nullToAbsent
? const Value.absent()
: Value(withdrawn),
);
}