ReportView constructor

const ReportView({
  1. @Default.new('tools.ozone.report.defs#reportView') String $type,
  2. required int id,
  3. required int eventId,
  4. @ReportViewStatusConverter() required ReportViewStatus status,
  5. @SubjectViewConverter() required SubjectView subject,
  6. @ReasonTypeConverter() required ReasonType reportType,
  7. String? priorityLevel,
  8. int? priorityScore,
  9. int? priorityTargetMinutes,
  10. int? resolutionTimeSec,
  11. bool? priorityTargetMet,
  12. required String reportedBy,
  13. @SubjectViewConverter() required SubjectView reporter,
  14. String? comment,
  15. @JsonKey.new(toJson: iso8601) required DateTime createdAt,
  16. @JsonKey.new(toJson: iso8601) DateTime? updatedAt,
  17. @JsonKey.new(toJson: iso8601) DateTime? queuedAt,
  18. List<int>? actionEventIds,
  19. @ModEventViewConverter() List<ModEventView>? actions,
  20. String? actionNote,
  21. @SubjectStatusViewConverter() SubjectStatusView? subjectStatus,
  22. int? relatedReportCount,
  23. @ReportAssignmentConverter() ReportAssignment? assignment,
  24. @QueueViewConverter() QueueView? queue,
  25. bool? isMuted,
  26. @Default.new(false) bool isAutomated,
  27. Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory ReportView({
  @Default('tools.ozone.report.defs#reportView') String $type,

  /// Report ID
  required int id,

  /// ID of the moderation event that created this report
  required int eventId,

  /// Current status of the report
  @ReportViewStatusConverter() required ReportViewStatus status,

  /// The subject that was reported with full details
  @SubjectViewConverter() required SubjectView subject,

  /// Type of report
  @ReasonTypeConverter() required ReasonType reportType,

  /// Priority level assigned to the report.
  String? priorityLevel,

  /// Report priority score. Higher scores have higher priority.
  int? priorityScore,

  /// Target resolution duration in minutes.
  int? priorityTargetMinutes,

  /// Time from report creation to its last closure.
  int? resolutionTimeSec,

  /// Whether the current closure occurred within the report's snapshotted target.
  bool? priorityTargetMet,

  /// DID of the user who made the report
  required String reportedBy,

  /// Full subject view of the reporter account
  @SubjectViewConverter() required SubjectView reporter,

  /// Comment provided by the reporter
  String? comment,

  /// When the report was created
  @JsonKey(toJson: iso8601) required DateTime createdAt,

  /// When the report was last updated
  @JsonKey(toJson: iso8601) DateTime? updatedAt,

  /// When the report was assigned to its current queue
  @JsonKey(toJson: iso8601) DateTime? queuedAt,
  List<int>? actionEventIds,
  @ModEventViewConverter() List<ModEventView>? actions,

  /// Note sent to reporter when report was actioned
  String? actionNote,

  /// Current status of the reported subject
  @SubjectStatusViewConverter() SubjectStatusView? subjectStatus,

  /// Number of other pending reports on the same subject
  int? relatedReportCount,

  /// Information about moderator currently assigned to this report (if any)
  @ReportAssignmentConverter() ReportAssignment? assignment,

  /// The queue this report is assigned to (if any)
  @QueueViewConverter() QueueView? queue,

  /// Whether this report is muted. A report is muted if the reporter was muted or the subject was muted at the time the report was created.
  bool? isMuted,

  /// Whether this report was emitted by automated tooling.
  @Default(false) bool isAutomated,

  Map<String, dynamic>? $unknown,
}) = _ReportView;