ScheduledActionView constructor

  1. @JsonSerializable.new(includeIfNull: false)
const ScheduledActionView({
  1. @Default.new('tools.ozone.moderation.defs#scheduledActionView') String $type,
  2. required int id,
  3. @ScheduledActionViewActionConverter() required ScheduledActionViewAction action,
  4. Map<String, dynamic>? eventData,
  5. required String did,
  6. DateTime? executeAt,
  7. DateTime? executeAfter,
  8. DateTime? executeUntil,
  9. bool? randomizeExecution,
  10. required String createdBy,
  11. required DateTime createdAt,
  12. DateTime? updatedAt,
  13. @ScheduledActionViewStatusConverter() required ScheduledActionViewStatus status,
  14. DateTime? lastExecutedAt,
  15. String? lastFailureReason,
  16. int? executionEventId,
  17. Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory ScheduledActionView({
  @Default('tools.ozone.moderation.defs#scheduledActionView') String $type,

  /// Auto-incrementing row ID
  required int id,

  /// Type of action to be executed
  @ScheduledActionViewActionConverter()
  required ScheduledActionViewAction action,
  Map<String, dynamic>? eventData,

  /// Subject DID for the action
  required String did,

  /// Exact time to execute the action
  DateTime? executeAt,

  /// Earliest time to execute the action (for randomized scheduling)
  DateTime? executeAfter,

  /// Latest time to execute the action (for randomized scheduling)
  DateTime? executeUntil,

  /// Whether execution time should be randomized within the specified range
  bool? randomizeExecution,

  /// DID of the user who created this scheduled action
  required String createdBy,

  /// When the scheduled action was created
  required DateTime createdAt,

  /// When the scheduled action was last updated
  DateTime? updatedAt,

  /// Current status of the scheduled action
  @ScheduledActionViewStatusConverter()
  required ScheduledActionViewStatus status,

  /// When the action was last attempted to be executed
  DateTime? lastExecutedAt,

  /// Reason for the last execution failure
  String? lastFailureReason,

  /// ID of the moderation event created when action was successfully executed
  int? executionEventId,

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