getGoalIndexToEntity static method

IndexGoals getGoalIndexToEntity(
  1. GoalIndex goal
)

Implementation

static domain.IndexGoals getGoalIndexToEntity(infra.GoalIndex goal) => domain.IndexGoals(
      id: goal.id,
      name: goal.name,
      description: goal.desc,
      image: goal.image.url,
      createAt: goal.createdAt,
      endsAt: goal.endsAt,
      activityTime: goal.activityTimes,
      brandId: goal.brandId,
      campaignId: goal.campaignId,
      delete: goal.deleted,
      enabled: goal.enabled,
      formula: goal.formula,
      sponsorName: goal.sponsorName?.toString() ?? '',
      tags: goal.tags,
      rewardName: goal.rewardName?.toString() ?? '',
      globalLimit: goal.globalLimit,
      globalAwardedCount: goal.globalAwardedCount,
      acceptancesCount: goal.acceptancesCount,
      participantMetricValue: goal.participantMetricValue,
      status: goal.status,
      goalData: goal.goalData.data,
    );