694 lines
25 KiB
Dart
694 lines
25 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'maintenance_schedule.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
/// @nodoc
|
|
mixin _$MaintenanceSchedule {
|
|
int get equipmentHistoryId => throw _privateConstructorUsedError;
|
|
String get maintenanceType => throw _privateConstructorUsedError;
|
|
int get periodMonths => throw _privateConstructorUsedError;
|
|
DateTime get startDate => throw _privateConstructorUsedError;
|
|
DateTime get endDate => throw _privateConstructorUsedError;
|
|
DateTime? get lastMaintenanceDate => throw _privateConstructorUsedError;
|
|
DateTime? get nextMaintenanceDate => throw _privateConstructorUsedError;
|
|
double get cost => throw _privateConstructorUsedError;
|
|
String? get description => throw _privateConstructorUsedError;
|
|
List<DateTime> get scheduledDates => throw _privateConstructorUsedError;
|
|
MaintenanceScheduleStatus get status => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of MaintenanceSchedule
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$MaintenanceScheduleCopyWith<MaintenanceSchedule> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $MaintenanceScheduleCopyWith<$Res> {
|
|
factory $MaintenanceScheduleCopyWith(
|
|
MaintenanceSchedule value, $Res Function(MaintenanceSchedule) then) =
|
|
_$MaintenanceScheduleCopyWithImpl<$Res, MaintenanceSchedule>;
|
|
@useResult
|
|
$Res call(
|
|
{int equipmentHistoryId,
|
|
String maintenanceType,
|
|
int periodMonths,
|
|
DateTime startDate,
|
|
DateTime endDate,
|
|
DateTime? lastMaintenanceDate,
|
|
DateTime? nextMaintenanceDate,
|
|
double cost,
|
|
String? description,
|
|
List<DateTime> scheduledDates,
|
|
MaintenanceScheduleStatus status});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$MaintenanceScheduleCopyWithImpl<$Res, $Val extends MaintenanceSchedule>
|
|
implements $MaintenanceScheduleCopyWith<$Res> {
|
|
_$MaintenanceScheduleCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of MaintenanceSchedule
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? equipmentHistoryId = null,
|
|
Object? maintenanceType = null,
|
|
Object? periodMonths = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? lastMaintenanceDate = freezed,
|
|
Object? nextMaintenanceDate = freezed,
|
|
Object? cost = null,
|
|
Object? description = freezed,
|
|
Object? scheduledDates = null,
|
|
Object? status = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
equipmentHistoryId: null == equipmentHistoryId
|
|
? _value.equipmentHistoryId
|
|
: equipmentHistoryId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maintenanceType: null == maintenanceType
|
|
? _value.maintenanceType
|
|
: maintenanceType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
periodMonths: null == periodMonths
|
|
? _value.periodMonths
|
|
: periodMonths // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
lastMaintenanceDate: freezed == lastMaintenanceDate
|
|
? _value.lastMaintenanceDate
|
|
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
nextMaintenanceDate: freezed == nextMaintenanceDate
|
|
? _value.nextMaintenanceDate
|
|
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
cost: null == cost
|
|
? _value.cost
|
|
: cost // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
scheduledDates: null == scheduledDates
|
|
? _value.scheduledDates
|
|
: scheduledDates // ignore: cast_nullable_to_non_nullable
|
|
as List<DateTime>,
|
|
status: null == status
|
|
? _value.status
|
|
: status // ignore: cast_nullable_to_non_nullable
|
|
as MaintenanceScheduleStatus,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$MaintenanceScheduleImplCopyWith<$Res>
|
|
implements $MaintenanceScheduleCopyWith<$Res> {
|
|
factory _$$MaintenanceScheduleImplCopyWith(_$MaintenanceScheduleImpl value,
|
|
$Res Function(_$MaintenanceScheduleImpl) then) =
|
|
__$$MaintenanceScheduleImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int equipmentHistoryId,
|
|
String maintenanceType,
|
|
int periodMonths,
|
|
DateTime startDate,
|
|
DateTime endDate,
|
|
DateTime? lastMaintenanceDate,
|
|
DateTime? nextMaintenanceDate,
|
|
double cost,
|
|
String? description,
|
|
List<DateTime> scheduledDates,
|
|
MaintenanceScheduleStatus status});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$MaintenanceScheduleImplCopyWithImpl<$Res>
|
|
extends _$MaintenanceScheduleCopyWithImpl<$Res, _$MaintenanceScheduleImpl>
|
|
implements _$$MaintenanceScheduleImplCopyWith<$Res> {
|
|
__$$MaintenanceScheduleImplCopyWithImpl(_$MaintenanceScheduleImpl _value,
|
|
$Res Function(_$MaintenanceScheduleImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of MaintenanceSchedule
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? equipmentHistoryId = null,
|
|
Object? maintenanceType = null,
|
|
Object? periodMonths = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? lastMaintenanceDate = freezed,
|
|
Object? nextMaintenanceDate = freezed,
|
|
Object? cost = null,
|
|
Object? description = freezed,
|
|
Object? scheduledDates = null,
|
|
Object? status = null,
|
|
}) {
|
|
return _then(_$MaintenanceScheduleImpl(
|
|
equipmentHistoryId: null == equipmentHistoryId
|
|
? _value.equipmentHistoryId
|
|
: equipmentHistoryId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
maintenanceType: null == maintenanceType
|
|
? _value.maintenanceType
|
|
: maintenanceType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
periodMonths: null == periodMonths
|
|
? _value.periodMonths
|
|
: periodMonths // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
lastMaintenanceDate: freezed == lastMaintenanceDate
|
|
? _value.lastMaintenanceDate
|
|
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
nextMaintenanceDate: freezed == nextMaintenanceDate
|
|
? _value.nextMaintenanceDate
|
|
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
cost: null == cost
|
|
? _value.cost
|
|
: cost // ignore: cast_nullable_to_non_nullable
|
|
as double,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
scheduledDates: null == scheduledDates
|
|
? _value._scheduledDates
|
|
: scheduledDates // ignore: cast_nullable_to_non_nullable
|
|
as List<DateTime>,
|
|
status: null == status
|
|
? _value.status
|
|
: status // ignore: cast_nullable_to_non_nullable
|
|
as MaintenanceScheduleStatus,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$MaintenanceScheduleImpl extends _MaintenanceSchedule {
|
|
const _$MaintenanceScheduleImpl(
|
|
{required this.equipmentHistoryId,
|
|
required this.maintenanceType,
|
|
required this.periodMonths,
|
|
required this.startDate,
|
|
required this.endDate,
|
|
this.lastMaintenanceDate,
|
|
this.nextMaintenanceDate,
|
|
required this.cost,
|
|
this.description,
|
|
final List<DateTime> scheduledDates = const [],
|
|
this.status = MaintenanceScheduleStatus.active})
|
|
: _scheduledDates = scheduledDates,
|
|
super._();
|
|
|
|
@override
|
|
final int equipmentHistoryId;
|
|
@override
|
|
final String maintenanceType;
|
|
@override
|
|
final int periodMonths;
|
|
@override
|
|
final DateTime startDate;
|
|
@override
|
|
final DateTime endDate;
|
|
@override
|
|
final DateTime? lastMaintenanceDate;
|
|
@override
|
|
final DateTime? nextMaintenanceDate;
|
|
@override
|
|
final double cost;
|
|
@override
|
|
final String? description;
|
|
final List<DateTime> _scheduledDates;
|
|
@override
|
|
@JsonKey()
|
|
List<DateTime> get scheduledDates {
|
|
if (_scheduledDates is EqualUnmodifiableListView) return _scheduledDates;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_scheduledDates);
|
|
}
|
|
|
|
@override
|
|
@JsonKey()
|
|
final MaintenanceScheduleStatus status;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'MaintenanceSchedule(equipmentHistoryId: $equipmentHistoryId, maintenanceType: $maintenanceType, periodMonths: $periodMonths, startDate: $startDate, endDate: $endDate, lastMaintenanceDate: $lastMaintenanceDate, nextMaintenanceDate: $nextMaintenanceDate, cost: $cost, description: $description, scheduledDates: $scheduledDates, status: $status)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$MaintenanceScheduleImpl &&
|
|
(identical(other.equipmentHistoryId, equipmentHistoryId) ||
|
|
other.equipmentHistoryId == equipmentHistoryId) &&
|
|
(identical(other.maintenanceType, maintenanceType) ||
|
|
other.maintenanceType == maintenanceType) &&
|
|
(identical(other.periodMonths, periodMonths) ||
|
|
other.periodMonths == periodMonths) &&
|
|
(identical(other.startDate, startDate) ||
|
|
other.startDate == startDate) &&
|
|
(identical(other.endDate, endDate) || other.endDate == endDate) &&
|
|
(identical(other.lastMaintenanceDate, lastMaintenanceDate) ||
|
|
other.lastMaintenanceDate == lastMaintenanceDate) &&
|
|
(identical(other.nextMaintenanceDate, nextMaintenanceDate) ||
|
|
other.nextMaintenanceDate == nextMaintenanceDate) &&
|
|
(identical(other.cost, cost) || other.cost == cost) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._scheduledDates, _scheduledDates) &&
|
|
(identical(other.status, status) || other.status == status));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
equipmentHistoryId,
|
|
maintenanceType,
|
|
periodMonths,
|
|
startDate,
|
|
endDate,
|
|
lastMaintenanceDate,
|
|
nextMaintenanceDate,
|
|
cost,
|
|
description,
|
|
const DeepCollectionEquality().hash(_scheduledDates),
|
|
status);
|
|
|
|
/// Create a copy of MaintenanceSchedule
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$MaintenanceScheduleImplCopyWith<_$MaintenanceScheduleImpl> get copyWith =>
|
|
__$$MaintenanceScheduleImplCopyWithImpl<_$MaintenanceScheduleImpl>(
|
|
this, _$identity);
|
|
}
|
|
|
|
abstract class _MaintenanceSchedule extends MaintenanceSchedule {
|
|
const factory _MaintenanceSchedule(
|
|
{required final int equipmentHistoryId,
|
|
required final String maintenanceType,
|
|
required final int periodMonths,
|
|
required final DateTime startDate,
|
|
required final DateTime endDate,
|
|
final DateTime? lastMaintenanceDate,
|
|
final DateTime? nextMaintenanceDate,
|
|
required final double cost,
|
|
final String? description,
|
|
final List<DateTime> scheduledDates,
|
|
final MaintenanceScheduleStatus status}) = _$MaintenanceScheduleImpl;
|
|
const _MaintenanceSchedule._() : super._();
|
|
|
|
@override
|
|
int get equipmentHistoryId;
|
|
@override
|
|
String get maintenanceType;
|
|
@override
|
|
int get periodMonths;
|
|
@override
|
|
DateTime get startDate;
|
|
@override
|
|
DateTime get endDate;
|
|
@override
|
|
DateTime? get lastMaintenanceDate;
|
|
@override
|
|
DateTime? get nextMaintenanceDate;
|
|
@override
|
|
double get cost;
|
|
@override
|
|
String? get description;
|
|
@override
|
|
List<DateTime> get scheduledDates;
|
|
@override
|
|
MaintenanceScheduleStatus get status;
|
|
|
|
/// Create a copy of MaintenanceSchedule
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$MaintenanceScheduleImplCopyWith<_$MaintenanceScheduleImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$MaintenanceAlert {
|
|
int get maintenanceId => throw _privateConstructorUsedError;
|
|
int get equipmentHistoryId => throw _privateConstructorUsedError;
|
|
String get equipmentName => throw _privateConstructorUsedError;
|
|
DateTime get scheduledDate => throw _privateConstructorUsedError;
|
|
String get maintenanceType => throw _privateConstructorUsedError;
|
|
int get daysUntil => throw _privateConstructorUsedError;
|
|
AlertPriority get priority => throw _privateConstructorUsedError;
|
|
String? get description => throw _privateConstructorUsedError;
|
|
double? get estimatedCost => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of MaintenanceAlert
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$MaintenanceAlertCopyWith<MaintenanceAlert> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $MaintenanceAlertCopyWith<$Res> {
|
|
factory $MaintenanceAlertCopyWith(
|
|
MaintenanceAlert value, $Res Function(MaintenanceAlert) then) =
|
|
_$MaintenanceAlertCopyWithImpl<$Res, MaintenanceAlert>;
|
|
@useResult
|
|
$Res call(
|
|
{int maintenanceId,
|
|
int equipmentHistoryId,
|
|
String equipmentName,
|
|
DateTime scheduledDate,
|
|
String maintenanceType,
|
|
int daysUntil,
|
|
AlertPriority priority,
|
|
String? description,
|
|
double? estimatedCost});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$MaintenanceAlertCopyWithImpl<$Res, $Val extends MaintenanceAlert>
|
|
implements $MaintenanceAlertCopyWith<$Res> {
|
|
_$MaintenanceAlertCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of MaintenanceAlert
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? maintenanceId = null,
|
|
Object? equipmentHistoryId = null,
|
|
Object? equipmentName = null,
|
|
Object? scheduledDate = null,
|
|
Object? maintenanceType = null,
|
|
Object? daysUntil = null,
|
|
Object? priority = null,
|
|
Object? description = freezed,
|
|
Object? estimatedCost = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
maintenanceId: null == maintenanceId
|
|
? _value.maintenanceId
|
|
: maintenanceId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentHistoryId: null == equipmentHistoryId
|
|
? _value.equipmentHistoryId
|
|
: equipmentHistoryId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentName: null == equipmentName
|
|
? _value.equipmentName
|
|
: equipmentName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
scheduledDate: null == scheduledDate
|
|
? _value.scheduledDate
|
|
: scheduledDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
maintenanceType: null == maintenanceType
|
|
? _value.maintenanceType
|
|
: maintenanceType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
daysUntil: null == daysUntil
|
|
? _value.daysUntil
|
|
: daysUntil // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
priority: null == priority
|
|
? _value.priority
|
|
: priority // ignore: cast_nullable_to_non_nullable
|
|
as AlertPriority,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
estimatedCost: freezed == estimatedCost
|
|
? _value.estimatedCost
|
|
: estimatedCost // ignore: cast_nullable_to_non_nullable
|
|
as double?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$MaintenanceAlertImplCopyWith<$Res>
|
|
implements $MaintenanceAlertCopyWith<$Res> {
|
|
factory _$$MaintenanceAlertImplCopyWith(_$MaintenanceAlertImpl value,
|
|
$Res Function(_$MaintenanceAlertImpl) then) =
|
|
__$$MaintenanceAlertImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int maintenanceId,
|
|
int equipmentHistoryId,
|
|
String equipmentName,
|
|
DateTime scheduledDate,
|
|
String maintenanceType,
|
|
int daysUntil,
|
|
AlertPriority priority,
|
|
String? description,
|
|
double? estimatedCost});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$MaintenanceAlertImplCopyWithImpl<$Res>
|
|
extends _$MaintenanceAlertCopyWithImpl<$Res, _$MaintenanceAlertImpl>
|
|
implements _$$MaintenanceAlertImplCopyWith<$Res> {
|
|
__$$MaintenanceAlertImplCopyWithImpl(_$MaintenanceAlertImpl _value,
|
|
$Res Function(_$MaintenanceAlertImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of MaintenanceAlert
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? maintenanceId = null,
|
|
Object? equipmentHistoryId = null,
|
|
Object? equipmentName = null,
|
|
Object? scheduledDate = null,
|
|
Object? maintenanceType = null,
|
|
Object? daysUntil = null,
|
|
Object? priority = null,
|
|
Object? description = freezed,
|
|
Object? estimatedCost = freezed,
|
|
}) {
|
|
return _then(_$MaintenanceAlertImpl(
|
|
maintenanceId: null == maintenanceId
|
|
? _value.maintenanceId
|
|
: maintenanceId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentHistoryId: null == equipmentHistoryId
|
|
? _value.equipmentHistoryId
|
|
: equipmentHistoryId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentName: null == equipmentName
|
|
? _value.equipmentName
|
|
: equipmentName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
scheduledDate: null == scheduledDate
|
|
? _value.scheduledDate
|
|
: scheduledDate // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
maintenanceType: null == maintenanceType
|
|
? _value.maintenanceType
|
|
: maintenanceType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
daysUntil: null == daysUntil
|
|
? _value.daysUntil
|
|
: daysUntil // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
priority: null == priority
|
|
? _value.priority
|
|
: priority // ignore: cast_nullable_to_non_nullable
|
|
as AlertPriority,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
estimatedCost: freezed == estimatedCost
|
|
? _value.estimatedCost
|
|
: estimatedCost // ignore: cast_nullable_to_non_nullable
|
|
as double?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$MaintenanceAlertImpl extends _MaintenanceAlert {
|
|
const _$MaintenanceAlertImpl(
|
|
{required this.maintenanceId,
|
|
required this.equipmentHistoryId,
|
|
required this.equipmentName,
|
|
required this.scheduledDate,
|
|
required this.maintenanceType,
|
|
required this.daysUntil,
|
|
required this.priority,
|
|
this.description,
|
|
this.estimatedCost})
|
|
: super._();
|
|
|
|
@override
|
|
final int maintenanceId;
|
|
@override
|
|
final int equipmentHistoryId;
|
|
@override
|
|
final String equipmentName;
|
|
@override
|
|
final DateTime scheduledDate;
|
|
@override
|
|
final String maintenanceType;
|
|
@override
|
|
final int daysUntil;
|
|
@override
|
|
final AlertPriority priority;
|
|
@override
|
|
final String? description;
|
|
@override
|
|
final double? estimatedCost;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'MaintenanceAlert(maintenanceId: $maintenanceId, equipmentHistoryId: $equipmentHistoryId, equipmentName: $equipmentName, scheduledDate: $scheduledDate, maintenanceType: $maintenanceType, daysUntil: $daysUntil, priority: $priority, description: $description, estimatedCost: $estimatedCost)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$MaintenanceAlertImpl &&
|
|
(identical(other.maintenanceId, maintenanceId) ||
|
|
other.maintenanceId == maintenanceId) &&
|
|
(identical(other.equipmentHistoryId, equipmentHistoryId) ||
|
|
other.equipmentHistoryId == equipmentHistoryId) &&
|
|
(identical(other.equipmentName, equipmentName) ||
|
|
other.equipmentName == equipmentName) &&
|
|
(identical(other.scheduledDate, scheduledDate) ||
|
|
other.scheduledDate == scheduledDate) &&
|
|
(identical(other.maintenanceType, maintenanceType) ||
|
|
other.maintenanceType == maintenanceType) &&
|
|
(identical(other.daysUntil, daysUntil) ||
|
|
other.daysUntil == daysUntil) &&
|
|
(identical(other.priority, priority) ||
|
|
other.priority == priority) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description) &&
|
|
(identical(other.estimatedCost, estimatedCost) ||
|
|
other.estimatedCost == estimatedCost));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
maintenanceId,
|
|
equipmentHistoryId,
|
|
equipmentName,
|
|
scheduledDate,
|
|
maintenanceType,
|
|
daysUntil,
|
|
priority,
|
|
description,
|
|
estimatedCost);
|
|
|
|
/// Create a copy of MaintenanceAlert
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$MaintenanceAlertImplCopyWith<_$MaintenanceAlertImpl> get copyWith =>
|
|
__$$MaintenanceAlertImplCopyWithImpl<_$MaintenanceAlertImpl>(
|
|
this, _$identity);
|
|
}
|
|
|
|
abstract class _MaintenanceAlert extends MaintenanceAlert {
|
|
const factory _MaintenanceAlert(
|
|
{required final int maintenanceId,
|
|
required final int equipmentHistoryId,
|
|
required final String equipmentName,
|
|
required final DateTime scheduledDate,
|
|
required final String maintenanceType,
|
|
required final int daysUntil,
|
|
required final AlertPriority priority,
|
|
final String? description,
|
|
final double? estimatedCost}) = _$MaintenanceAlertImpl;
|
|
const _MaintenanceAlert._() : super._();
|
|
|
|
@override
|
|
int get maintenanceId;
|
|
@override
|
|
int get equipmentHistoryId;
|
|
@override
|
|
String get equipmentName;
|
|
@override
|
|
DateTime get scheduledDate;
|
|
@override
|
|
String get maintenanceType;
|
|
@override
|
|
int get daysUntil;
|
|
@override
|
|
AlertPriority get priority;
|
|
@override
|
|
String? get description;
|
|
@override
|
|
double? get estimatedCost;
|
|
|
|
/// Create a copy of MaintenanceAlert
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$MaintenanceAlertImplCopyWith<_$MaintenanceAlertImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|