fix: API 응답 파싱 오류 수정 및 에러 처리 개선
주요 변경사항: - 창고 관리 API 응답 구조와 DTO 불일치 수정 - WarehouseLocationDto에 code, manager_phone 필드 추가 - RemoteDataSource에서 API 응답을 DTO 구조에 맞게 변환 - 회사 관리 API 응답 파싱 오류 수정 - CompanyResponse의 필수 필드를 nullable로 변경 - PaginatedResponse 구조 매핑 로직 개선 - 에러 처리 및 로깅 개선 - Service Layer에 상세 에러 로깅 추가 - Controller에서 에러 타입별 처리 - 새로운 유틸리티 추가 - ResponseInterceptor: API 응답 정규화 - DebugLogger: 디버깅 도구 - HealthCheckService: 서버 상태 확인 - 문서화 - API 통합 테스트 가이드 - 에러 분석 보고서 - 리팩토링 계획서
This commit is contained in:
@@ -7,11 +7,13 @@ part 'expiring_license.g.dart';
|
||||
class ExpiringLicense with _$ExpiringLicense {
|
||||
const factory ExpiringLicense({
|
||||
required int id,
|
||||
@JsonKey(name: 'license_name') required String licenseName,
|
||||
@JsonKey(name: 'license_key') required String licenseKey,
|
||||
@JsonKey(name: 'software_name') required String softwareName,
|
||||
@JsonKey(name: 'company_name') required String companyName,
|
||||
@JsonKey(name: 'expiry_date') required DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required int daysRemaining,
|
||||
@JsonKey(name: 'license_type') required String licenseType,
|
||||
@JsonKey(name: 'days_until_expiry') required int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') required bool autoRenew,
|
||||
}) = _ExpiringLicense;
|
||||
|
||||
factory ExpiringLicense.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -21,16 +21,20 @@ ExpiringLicense _$ExpiringLicenseFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$ExpiringLicense {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_name')
|
||||
String get licenseName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'software_name')
|
||||
String get softwareName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'company_name')
|
||||
String get companyName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime get expiryDate => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'days_remaining')
|
||||
int get daysRemaining => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'license_type')
|
||||
String get licenseType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
int get daysUntilExpiry => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
double get renewalCost => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'auto_renew')
|
||||
bool get autoRenew => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ExpiringLicense to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -50,11 +54,13 @@ abstract class $ExpiringLicenseCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'license_name') String licenseName,
|
||||
@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'software_name') String softwareName,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'expiry_date') DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') int daysRemaining,
|
||||
@JsonKey(name: 'license_type') String licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') bool autoRenew});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -73,20 +79,26 @@ class _$ExpiringLicenseCopyWithImpl<$Res, $Val extends ExpiringLicense>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? licenseName = null,
|
||||
Object? licenseKey = null,
|
||||
Object? softwareName = null,
|
||||
Object? companyName = null,
|
||||
Object? expiryDate = null,
|
||||
Object? daysRemaining = null,
|
||||
Object? licenseType = null,
|
||||
Object? daysUntilExpiry = null,
|
||||
Object? renewalCost = null,
|
||||
Object? autoRenew = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseName: null == licenseName
|
||||
? _value.licenseName
|
||||
: licenseName // ignore: cast_nullable_to_non_nullable
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
softwareName: null == softwareName
|
||||
? _value.softwareName
|
||||
: softwareName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyName: null == companyName
|
||||
? _value.companyName
|
||||
@@ -96,14 +108,18 @@ class _$ExpiringLicenseCopyWithImpl<$Res, $Val extends ExpiringLicense>
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
daysRemaining: null == daysRemaining
|
||||
? _value.daysRemaining
|
||||
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
||||
daysUntilExpiry: null == daysUntilExpiry
|
||||
? _value.daysUntilExpiry
|
||||
: daysUntilExpiry // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseType: null == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
renewalCost: null == renewalCost
|
||||
? _value.renewalCost
|
||||
: renewalCost // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
autoRenew: null == autoRenew
|
||||
? _value.autoRenew
|
||||
: autoRenew // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -118,11 +134,13 @@ abstract class _$$ExpiringLicenseImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'license_name') String licenseName,
|
||||
@JsonKey(name: 'license_key') String licenseKey,
|
||||
@JsonKey(name: 'software_name') String softwareName,
|
||||
@JsonKey(name: 'company_name') String companyName,
|
||||
@JsonKey(name: 'expiry_date') DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') int daysRemaining,
|
||||
@JsonKey(name: 'license_type') String licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') double renewalCost,
|
||||
@JsonKey(name: 'auto_renew') bool autoRenew});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -139,20 +157,26 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? licenseName = null,
|
||||
Object? licenseKey = null,
|
||||
Object? softwareName = null,
|
||||
Object? companyName = null,
|
||||
Object? expiryDate = null,
|
||||
Object? daysRemaining = null,
|
||||
Object? licenseType = null,
|
||||
Object? daysUntilExpiry = null,
|
||||
Object? renewalCost = null,
|
||||
Object? autoRenew = null,
|
||||
}) {
|
||||
return _then(_$ExpiringLicenseImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseName: null == licenseName
|
||||
? _value.licenseName
|
||||
: licenseName // ignore: cast_nullable_to_non_nullable
|
||||
licenseKey: null == licenseKey
|
||||
? _value.licenseKey
|
||||
: licenseKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
softwareName: null == softwareName
|
||||
? _value.softwareName
|
||||
: softwareName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
companyName: null == companyName
|
||||
? _value.companyName
|
||||
@@ -162,14 +186,18 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
? _value.expiryDate
|
||||
: expiryDate // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
daysRemaining: null == daysRemaining
|
||||
? _value.daysRemaining
|
||||
: daysRemaining // ignore: cast_nullable_to_non_nullable
|
||||
daysUntilExpiry: null == daysUntilExpiry
|
||||
? _value.daysUntilExpiry
|
||||
: daysUntilExpiry // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
licenseType: null == licenseType
|
||||
? _value.licenseType
|
||||
: licenseType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
renewalCost: null == renewalCost
|
||||
? _value.renewalCost
|
||||
: renewalCost // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
autoRenew: null == autoRenew
|
||||
? _value.autoRenew
|
||||
: autoRenew // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -179,11 +207,13 @@ class __$$ExpiringLicenseImplCopyWithImpl<$Res>
|
||||
class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
const _$ExpiringLicenseImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'license_name') required this.licenseName,
|
||||
@JsonKey(name: 'license_key') required this.licenseKey,
|
||||
@JsonKey(name: 'software_name') required this.softwareName,
|
||||
@JsonKey(name: 'company_name') required this.companyName,
|
||||
@JsonKey(name: 'expiry_date') required this.expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required this.daysRemaining,
|
||||
@JsonKey(name: 'license_type') required this.licenseType});
|
||||
@JsonKey(name: 'days_until_expiry') required this.daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required this.renewalCost,
|
||||
@JsonKey(name: 'auto_renew') required this.autoRenew});
|
||||
|
||||
factory _$ExpiringLicenseImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ExpiringLicenseImplFromJson(json);
|
||||
@@ -191,8 +221,11 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: 'license_name')
|
||||
final String licenseName;
|
||||
@JsonKey(name: 'license_key')
|
||||
final String licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'software_name')
|
||||
final String softwareName;
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
final String companyName;
|
||||
@@ -200,15 +233,18 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
@JsonKey(name: 'expiry_date')
|
||||
final DateTime expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'days_remaining')
|
||||
final int daysRemaining;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
final int daysUntilExpiry;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
final String licenseType;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
final double renewalCost;
|
||||
@override
|
||||
@JsonKey(name: 'auto_renew')
|
||||
final bool autoRenew;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ExpiringLicense(id: $id, licenseName: $licenseName, companyName: $companyName, expiryDate: $expiryDate, daysRemaining: $daysRemaining, licenseType: $licenseType)';
|
||||
return 'ExpiringLicense(id: $id, licenseKey: $licenseKey, softwareName: $softwareName, companyName: $companyName, expiryDate: $expiryDate, daysUntilExpiry: $daysUntilExpiry, renewalCost: $renewalCost, autoRenew: $autoRenew)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -217,22 +253,26 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ExpiringLicenseImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.licenseName, licenseName) ||
|
||||
other.licenseName == licenseName) &&
|
||||
(identical(other.licenseKey, licenseKey) ||
|
||||
other.licenseKey == licenseKey) &&
|
||||
(identical(other.softwareName, softwareName) ||
|
||||
other.softwareName == softwareName) &&
|
||||
(identical(other.companyName, companyName) ||
|
||||
other.companyName == companyName) &&
|
||||
(identical(other.expiryDate, expiryDate) ||
|
||||
other.expiryDate == expiryDate) &&
|
||||
(identical(other.daysRemaining, daysRemaining) ||
|
||||
other.daysRemaining == daysRemaining) &&
|
||||
(identical(other.licenseType, licenseType) ||
|
||||
other.licenseType == licenseType));
|
||||
(identical(other.daysUntilExpiry, daysUntilExpiry) ||
|
||||
other.daysUntilExpiry == daysUntilExpiry) &&
|
||||
(identical(other.renewalCost, renewalCost) ||
|
||||
other.renewalCost == renewalCost) &&
|
||||
(identical(other.autoRenew, autoRenew) ||
|
||||
other.autoRenew == autoRenew));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, licenseName, companyName,
|
||||
expiryDate, daysRemaining, licenseType);
|
||||
int get hashCode => Object.hash(runtimeType, id, licenseKey, softwareName,
|
||||
companyName, expiryDate, daysUntilExpiry, renewalCost, autoRenew);
|
||||
|
||||
/// Create a copy of ExpiringLicense
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -253,13 +293,15 @@ class _$ExpiringLicenseImpl implements _ExpiringLicense {
|
||||
|
||||
abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
const factory _ExpiringLicense(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'license_name') required final String licenseName,
|
||||
@JsonKey(name: 'company_name') required final String companyName,
|
||||
@JsonKey(name: 'expiry_date') required final DateTime expiryDate,
|
||||
@JsonKey(name: 'days_remaining') required final int daysRemaining,
|
||||
@JsonKey(name: 'license_type') required final String licenseType}) =
|
||||
_$ExpiringLicenseImpl;
|
||||
{required final int id,
|
||||
@JsonKey(name: 'license_key') required final String licenseKey,
|
||||
@JsonKey(name: 'software_name') required final String softwareName,
|
||||
@JsonKey(name: 'company_name') required final String companyName,
|
||||
@JsonKey(name: 'expiry_date') required final DateTime expiryDate,
|
||||
@JsonKey(name: 'days_until_expiry') required final int daysUntilExpiry,
|
||||
@JsonKey(name: 'renewal_cost') required final double renewalCost,
|
||||
@JsonKey(name: 'auto_renew')
|
||||
required final bool autoRenew}) = _$ExpiringLicenseImpl;
|
||||
|
||||
factory _ExpiringLicense.fromJson(Map<String, dynamic> json) =
|
||||
_$ExpiringLicenseImpl.fromJson;
|
||||
@@ -267,8 +309,11 @@ abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: 'license_name')
|
||||
String get licenseName;
|
||||
@JsonKey(name: 'license_key')
|
||||
String get licenseKey;
|
||||
@override
|
||||
@JsonKey(name: 'software_name')
|
||||
String get softwareName;
|
||||
@override
|
||||
@JsonKey(name: 'company_name')
|
||||
String get companyName;
|
||||
@@ -276,11 +321,14 @@ abstract class _ExpiringLicense implements ExpiringLicense {
|
||||
@JsonKey(name: 'expiry_date')
|
||||
DateTime get expiryDate;
|
||||
@override
|
||||
@JsonKey(name: 'days_remaining')
|
||||
int get daysRemaining;
|
||||
@JsonKey(name: 'days_until_expiry')
|
||||
int get daysUntilExpiry;
|
||||
@override
|
||||
@JsonKey(name: 'license_type')
|
||||
String get licenseType;
|
||||
@JsonKey(name: 'renewal_cost')
|
||||
double get renewalCost;
|
||||
@override
|
||||
@JsonKey(name: 'auto_renew')
|
||||
bool get autoRenew;
|
||||
|
||||
/// Create a copy of ExpiringLicense
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
@@ -10,20 +10,24 @@ _$ExpiringLicenseImpl _$$ExpiringLicenseImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpiringLicenseImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
licenseName: json['license_name'] as String,
|
||||
licenseKey: json['license_key'] as String,
|
||||
softwareName: json['software_name'] as String,
|
||||
companyName: json['company_name'] as String,
|
||||
expiryDate: DateTime.parse(json['expiry_date'] as String),
|
||||
daysRemaining: (json['days_remaining'] as num).toInt(),
|
||||
licenseType: json['license_type'] as String,
|
||||
daysUntilExpiry: (json['days_until_expiry'] as num).toInt(),
|
||||
renewalCost: (json['renewal_cost'] as num).toDouble(),
|
||||
autoRenew: json['auto_renew'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ExpiringLicenseImplToJson(
|
||||
_$ExpiringLicenseImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'license_name': instance.licenseName,
|
||||
'license_key': instance.licenseKey,
|
||||
'software_name': instance.softwareName,
|
||||
'company_name': instance.companyName,
|
||||
'expiry_date': instance.expiryDate.toIso8601String(),
|
||||
'days_remaining': instance.daysRemaining,
|
||||
'license_type': instance.licenseType,
|
||||
'days_until_expiry': instance.daysUntilExpiry,
|
||||
'renewal_cost': instance.renewalCost,
|
||||
'auto_renew': instance.autoRenew,
|
||||
};
|
||||
|
||||
@@ -6,16 +6,23 @@ part 'overview_stats.g.dart';
|
||||
@freezed
|
||||
class OverviewStats with _$OverviewStats {
|
||||
const factory OverviewStats({
|
||||
@JsonKey(name: 'total_companies') required int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required int activeCompanies,
|
||||
@JsonKey(name: 'total_users') required int totalUsers,
|
||||
@JsonKey(name: 'active_users') required int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') required int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') required int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required int totalCompanies,
|
||||
@JsonKey(name: 'total_users') required int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') required int activeRentals,
|
||||
@JsonKey(name: 'expiring_licenses_count') required int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') required int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') required int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') required int activeWarehouseLocations,
|
||||
// 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals,
|
||||
}) = _OverviewStats;
|
||||
|
||||
factory OverviewStats.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -20,6 +20,14 @@ OverviewStats _$OverviewStatsFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$OverviewStats {
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_companies')
|
||||
int get activeCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_users')
|
||||
int get activeUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_equipment')
|
||||
int get totalEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'available_equipment')
|
||||
@@ -28,18 +36,23 @@ mixin _$OverviewStats {
|
||||
int get inUseEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
int get maintenanceEquipment => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
int get totalLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_licenses')
|
||||
int get activeLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
int get expiringLicenses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_rentals')
|
||||
int get totalRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_rentals')
|
||||
int get activeRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
int get expiringLicensesCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
int get expiredLicensesCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
int get totalWarehouseLocations => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
int get activeWarehouseLocations =>
|
||||
throw _privateConstructorUsedError; // 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
int? get totalRentals => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
int? get activeRentals => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this OverviewStats to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -58,16 +71,22 @@ abstract class $OverviewStatsCopyWith<$Res> {
|
||||
_$OverviewStatsCopyWithImpl<$Res, OverviewStats>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') int activeCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'active_users') int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') int activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count') int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -85,18 +104,40 @@ class _$OverviewStatsCopyWithImpl<$Res, $Val extends OverviewStats>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalCompanies = null,
|
||||
Object? activeCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? activeUsers = null,
|
||||
Object? totalEquipment = null,
|
||||
Object? availableEquipment = null,
|
||||
Object? inUseEquipment = null,
|
||||
Object? maintenanceEquipment = null,
|
||||
Object? totalCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? totalLicenses = null,
|
||||
Object? activeLicenses = null,
|
||||
Object? expiringLicenses = null,
|
||||
Object? totalRentals = null,
|
||||
Object? activeRentals = null,
|
||||
Object? expiringLicensesCount = null,
|
||||
Object? expiredLicensesCount = null,
|
||||
Object? totalWarehouseLocations = null,
|
||||
Object? activeWarehouseLocations = null,
|
||||
Object? totalRentals = freezed,
|
||||
Object? activeRentals = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCompanies: null == activeCompanies
|
||||
? _value.activeCompanies
|
||||
: activeCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeUsers: null == activeUsers
|
||||
? _value.activeUsers
|
||||
: activeUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalEquipment: null == totalEquipment
|
||||
? _value.totalEquipment
|
||||
: totalEquipment // ignore: cast_nullable_to_non_nullable
|
||||
@@ -113,30 +154,38 @@ class _$OverviewStatsCopyWithImpl<$Res, $Val extends OverviewStats>
|
||||
? _value.maintenanceEquipment
|
||||
: maintenanceEquipment // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
totalLicenses: null == totalLicenses
|
||||
? _value.totalLicenses
|
||||
: totalLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeLicenses: null == activeLicenses
|
||||
? _value.activeLicenses
|
||||
: activeLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expiringLicenses: null == expiringLicenses
|
||||
? _value.expiringLicenses
|
||||
: expiringLicenses // ignore: cast_nullable_to_non_nullable
|
||||
expiringLicensesCount: null == expiringLicensesCount
|
||||
? _value.expiringLicensesCount
|
||||
: expiringLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: null == totalRentals
|
||||
expiredLicensesCount: null == expiredLicensesCount
|
||||
? _value.expiredLicensesCount
|
||||
: expiredLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWarehouseLocations: null == totalWarehouseLocations
|
||||
? _value.totalWarehouseLocations
|
||||
: totalWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeWarehouseLocations: null == activeWarehouseLocations
|
||||
? _value.activeWarehouseLocations
|
||||
: activeWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: freezed == totalRentals
|
||||
? _value.totalRentals
|
||||
: totalRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeRentals: null == activeRentals
|
||||
as int?,
|
||||
activeRentals: freezed == activeRentals
|
||||
? _value.activeRentals
|
||||
: activeRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -150,16 +199,22 @@ abstract class _$$OverviewStatsImplCopyWith<$Res>
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') int activeCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'active_users') int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment') int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') int totalCompanies,
|
||||
@JsonKey(name: 'total_users') int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') int totalRentals,
|
||||
@JsonKey(name: 'active_rentals') int activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count') int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count') int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations') int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations') int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) int? activeRentals});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -175,18 +230,40 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalCompanies = null,
|
||||
Object? activeCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? activeUsers = null,
|
||||
Object? totalEquipment = null,
|
||||
Object? availableEquipment = null,
|
||||
Object? inUseEquipment = null,
|
||||
Object? maintenanceEquipment = null,
|
||||
Object? totalCompanies = null,
|
||||
Object? totalUsers = null,
|
||||
Object? totalLicenses = null,
|
||||
Object? activeLicenses = null,
|
||||
Object? expiringLicenses = null,
|
||||
Object? totalRentals = null,
|
||||
Object? activeRentals = null,
|
||||
Object? expiringLicensesCount = null,
|
||||
Object? expiredLicensesCount = null,
|
||||
Object? totalWarehouseLocations = null,
|
||||
Object? activeWarehouseLocations = null,
|
||||
Object? totalRentals = freezed,
|
||||
Object? activeRentals = freezed,
|
||||
}) {
|
||||
return _then(_$OverviewStatsImpl(
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCompanies: null == activeCompanies
|
||||
? _value.activeCompanies
|
||||
: activeCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeUsers: null == activeUsers
|
||||
? _value.activeUsers
|
||||
: activeUsers // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalEquipment: null == totalEquipment
|
||||
? _value.totalEquipment
|
||||
: totalEquipment // ignore: cast_nullable_to_non_nullable
|
||||
@@ -203,30 +280,38 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
? _value.maintenanceEquipment
|
||||
: maintenanceEquipment // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalCompanies: null == totalCompanies
|
||||
? _value.totalCompanies
|
||||
: totalCompanies // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalUsers: null == totalUsers
|
||||
? _value.totalUsers
|
||||
: totalUsers // ignore: cast_nullable_to_non_nullable
|
||||
totalLicenses: null == totalLicenses
|
||||
? _value.totalLicenses
|
||||
: totalLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeLicenses: null == activeLicenses
|
||||
? _value.activeLicenses
|
||||
: activeLicenses // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expiringLicenses: null == expiringLicenses
|
||||
? _value.expiringLicenses
|
||||
: expiringLicenses // ignore: cast_nullable_to_non_nullable
|
||||
expiringLicensesCount: null == expiringLicensesCount
|
||||
? _value.expiringLicensesCount
|
||||
: expiringLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: null == totalRentals
|
||||
expiredLicensesCount: null == expiredLicensesCount
|
||||
? _value.expiredLicensesCount
|
||||
: expiredLicensesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalWarehouseLocations: null == totalWarehouseLocations
|
||||
? _value.totalWarehouseLocations
|
||||
: totalWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeWarehouseLocations: null == activeWarehouseLocations
|
||||
? _value.activeWarehouseLocations
|
||||
: activeWarehouseLocations // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalRentals: freezed == totalRentals
|
||||
? _value.totalRentals
|
||||
: totalRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeRentals: null == activeRentals
|
||||
as int?,
|
||||
activeRentals: freezed == activeRentals
|
||||
? _value.activeRentals
|
||||
: activeRentals // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -235,21 +320,43 @@ class __$$OverviewStatsImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$OverviewStatsImpl implements _OverviewStats {
|
||||
const _$OverviewStatsImpl(
|
||||
{@JsonKey(name: 'total_equipment') required this.totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') required this.totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required this.activeCompanies,
|
||||
@JsonKey(name: 'total_users') required this.totalUsers,
|
||||
@JsonKey(name: 'active_users') required this.activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required this.totalEquipment,
|
||||
@JsonKey(name: 'available_equipment') required this.availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required this.inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
required this.maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required this.totalCompanies,
|
||||
@JsonKey(name: 'total_users') required this.totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required this.totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required this.activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required this.expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required this.totalRentals,
|
||||
@JsonKey(name: 'active_rentals') required this.activeRentals});
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
required this.expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
required this.expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
required this.totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
required this.activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) this.totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0) this.activeRentals});
|
||||
|
||||
factory _$OverviewStatsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$OverviewStatsImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
final int totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'active_companies')
|
||||
final int activeCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
final int totalUsers;
|
||||
@override
|
||||
@JsonKey(name: 'active_users')
|
||||
final int activeUsers;
|
||||
@override
|
||||
@JsonKey(name: 'total_equipment')
|
||||
final int totalEquipment;
|
||||
@@ -263,27 +370,34 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
final int maintenanceEquipment;
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
final int totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
final int totalUsers;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
final int totalLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'active_licenses')
|
||||
final int activeLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
final int expiringLicenses;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
final int expiringLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals')
|
||||
final int totalRentals;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
final int expiredLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals')
|
||||
final int activeRentals;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
final int totalWarehouseLocations;
|
||||
@override
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
final int activeWarehouseLocations;
|
||||
// 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
final int? totalRentals;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
final int? activeRentals;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OverviewStats(totalEquipment: $totalEquipment, availableEquipment: $availableEquipment, inUseEquipment: $inUseEquipment, maintenanceEquipment: $maintenanceEquipment, totalCompanies: $totalCompanies, totalUsers: $totalUsers, activeLicenses: $activeLicenses, expiringLicenses: $expiringLicenses, totalRentals: $totalRentals, activeRentals: $activeRentals)';
|
||||
return 'OverviewStats(totalCompanies: $totalCompanies, activeCompanies: $activeCompanies, totalUsers: $totalUsers, activeUsers: $activeUsers, totalEquipment: $totalEquipment, availableEquipment: $availableEquipment, inUseEquipment: $inUseEquipment, maintenanceEquipment: $maintenanceEquipment, totalLicenses: $totalLicenses, activeLicenses: $activeLicenses, expiringLicensesCount: $expiringLicensesCount, expiredLicensesCount: $expiredLicensesCount, totalWarehouseLocations: $totalWarehouseLocations, activeWarehouseLocations: $activeWarehouseLocations, totalRentals: $totalRentals, activeRentals: $activeRentals)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -291,6 +405,14 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$OverviewStatsImpl &&
|
||||
(identical(other.totalCompanies, totalCompanies) ||
|
||||
other.totalCompanies == totalCompanies) &&
|
||||
(identical(other.activeCompanies, activeCompanies) ||
|
||||
other.activeCompanies == activeCompanies) &&
|
||||
(identical(other.totalUsers, totalUsers) ||
|
||||
other.totalUsers == totalUsers) &&
|
||||
(identical(other.activeUsers, activeUsers) ||
|
||||
other.activeUsers == activeUsers) &&
|
||||
(identical(other.totalEquipment, totalEquipment) ||
|
||||
other.totalEquipment == totalEquipment) &&
|
||||
(identical(other.availableEquipment, availableEquipment) ||
|
||||
@@ -299,14 +421,20 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
other.inUseEquipment == inUseEquipment) &&
|
||||
(identical(other.maintenanceEquipment, maintenanceEquipment) ||
|
||||
other.maintenanceEquipment == maintenanceEquipment) &&
|
||||
(identical(other.totalCompanies, totalCompanies) ||
|
||||
other.totalCompanies == totalCompanies) &&
|
||||
(identical(other.totalUsers, totalUsers) ||
|
||||
other.totalUsers == totalUsers) &&
|
||||
(identical(other.totalLicenses, totalLicenses) ||
|
||||
other.totalLicenses == totalLicenses) &&
|
||||
(identical(other.activeLicenses, activeLicenses) ||
|
||||
other.activeLicenses == activeLicenses) &&
|
||||
(identical(other.expiringLicenses, expiringLicenses) ||
|
||||
other.expiringLicenses == expiringLicenses) &&
|
||||
(identical(other.expiringLicensesCount, expiringLicensesCount) ||
|
||||
other.expiringLicensesCount == expiringLicensesCount) &&
|
||||
(identical(other.expiredLicensesCount, expiredLicensesCount) ||
|
||||
other.expiredLicensesCount == expiredLicensesCount) &&
|
||||
(identical(
|
||||
other.totalWarehouseLocations, totalWarehouseLocations) ||
|
||||
other.totalWarehouseLocations == totalWarehouseLocations) &&
|
||||
(identical(
|
||||
other.activeWarehouseLocations, activeWarehouseLocations) ||
|
||||
other.activeWarehouseLocations == activeWarehouseLocations) &&
|
||||
(identical(other.totalRentals, totalRentals) ||
|
||||
other.totalRentals == totalRentals) &&
|
||||
(identical(other.activeRentals, activeRentals) ||
|
||||
@@ -317,14 +445,20 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalCompanies,
|
||||
activeCompanies,
|
||||
totalUsers,
|
||||
activeUsers,
|
||||
totalEquipment,
|
||||
availableEquipment,
|
||||
inUseEquipment,
|
||||
maintenanceEquipment,
|
||||
totalCompanies,
|
||||
totalUsers,
|
||||
totalLicenses,
|
||||
activeLicenses,
|
||||
expiringLicenses,
|
||||
expiringLicensesCount,
|
||||
expiredLicensesCount,
|
||||
totalWarehouseLocations,
|
||||
activeWarehouseLocations,
|
||||
totalRentals,
|
||||
activeRentals);
|
||||
|
||||
@@ -346,23 +480,45 @@ class _$OverviewStatsImpl implements _OverviewStats {
|
||||
|
||||
abstract class _OverviewStats implements OverviewStats {
|
||||
const factory _OverviewStats(
|
||||
{@JsonKey(name: 'total_equipment') required final int totalEquipment,
|
||||
{@JsonKey(name: 'total_companies') required final int totalCompanies,
|
||||
@JsonKey(name: 'active_companies') required final int activeCompanies,
|
||||
@JsonKey(name: 'total_users') required final int totalUsers,
|
||||
@JsonKey(name: 'active_users') required final int activeUsers,
|
||||
@JsonKey(name: 'total_equipment') required final int totalEquipment,
|
||||
@JsonKey(name: 'available_equipment')
|
||||
required final int availableEquipment,
|
||||
@JsonKey(name: 'in_use_equipment') required final int inUseEquipment,
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
required final int maintenanceEquipment,
|
||||
@JsonKey(name: 'total_companies') required final int totalCompanies,
|
||||
@JsonKey(name: 'total_users') required final int totalUsers,
|
||||
@JsonKey(name: 'total_licenses') required final int totalLicenses,
|
||||
@JsonKey(name: 'active_licenses') required final int activeLicenses,
|
||||
@JsonKey(name: 'expiring_licenses') required final int expiringLicenses,
|
||||
@JsonKey(name: 'total_rentals') required final int totalRentals,
|
||||
@JsonKey(name: 'active_rentals')
|
||||
required final int activeRentals}) = _$OverviewStatsImpl;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
required final int expiringLicensesCount,
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
required final int expiredLicensesCount,
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
required final int totalWarehouseLocations,
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
required final int activeWarehouseLocations,
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0) final int? totalRentals,
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
final int? activeRentals}) = _$OverviewStatsImpl;
|
||||
|
||||
factory _OverviewStats.fromJson(Map<String, dynamic> json) =
|
||||
_$OverviewStatsImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'active_companies')
|
||||
int get activeCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers;
|
||||
@override
|
||||
@JsonKey(name: 'active_users')
|
||||
int get activeUsers;
|
||||
@override
|
||||
@JsonKey(name: 'total_equipment')
|
||||
int get totalEquipment;
|
||||
@@ -376,23 +532,29 @@ abstract class _OverviewStats implements OverviewStats {
|
||||
@JsonKey(name: 'maintenance_equipment')
|
||||
int get maintenanceEquipment;
|
||||
@override
|
||||
@JsonKey(name: 'total_companies')
|
||||
int get totalCompanies;
|
||||
@override
|
||||
@JsonKey(name: 'total_users')
|
||||
int get totalUsers;
|
||||
@JsonKey(name: 'total_licenses')
|
||||
int get totalLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'active_licenses')
|
||||
int get activeLicenses;
|
||||
@override
|
||||
@JsonKey(name: 'expiring_licenses')
|
||||
int get expiringLicenses;
|
||||
@JsonKey(name: 'expiring_licenses_count')
|
||||
int get expiringLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals')
|
||||
int get totalRentals;
|
||||
@JsonKey(name: 'expired_licenses_count')
|
||||
int get expiredLicensesCount;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals')
|
||||
int get activeRentals;
|
||||
@JsonKey(name: 'total_warehouse_locations')
|
||||
int get totalWarehouseLocations;
|
||||
@override
|
||||
@JsonKey(name: 'active_warehouse_locations')
|
||||
int get activeWarehouseLocations; // 다음 필드들은 백엔드에 없으므로 선택적으로 만듭니다
|
||||
@override
|
||||
@JsonKey(name: 'total_rentals', defaultValue: 0)
|
||||
int? get totalRentals;
|
||||
@override
|
||||
@JsonKey(name: 'active_rentals', defaultValue: 0)
|
||||
int? get activeRentals;
|
||||
|
||||
/// Create a copy of OverviewStats
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
@@ -8,28 +8,42 @@ part of 'overview_stats.dart';
|
||||
|
||||
_$OverviewStatsImpl _$$OverviewStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$OverviewStatsImpl(
|
||||
totalCompanies: (json['total_companies'] as num).toInt(),
|
||||
activeCompanies: (json['active_companies'] as num).toInt(),
|
||||
totalUsers: (json['total_users'] as num).toInt(),
|
||||
activeUsers: (json['active_users'] as num).toInt(),
|
||||
totalEquipment: (json['total_equipment'] as num).toInt(),
|
||||
availableEquipment: (json['available_equipment'] as num).toInt(),
|
||||
inUseEquipment: (json['in_use_equipment'] as num).toInt(),
|
||||
maintenanceEquipment: (json['maintenance_equipment'] as num).toInt(),
|
||||
totalCompanies: (json['total_companies'] as num).toInt(),
|
||||
totalUsers: (json['total_users'] as num).toInt(),
|
||||
totalLicenses: (json['total_licenses'] as num).toInt(),
|
||||
activeLicenses: (json['active_licenses'] as num).toInt(),
|
||||
expiringLicenses: (json['expiring_licenses'] as num).toInt(),
|
||||
totalRentals: (json['total_rentals'] as num).toInt(),
|
||||
activeRentals: (json['active_rentals'] as num).toInt(),
|
||||
expiringLicensesCount: (json['expiring_licenses_count'] as num).toInt(),
|
||||
expiredLicensesCount: (json['expired_licenses_count'] as num).toInt(),
|
||||
totalWarehouseLocations:
|
||||
(json['total_warehouse_locations'] as num).toInt(),
|
||||
activeWarehouseLocations:
|
||||
(json['active_warehouse_locations'] as num).toInt(),
|
||||
totalRentals: (json['total_rentals'] as num?)?.toInt() ?? 0,
|
||||
activeRentals: (json['active_rentals'] as num?)?.toInt() ?? 0,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$OverviewStatsImplToJson(_$OverviewStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'total_companies': instance.totalCompanies,
|
||||
'active_companies': instance.activeCompanies,
|
||||
'total_users': instance.totalUsers,
|
||||
'active_users': instance.activeUsers,
|
||||
'total_equipment': instance.totalEquipment,
|
||||
'available_equipment': instance.availableEquipment,
|
||||
'in_use_equipment': instance.inUseEquipment,
|
||||
'maintenance_equipment': instance.maintenanceEquipment,
|
||||
'total_companies': instance.totalCompanies,
|
||||
'total_users': instance.totalUsers,
|
||||
'total_licenses': instance.totalLicenses,
|
||||
'active_licenses': instance.activeLicenses,
|
||||
'expiring_licenses': instance.expiringLicenses,
|
||||
'expiring_licenses_count': instance.expiringLicensesCount,
|
||||
'expired_licenses_count': instance.expiredLicensesCount,
|
||||
'total_warehouse_locations': instance.totalWarehouseLocations,
|
||||
'active_warehouse_locations': instance.activeWarehouseLocations,
|
||||
'total_rentals': instance.totalRentals,
|
||||
'active_rentals': instance.activeRentals,
|
||||
};
|
||||
|
||||
@@ -8,9 +8,13 @@ class RecentActivity with _$RecentActivity {
|
||||
const factory RecentActivity({
|
||||
required int id,
|
||||
@JsonKey(name: 'activity_type') required String activityType,
|
||||
@JsonKey(name: 'entity_type') required String entityType,
|
||||
@JsonKey(name: 'entity_id') required int entityId,
|
||||
@JsonKey(name: 'entity_name') required String entityName,
|
||||
required String description,
|
||||
@JsonKey(name: 'user_name') required String userName,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
required DateTime timestamp,
|
||||
Map<String, dynamic>? metadata,
|
||||
}) = _RecentActivity;
|
||||
|
||||
|
||||
@@ -23,11 +23,18 @@ mixin _$RecentActivity {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'activity_type')
|
||||
String get activityType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_type')
|
||||
String get entityType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_id')
|
||||
int get entityId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'entity_name')
|
||||
String get entityName => throw _privateConstructorUsedError;
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_id')
|
||||
int? get userId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'user_name')
|
||||
String get userName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
String? get userName => throw _privateConstructorUsedError;
|
||||
DateTime get timestamp => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecentActivity to a JSON map.
|
||||
@@ -49,9 +56,13 @@ abstract class $RecentActivityCopyWith<$Res> {
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'activity_type') String activityType,
|
||||
@JsonKey(name: 'entity_type') String entityType,
|
||||
@JsonKey(name: 'entity_id') int entityId,
|
||||
@JsonKey(name: 'entity_name') String entityName,
|
||||
String description,
|
||||
@JsonKey(name: 'user_name') String userName,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
DateTime timestamp,
|
||||
Map<String, dynamic>? metadata});
|
||||
}
|
||||
|
||||
@@ -72,9 +83,13 @@ class _$RecentActivityCopyWithImpl<$Res, $Val extends RecentActivity>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? activityType = null,
|
||||
Object? entityType = null,
|
||||
Object? entityId = null,
|
||||
Object? entityName = null,
|
||||
Object? description = null,
|
||||
Object? userName = null,
|
||||
Object? createdAt = null,
|
||||
Object? userId = freezed,
|
||||
Object? userName = freezed,
|
||||
Object? timestamp = null,
|
||||
Object? metadata = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -86,17 +101,33 @@ class _$RecentActivityCopyWithImpl<$Res, $Val extends RecentActivity>
|
||||
? _value.activityType
|
||||
: activityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityType: null == entityType
|
||||
? _value.entityType
|
||||
: entityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityId: null == entityId
|
||||
? _value.entityId
|
||||
: entityId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
entityName: null == entityName
|
||||
? _value.entityName
|
||||
: entityName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userName: null == userName
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
userName: freezed == userName
|
||||
? _value.userName
|
||||
: userName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
timestamp: null == timestamp
|
||||
? _value.timestamp
|
||||
: timestamp // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: freezed == metadata
|
||||
? _value.metadata
|
||||
@@ -117,9 +148,13 @@ abstract class _$$RecentActivityImplCopyWith<$Res>
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'activity_type') String activityType,
|
||||
@JsonKey(name: 'entity_type') String entityType,
|
||||
@JsonKey(name: 'entity_id') int entityId,
|
||||
@JsonKey(name: 'entity_name') String entityName,
|
||||
String description,
|
||||
@JsonKey(name: 'user_name') String userName,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') int? userId,
|
||||
@JsonKey(name: 'user_name') String? userName,
|
||||
DateTime timestamp,
|
||||
Map<String, dynamic>? metadata});
|
||||
}
|
||||
|
||||
@@ -138,9 +173,13 @@ class __$$RecentActivityImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? activityType = null,
|
||||
Object? entityType = null,
|
||||
Object? entityId = null,
|
||||
Object? entityName = null,
|
||||
Object? description = null,
|
||||
Object? userName = null,
|
||||
Object? createdAt = null,
|
||||
Object? userId = freezed,
|
||||
Object? userName = freezed,
|
||||
Object? timestamp = null,
|
||||
Object? metadata = freezed,
|
||||
}) {
|
||||
return _then(_$RecentActivityImpl(
|
||||
@@ -152,17 +191,33 @@ class __$$RecentActivityImplCopyWithImpl<$Res>
|
||||
? _value.activityType
|
||||
: activityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityType: null == entityType
|
||||
? _value.entityType
|
||||
: entityType // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
entityId: null == entityId
|
||||
? _value.entityId
|
||||
: entityId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
entityName: null == entityName
|
||||
? _value.entityName
|
||||
: entityName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
userName: null == userName
|
||||
userId: freezed == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
userName: freezed == userName
|
||||
? _value.userName
|
||||
: userName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
timestamp: null == timestamp
|
||||
? _value.timestamp
|
||||
: timestamp // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: freezed == metadata
|
||||
? _value._metadata
|
||||
@@ -178,9 +233,13 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
const _$RecentActivityImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'activity_type') required this.activityType,
|
||||
@JsonKey(name: 'entity_type') required this.entityType,
|
||||
@JsonKey(name: 'entity_id') required this.entityId,
|
||||
@JsonKey(name: 'entity_name') required this.entityName,
|
||||
required this.description,
|
||||
@JsonKey(name: 'user_name') required this.userName,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'user_id') this.userId,
|
||||
@JsonKey(name: 'user_name') this.userName,
|
||||
required this.timestamp,
|
||||
final Map<String, dynamic>? metadata})
|
||||
: _metadata = metadata;
|
||||
|
||||
@@ -193,13 +252,24 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
@JsonKey(name: 'activity_type')
|
||||
final String activityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_type')
|
||||
final String entityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_id')
|
||||
final int entityId;
|
||||
@override
|
||||
@JsonKey(name: 'entity_name')
|
||||
final String entityName;
|
||||
@override
|
||||
final String description;
|
||||
@override
|
||||
@JsonKey(name: 'user_name')
|
||||
final String userName;
|
||||
@JsonKey(name: 'user_id')
|
||||
final int? userId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
@JsonKey(name: 'user_name')
|
||||
final String? userName;
|
||||
@override
|
||||
final DateTime timestamp;
|
||||
final Map<String, dynamic>? _metadata;
|
||||
@override
|
||||
Map<String, dynamic>? get metadata {
|
||||
@@ -212,7 +282,7 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecentActivity(id: $id, activityType: $activityType, description: $description, userName: $userName, createdAt: $createdAt, metadata: $metadata)';
|
||||
return 'RecentActivity(id: $id, activityType: $activityType, entityType: $entityType, entityId: $entityId, entityName: $entityName, description: $description, userId: $userId, userName: $userName, timestamp: $timestamp, metadata: $metadata)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -223,19 +293,36 @@ class _$RecentActivityImpl implements _RecentActivity {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.activityType, activityType) ||
|
||||
other.activityType == activityType) &&
|
||||
(identical(other.entityType, entityType) ||
|
||||
other.entityType == entityType) &&
|
||||
(identical(other.entityId, entityId) ||
|
||||
other.entityId == entityId) &&
|
||||
(identical(other.entityName, entityName) ||
|
||||
other.entityName == entityName) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.userId, userId) || other.userId == userId) &&
|
||||
(identical(other.userName, userName) ||
|
||||
other.userName == userName) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.timestamp, timestamp) ||
|
||||
other.timestamp == timestamp) &&
|
||||
const DeepCollectionEquality().equals(other._metadata, _metadata));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, activityType, description,
|
||||
userName, createdAt, const DeepCollectionEquality().hash(_metadata));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
activityType,
|
||||
entityType,
|
||||
entityId,
|
||||
entityName,
|
||||
description,
|
||||
userId,
|
||||
userName,
|
||||
timestamp,
|
||||
const DeepCollectionEquality().hash(_metadata));
|
||||
|
||||
/// Create a copy of RecentActivity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -258,9 +345,13 @@ abstract class _RecentActivity implements RecentActivity {
|
||||
const factory _RecentActivity(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'activity_type') required final String activityType,
|
||||
@JsonKey(name: 'entity_type') required final String entityType,
|
||||
@JsonKey(name: 'entity_id') required final int entityId,
|
||||
@JsonKey(name: 'entity_name') required final String entityName,
|
||||
required final String description,
|
||||
@JsonKey(name: 'user_name') required final String userName,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'user_id') final int? userId,
|
||||
@JsonKey(name: 'user_name') final String? userName,
|
||||
required final DateTime timestamp,
|
||||
final Map<String, dynamic>? metadata}) = _$RecentActivityImpl;
|
||||
|
||||
factory _RecentActivity.fromJson(Map<String, dynamic> json) =
|
||||
@@ -272,13 +363,24 @@ abstract class _RecentActivity implements RecentActivity {
|
||||
@JsonKey(name: 'activity_type')
|
||||
String get activityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_type')
|
||||
String get entityType;
|
||||
@override
|
||||
@JsonKey(name: 'entity_id')
|
||||
int get entityId;
|
||||
@override
|
||||
@JsonKey(name: 'entity_name')
|
||||
String get entityName;
|
||||
@override
|
||||
String get description;
|
||||
@override
|
||||
@JsonKey(name: 'user_name')
|
||||
String get userName;
|
||||
@JsonKey(name: 'user_id')
|
||||
int? get userId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
@JsonKey(name: 'user_name')
|
||||
String? get userName;
|
||||
@override
|
||||
DateTime get timestamp;
|
||||
@override
|
||||
Map<String, dynamic>? get metadata;
|
||||
|
||||
|
||||
@@ -10,9 +10,13 @@ _$RecentActivityImpl _$$RecentActivityImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecentActivityImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
activityType: json['activity_type'] as String,
|
||||
entityType: json['entity_type'] as String,
|
||||
entityId: (json['entity_id'] as num).toInt(),
|
||||
entityName: json['entity_name'] as String,
|
||||
description: json['description'] as String,
|
||||
userName: json['user_name'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
userId: (json['user_id'] as num?)?.toInt(),
|
||||
userName: json['user_name'] as String?,
|
||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
);
|
||||
|
||||
@@ -21,8 +25,12 @@ Map<String, dynamic> _$$RecentActivityImplToJson(
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'activity_type': instance.activityType,
|
||||
'entity_type': instance.entityType,
|
||||
'entity_id': instance.entityId,
|
||||
'entity_name': instance.entityName,
|
||||
'description': instance.description,
|
||||
'user_id': instance.userId,
|
||||
'user_name': instance.userName,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'timestamp': instance.timestamp.toIso8601String(),
|
||||
'metadata': instance.metadata,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user