toEntity method

  1. @override
AssignmentEntity toEntity({
  1. String? appId,
})
override

Implementation

@override
AssignmentEntity toEntity({String? appId}) {
  return AssignmentEntity(
    appId: appId,
    reporterId: reporterId,
    assigneeId: (assigneeId != null) ? assigneeId : null,
    task: (task != null) ? task!.toEntity(appId: appId) : null,
    workflowId: (workflow != null) ? workflow!.documentID : null,
    workflowTaskSeqNumber:
        (workflowTaskSeqNumber != null) ? workflowTaskSeqNumber : null,
    timestamp: (timestamp == null) ? null : timestamp!.millisecondsSinceEpoch,
    status: (status != null) ? status!.index : null,
    resultsCurrent: (resultsCurrent != null)
        ? resultsCurrent!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
    resultsPrevious: (resultsPrevious != null)
        ? resultsPrevious!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
    triggeredById: (triggeredById != null) ? triggeredById : null,
    confirmMessage: (confirmMessage != null)
        ? confirmMessage!.toEntity(appId: appId)
        : null,
    rejectMessage: (rejectMessage != null)
        ? rejectMessage!.toEntity(appId: appId)
        : null,
  );
}