// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../../application_commands.dart';

/// Draft row for creating one child task from an application command.
class ApplicationChildTaskDraft {
  /// Creates a `ApplicationChildTaskDraft` instance with the values required by its invariants.
  /// Callers should pass already-normalized scheduler data because validation and defaulting belong at the model or service boundary, not in arbitrary UI code.
  const ApplicationChildTaskDraft({
    required this.title,
    this.priority,
    this.reward = RewardLevel.notSet,
    this.difficulty = DifficultyLevel.notSet,
    this.durationMinutes,
    this.projectId,
  });

  /// User-entered child title.
  final String title;

  /// Optional child priority.
  final PriorityLevel? priority;

  /// Optional reward estimate.
  final RewardLevel reward;

  /// Optional difficulty estimate.
  final DifficultyLevel difficulty;

  /// Optional duration estimate.
  final int? durationMinutes;

  /// Optional project override. Null inherits from the parent.
  final String? projectId;
}
