Report constructor

  1. @JsonSerializable(includeIfNull: false)
const Report({
  1. required String id,
  2. required ReportCategory category,
  3. required String comment,
  4. List<String>? statusIds,
  5. List<String>? ruleIds,
  6. @JsonKey(name: 'target_account') required Account account,
  7. @JsonKey(name: 'forwarded') required bool isForwarded,
  8. @JsonKey(name: 'action_taken') required bool isActionTaken,
  9. DateTime? actionTakenAt,
  10. required DateTime createdAt,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Report({
  /// The ID of the report in the database.
  required String id,

  /// The generic reason for the report.
  required ReportCategory category,

  /// The reason for the report.
  required String comment,

  /// The domain name of the instance.
  List<String>? statusIds,

  /// The domain name of the instance.
  List<String>? ruleIds,

  /// The account that was reported.
  @JsonKey(name: 'target_account') required Account account,

  /// Whether the report was forwarded to a remote domain.
  @JsonKey(name: 'forwarded') required bool isForwarded,

  /// Whether an action was taken yet.
  @JsonKey(name: 'action_taken') required bool isActionTaken,

  /// When an action was taken against the report.
  DateTime? actionTakenAt,

  /// When the report was created.
  required DateTime createdAt,
}) = _Report;