import '../utils/app_time.dart'; /// A work-log entry on a programmer task (plain, online-first model). /// /// The assignee logs progress notes with [minutes] == null (their time comes /// from the running clock). A non-assignee "helper" logs with [minutes] set — /// their contributed time, which feeds the per-contributor time ledger and can /// be deducted from the helper's own running task. class ProgrammerTaskWorkLog { final String id; final String taskId; final String authorId; final String description; final int? minutes; final DateTime createdAt; ProgrammerTaskWorkLog({ required this.id, required this.taskId, required this.authorId, required this.description, this.minutes, required this.createdAt, }); factory ProgrammerTaskWorkLog.fromMap(Map map) { return ProgrammerTaskWorkLog( id: map['id'].toString(), taskId: map['task_id'].toString(), authorId: map['author_id'].toString(), description: map['description'] as String? ?? '', minutes: (map['minutes'] as num?)?.toInt(), createdAt: AppTime.parse(map['created_at'] as String), ); } }