toCompanion method

CoursesCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

CoursesCompanion toCompanion(bool nullToAbsent) {
  return CoursesCompanion(
    id: Value(id),
    fetchedAt: fetchedAt == null && nullToAbsent
        ? const Value.absent()
        : Value(fetchedAt),
    code: Value(code),
    credits: Value(credits),
    hours: Value(hours),
    nameZh: Value(nameZh),
    nameEn: nameEn == null && nullToAbsent
        ? const Value.absent()
        : Value(nameEn),
    descriptionZh: descriptionZh == null && nullToAbsent
        ? const Value.absent()
        : Value(descriptionZh),
    descriptionEn: descriptionEn == null && nullToAbsent
        ? const Value.absent()
        : Value(descriptionEn),
  );
}