copyWithCompanion method

AlbumData copyWithCompanion(
  1. AlbumCompanion data
)

Implementation

AlbumData copyWithCompanion(AlbumCompanion data) {
  return AlbumData(
    id: data.id.present ? data.id.value : this.id,
    code: data.code.present ? data.code.value : this.code,
    name: data.name.present ? data.name.value : this.name,
    nameInEnglish: data.nameInEnglish.present
        ? data.nameInEnglish.value
        : this.nameInEnglish,
    seqNum: data.seqNum.present ? data.seqNum.value : this.seqNum,
    published: data.published.present ? data.published.value : this.published,
    locked: data.locked.present ? data.locked.value : this.locked,
    imagePath: data.imagePath.present ? data.imagePath.value : this.imagePath,
    publishedSongCount: data.publishedSongCount.present
        ? data.publishedSongCount.value
        : this.publishedSongCount,
    totalSongCount: data.totalSongCount.present
        ? data.totalSongCount.value
        : this.totalSongCount,
    description: data.description.present
        ? data.description.value
        : this.description,
    note: data.note.present ? data.note.value : this.note,
  );
}