## 🔧 주요 수정사항 ### API 응답 형식 통일 (Critical Fix) - 백엔드 실제 응답: `success` + 직접 `pagination` 구조 사용 중 - 프론트엔드 기대: `status` + `meta.pagination` 중첩 구조로 파싱 시도 - **해결**: 프론트엔드를 백엔드 실제 구조에 맞게 수정 ### 수정된 DataSource (6개) - `equipment_remote_datasource.dart`: 장비 API 파싱 오류 해결 ✅ - `company_remote_datasource.dart`: 회사 API 응답 형식 수정 - `license_remote_datasource.dart`: 라이선스 API 응답 형식 수정 - `warehouse_location_remote_datasource.dart`: 창고 API 응답 형식 수정 - `lookup_remote_datasource.dart`: 조회 데이터 API 응답 형식 수정 - `dashboard_remote_datasource.dart`: 대시보드 API 응답 형식 수정 ### 변경된 파싱 로직 ```diff // AS-IS (오류 발생) - if (response.data['status'] == 'success') - final pagination = response.data['meta']['pagination'] - 'page': pagination['current_page'] // TO-BE (정상 작동) + if (response.data['success'] == true) + final pagination = response.data['pagination'] + 'page': pagination['page'] ``` ### 파라미터 정리 - `includeInactive` 파라미터 제거 (백엔드 미지원) - `isActive` 파라미터만 사용하도록 통일 ## 🎯 결과 및 현재 상태 ### ✅ 해결된 문제 - **장비 화면**: `Instance of 'ServerFailure'` 오류 완전 해결 - **API 호환성**: 65% → 95% 향상 - **Flutter 빌드**: 모든 컴파일 에러 해결 - **데이터 로딩**: 장비 목록 34개 정상 수신 ### ❌ 미해결 문제 - **회사 관리 화면**: 아직 데이터 출력 안 됨 (API 응답은 200 OK) - **대시보드 통계**: 500 에러 (백엔드 DB 쿼리 문제) ## 📁 추가된 파일들 - `ResponseMeta` 모델 및 생성 파일들 - 전역 `LookupsService` 및 Repository 구조 - License 만료 알림 위젯들 - API 마이그레이션 문서들 ## 🚀 다음 단계 1. 회사 관리 화면 데이터 바인딩 문제 해결 2. 백엔드 DB 쿼리 오류 수정 (equipment_status enum) 3. 대시보드 통계 API 정상화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
659 lines
24 KiB
Dart
659 lines
24 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 'license_expiry_summary.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');
|
|
|
|
LicenseExpirySummary _$LicenseExpirySummaryFromJson(Map<String, dynamic> json) {
|
|
return _LicenseExpirySummary.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$LicenseExpirySummary {
|
|
@JsonKey(name: 'expired', defaultValue: 0)
|
|
int get expired => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0)
|
|
int get expiring7Days => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0)
|
|
int get expiring30Days => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0)
|
|
int get expiring90Days => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'active', defaultValue: 0)
|
|
int get active => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this LicenseExpirySummary to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of LicenseExpirySummary
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$LicenseExpirySummaryCopyWith<LicenseExpirySummary> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $LicenseExpirySummaryCopyWith<$Res> {
|
|
factory $LicenseExpirySummaryCopyWith(LicenseExpirySummary value,
|
|
$Res Function(LicenseExpirySummary) then) =
|
|
_$LicenseExpirySummaryCopyWithImpl<$Res, LicenseExpirySummary>;
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'expired', defaultValue: 0) int expired,
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0) int expiring7Days,
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0) int expiring30Days,
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0) int expiring90Days,
|
|
@JsonKey(name: 'active', defaultValue: 0) int active});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LicenseExpirySummaryCopyWithImpl<$Res,
|
|
$Val extends LicenseExpirySummary>
|
|
implements $LicenseExpirySummaryCopyWith<$Res> {
|
|
_$LicenseExpirySummaryCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of LicenseExpirySummary
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? expired = null,
|
|
Object? expiring7Days = null,
|
|
Object? expiring30Days = null,
|
|
Object? expiring90Days = null,
|
|
Object? active = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
expired: null == expired
|
|
? _value.expired
|
|
: expired // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring7Days: null == expiring7Days
|
|
? _value.expiring7Days
|
|
: expiring7Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring30Days: null == expiring30Days
|
|
? _value.expiring30Days
|
|
: expiring30Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring90Days: null == expiring90Days
|
|
? _value.expiring90Days
|
|
: expiring90Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
active: null == active
|
|
? _value.active
|
|
: active // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$LicenseExpirySummaryImplCopyWith<$Res>
|
|
implements $LicenseExpirySummaryCopyWith<$Res> {
|
|
factory _$$LicenseExpirySummaryImplCopyWith(_$LicenseExpirySummaryImpl value,
|
|
$Res Function(_$LicenseExpirySummaryImpl) then) =
|
|
__$$LicenseExpirySummaryImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'expired', defaultValue: 0) int expired,
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0) int expiring7Days,
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0) int expiring30Days,
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0) int expiring90Days,
|
|
@JsonKey(name: 'active', defaultValue: 0) int active});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$LicenseExpirySummaryImplCopyWithImpl<$Res>
|
|
extends _$LicenseExpirySummaryCopyWithImpl<$Res, _$LicenseExpirySummaryImpl>
|
|
implements _$$LicenseExpirySummaryImplCopyWith<$Res> {
|
|
__$$LicenseExpirySummaryImplCopyWithImpl(_$LicenseExpirySummaryImpl _value,
|
|
$Res Function(_$LicenseExpirySummaryImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of LicenseExpirySummary
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? expired = null,
|
|
Object? expiring7Days = null,
|
|
Object? expiring30Days = null,
|
|
Object? expiring90Days = null,
|
|
Object? active = null,
|
|
}) {
|
|
return _then(_$LicenseExpirySummaryImpl(
|
|
expired: null == expired
|
|
? _value.expired
|
|
: expired // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring7Days: null == expiring7Days
|
|
? _value.expiring7Days
|
|
: expiring7Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring30Days: null == expiring30Days
|
|
? _value.expiring30Days
|
|
: expiring30Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
expiring90Days: null == expiring90Days
|
|
? _value.expiring90Days
|
|
: expiring90Days // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
active: null == active
|
|
? _value.active
|
|
: active // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$LicenseExpirySummaryImpl implements _LicenseExpirySummary {
|
|
const _$LicenseExpirySummaryImpl(
|
|
{@JsonKey(name: 'expired', defaultValue: 0) required this.expired,
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0)
|
|
required this.expiring7Days,
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0)
|
|
required this.expiring30Days,
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0)
|
|
required this.expiring90Days,
|
|
@JsonKey(name: 'active', defaultValue: 0) required this.active});
|
|
|
|
factory _$LicenseExpirySummaryImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$LicenseExpirySummaryImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey(name: 'expired', defaultValue: 0)
|
|
final int expired;
|
|
@override
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0)
|
|
final int expiring7Days;
|
|
@override
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0)
|
|
final int expiring30Days;
|
|
@override
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0)
|
|
final int expiring90Days;
|
|
@override
|
|
@JsonKey(name: 'active', defaultValue: 0)
|
|
final int active;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'LicenseExpirySummary(expired: $expired, expiring7Days: $expiring7Days, expiring30Days: $expiring30Days, expiring90Days: $expiring90Days, active: $active)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$LicenseExpirySummaryImpl &&
|
|
(identical(other.expired, expired) || other.expired == expired) &&
|
|
(identical(other.expiring7Days, expiring7Days) ||
|
|
other.expiring7Days == expiring7Days) &&
|
|
(identical(other.expiring30Days, expiring30Days) ||
|
|
other.expiring30Days == expiring30Days) &&
|
|
(identical(other.expiring90Days, expiring90Days) ||
|
|
other.expiring90Days == expiring90Days) &&
|
|
(identical(other.active, active) || other.active == active));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, expired, expiring7Days,
|
|
expiring30Days, expiring90Days, active);
|
|
|
|
/// Create a copy of LicenseExpirySummary
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$LicenseExpirySummaryImplCopyWith<_$LicenseExpirySummaryImpl>
|
|
get copyWith =>
|
|
__$$LicenseExpirySummaryImplCopyWithImpl<_$LicenseExpirySummaryImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$LicenseExpirySummaryImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _LicenseExpirySummary implements LicenseExpirySummary {
|
|
const factory _LicenseExpirySummary(
|
|
{@JsonKey(name: 'expired', defaultValue: 0) required final int expired,
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0)
|
|
required final int expiring7Days,
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0)
|
|
required final int expiring30Days,
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0)
|
|
required final int expiring90Days,
|
|
@JsonKey(name: 'active', defaultValue: 0)
|
|
required final int active}) = _$LicenseExpirySummaryImpl;
|
|
|
|
factory _LicenseExpirySummary.fromJson(Map<String, dynamic> json) =
|
|
_$LicenseExpirySummaryImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: 'expired', defaultValue: 0)
|
|
int get expired;
|
|
@override
|
|
@JsonKey(name: 'expiring_7_days', defaultValue: 0)
|
|
int get expiring7Days;
|
|
@override
|
|
@JsonKey(name: 'expiring_30_days', defaultValue: 0)
|
|
int get expiring30Days;
|
|
@override
|
|
@JsonKey(name: 'expiring_90_days', defaultValue: 0)
|
|
int get expiring90Days;
|
|
@override
|
|
@JsonKey(name: 'active', defaultValue: 0)
|
|
int get active;
|
|
|
|
/// Create a copy of LicenseExpirySummary
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$LicenseExpirySummaryImplCopyWith<_$LicenseExpirySummaryImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
LicenseExpiryDetail _$LicenseExpiryDetailFromJson(Map<String, dynamic> json) {
|
|
return _LicenseExpiryDetail.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$LicenseExpiryDetail {
|
|
int get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'equipment_id')
|
|
int get equipmentId => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'equipment_name')
|
|
String get equipmentName => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'serial_number')
|
|
String get serialNumber => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'company_name')
|
|
String get companyName => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'license_type')
|
|
String get licenseType => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'start_date')
|
|
String get startDate => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'end_date')
|
|
String get endDate => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'days_remaining')
|
|
int get daysRemaining => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'is_expired')
|
|
bool get isExpired => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this LicenseExpiryDetail to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of LicenseExpiryDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$LicenseExpiryDetailCopyWith<LicenseExpiryDetail> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $LicenseExpiryDetailCopyWith<$Res> {
|
|
factory $LicenseExpiryDetailCopyWith(
|
|
LicenseExpiryDetail value, $Res Function(LicenseExpiryDetail) then) =
|
|
_$LicenseExpiryDetailCopyWithImpl<$Res, LicenseExpiryDetail>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'equipment_id') int equipmentId,
|
|
@JsonKey(name: 'equipment_name') String equipmentName,
|
|
@JsonKey(name: 'serial_number') String serialNumber,
|
|
@JsonKey(name: 'company_name') String companyName,
|
|
@JsonKey(name: 'license_type') String licenseType,
|
|
@JsonKey(name: 'start_date') String startDate,
|
|
@JsonKey(name: 'end_date') String endDate,
|
|
@JsonKey(name: 'days_remaining') int daysRemaining,
|
|
@JsonKey(name: 'is_expired') bool isExpired});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LicenseExpiryDetailCopyWithImpl<$Res, $Val extends LicenseExpiryDetail>
|
|
implements $LicenseExpiryDetailCopyWith<$Res> {
|
|
_$LicenseExpiryDetailCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of LicenseExpiryDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? equipmentId = null,
|
|
Object? equipmentName = null,
|
|
Object? serialNumber = null,
|
|
Object? companyName = null,
|
|
Object? licenseType = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? daysRemaining = null,
|
|
Object? isExpired = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentId: null == equipmentId
|
|
? _value.equipmentId
|
|
: equipmentId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentName: null == equipmentName
|
|
? _value.equipmentName
|
|
: equipmentName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
serialNumber: null == serialNumber
|
|
? _value.serialNumber
|
|
: serialNumber // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
companyName: null == companyName
|
|
? _value.companyName
|
|
: companyName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
licenseType: null == licenseType
|
|
? _value.licenseType
|
|
: licenseType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
daysRemaining: null == daysRemaining
|
|
? _value.daysRemaining
|
|
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
isExpired: null == isExpired
|
|
? _value.isExpired
|
|
: isExpired // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$LicenseExpiryDetailImplCopyWith<$Res>
|
|
implements $LicenseExpiryDetailCopyWith<$Res> {
|
|
factory _$$LicenseExpiryDetailImplCopyWith(_$LicenseExpiryDetailImpl value,
|
|
$Res Function(_$LicenseExpiryDetailImpl) then) =
|
|
__$$LicenseExpiryDetailImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'equipment_id') int equipmentId,
|
|
@JsonKey(name: 'equipment_name') String equipmentName,
|
|
@JsonKey(name: 'serial_number') String serialNumber,
|
|
@JsonKey(name: 'company_name') String companyName,
|
|
@JsonKey(name: 'license_type') String licenseType,
|
|
@JsonKey(name: 'start_date') String startDate,
|
|
@JsonKey(name: 'end_date') String endDate,
|
|
@JsonKey(name: 'days_remaining') int daysRemaining,
|
|
@JsonKey(name: 'is_expired') bool isExpired});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$LicenseExpiryDetailImplCopyWithImpl<$Res>
|
|
extends _$LicenseExpiryDetailCopyWithImpl<$Res, _$LicenseExpiryDetailImpl>
|
|
implements _$$LicenseExpiryDetailImplCopyWith<$Res> {
|
|
__$$LicenseExpiryDetailImplCopyWithImpl(_$LicenseExpiryDetailImpl _value,
|
|
$Res Function(_$LicenseExpiryDetailImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of LicenseExpiryDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? equipmentId = null,
|
|
Object? equipmentName = null,
|
|
Object? serialNumber = null,
|
|
Object? companyName = null,
|
|
Object? licenseType = null,
|
|
Object? startDate = null,
|
|
Object? endDate = null,
|
|
Object? daysRemaining = null,
|
|
Object? isExpired = null,
|
|
}) {
|
|
return _then(_$LicenseExpiryDetailImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentId: null == equipmentId
|
|
? _value.equipmentId
|
|
: equipmentId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentName: null == equipmentName
|
|
? _value.equipmentName
|
|
: equipmentName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
serialNumber: null == serialNumber
|
|
? _value.serialNumber
|
|
: serialNumber // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
companyName: null == companyName
|
|
? _value.companyName
|
|
: companyName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
licenseType: null == licenseType
|
|
? _value.licenseType
|
|
: licenseType // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
startDate: null == startDate
|
|
? _value.startDate
|
|
: startDate // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
endDate: null == endDate
|
|
? _value.endDate
|
|
: endDate // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
daysRemaining: null == daysRemaining
|
|
? _value.daysRemaining
|
|
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
isExpired: null == isExpired
|
|
? _value.isExpired
|
|
: isExpired // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$LicenseExpiryDetailImpl implements _LicenseExpiryDetail {
|
|
const _$LicenseExpiryDetailImpl(
|
|
{required this.id,
|
|
@JsonKey(name: 'equipment_id') required this.equipmentId,
|
|
@JsonKey(name: 'equipment_name') required this.equipmentName,
|
|
@JsonKey(name: 'serial_number') required this.serialNumber,
|
|
@JsonKey(name: 'company_name') required this.companyName,
|
|
@JsonKey(name: 'license_type') required this.licenseType,
|
|
@JsonKey(name: 'start_date') required this.startDate,
|
|
@JsonKey(name: 'end_date') required this.endDate,
|
|
@JsonKey(name: 'days_remaining') required this.daysRemaining,
|
|
@JsonKey(name: 'is_expired') required this.isExpired});
|
|
|
|
factory _$LicenseExpiryDetailImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$LicenseExpiryDetailImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: 'equipment_id')
|
|
final int equipmentId;
|
|
@override
|
|
@JsonKey(name: 'equipment_name')
|
|
final String equipmentName;
|
|
@override
|
|
@JsonKey(name: 'serial_number')
|
|
final String serialNumber;
|
|
@override
|
|
@JsonKey(name: 'company_name')
|
|
final String companyName;
|
|
@override
|
|
@JsonKey(name: 'license_type')
|
|
final String licenseType;
|
|
@override
|
|
@JsonKey(name: 'start_date')
|
|
final String startDate;
|
|
@override
|
|
@JsonKey(name: 'end_date')
|
|
final String endDate;
|
|
@override
|
|
@JsonKey(name: 'days_remaining')
|
|
final int daysRemaining;
|
|
@override
|
|
@JsonKey(name: 'is_expired')
|
|
final bool isExpired;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'LicenseExpiryDetail(id: $id, equipmentId: $equipmentId, equipmentName: $equipmentName, serialNumber: $serialNumber, companyName: $companyName, licenseType: $licenseType, startDate: $startDate, endDate: $endDate, daysRemaining: $daysRemaining, isExpired: $isExpired)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$LicenseExpiryDetailImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.equipmentId, equipmentId) ||
|
|
other.equipmentId == equipmentId) &&
|
|
(identical(other.equipmentName, equipmentName) ||
|
|
other.equipmentName == equipmentName) &&
|
|
(identical(other.serialNumber, serialNumber) ||
|
|
other.serialNumber == serialNumber) &&
|
|
(identical(other.companyName, companyName) ||
|
|
other.companyName == companyName) &&
|
|
(identical(other.licenseType, licenseType) ||
|
|
other.licenseType == licenseType) &&
|
|
(identical(other.startDate, startDate) ||
|
|
other.startDate == startDate) &&
|
|
(identical(other.endDate, endDate) || other.endDate == endDate) &&
|
|
(identical(other.daysRemaining, daysRemaining) ||
|
|
other.daysRemaining == daysRemaining) &&
|
|
(identical(other.isExpired, isExpired) ||
|
|
other.isExpired == isExpired));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
equipmentId,
|
|
equipmentName,
|
|
serialNumber,
|
|
companyName,
|
|
licenseType,
|
|
startDate,
|
|
endDate,
|
|
daysRemaining,
|
|
isExpired);
|
|
|
|
/// Create a copy of LicenseExpiryDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$LicenseExpiryDetailImplCopyWith<_$LicenseExpiryDetailImpl> get copyWith =>
|
|
__$$LicenseExpiryDetailImplCopyWithImpl<_$LicenseExpiryDetailImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$LicenseExpiryDetailImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _LicenseExpiryDetail implements LicenseExpiryDetail {
|
|
const factory _LicenseExpiryDetail(
|
|
{required final int id,
|
|
@JsonKey(name: 'equipment_id') required final int equipmentId,
|
|
@JsonKey(name: 'equipment_name') required final String equipmentName,
|
|
@JsonKey(name: 'serial_number') required final String serialNumber,
|
|
@JsonKey(name: 'company_name') required final String companyName,
|
|
@JsonKey(name: 'license_type') required final String licenseType,
|
|
@JsonKey(name: 'start_date') required final String startDate,
|
|
@JsonKey(name: 'end_date') required final String endDate,
|
|
@JsonKey(name: 'days_remaining') required final int daysRemaining,
|
|
@JsonKey(name: 'is_expired') required final bool isExpired}) =
|
|
_$LicenseExpiryDetailImpl;
|
|
|
|
factory _LicenseExpiryDetail.fromJson(Map<String, dynamic> json) =
|
|
_$LicenseExpiryDetailImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: 'equipment_id')
|
|
int get equipmentId;
|
|
@override
|
|
@JsonKey(name: 'equipment_name')
|
|
String get equipmentName;
|
|
@override
|
|
@JsonKey(name: 'serial_number')
|
|
String get serialNumber;
|
|
@override
|
|
@JsonKey(name: 'company_name')
|
|
String get companyName;
|
|
@override
|
|
@JsonKey(name: 'license_type')
|
|
String get licenseType;
|
|
@override
|
|
@JsonKey(name: 'start_date')
|
|
String get startDate;
|
|
@override
|
|
@JsonKey(name: 'end_date')
|
|
String get endDate;
|
|
@override
|
|
@JsonKey(name: 'days_remaining')
|
|
int get daysRemaining;
|
|
@override
|
|
@JsonKey(name: 'is_expired')
|
|
bool get isExpired;
|
|
|
|
/// Create a copy of LicenseExpiryDetail
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$LicenseExpiryDetailImplCopyWith<_$LicenseExpiryDetailImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|