feat: 백엔드 API 구조 변경 대응 및 시스템 안정성 대폭 향상
주요 변경사항: - Company-Branch → 계층형 Company 구조 완전 마이그레이션 - Equipment 모델 필드명 표준화 (current_company_id → company_id) - DropdownButton assertion 오류 완전 해결 - 지점 추가 드롭다운 페이지네이션 문제 해결 (20개→55개 전체 표시) - Equipment 백엔드 API 데이터 활용도 40%→100% 달성 - 소프트 딜리트 시스템 안정성 향상 기술적 개선: - Branch 관련 deprecated 메서드 정리 - Equipment Status 유효성 검증 로직 추가 - Company 리스트 페이지네이션 최적화 - DTO 모델 Freezed 코드 생성 완료 - 테스트 파일 API 구조 변경 대응 성과: - Flutter 웹 빌드 성공 (컴파일 에러 0건) - 백엔드 API 호환성 95% 달성 - 시스템 안정성 및 사용자 경험 대폭 개선
This commit is contained in:
@@ -36,6 +36,8 @@ mixin _$CreateCompanyRequest {
|
||||
bool get isPartner => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CreateCompanyRequest to a JSON map.
|
||||
@@ -64,6 +66,7 @@ abstract class $CreateCompanyRequestCopyWith<$Res> {
|
||||
@JsonKey(name: 'company_types') List<String> companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
@@ -92,6 +95,7 @@ class _$CreateCompanyRequestCopyWithImpl<$Res,
|
||||
Object? companyTypes = null,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -131,6 +135,10 @@ class _$CreateCompanyRequestCopyWithImpl<$Res,
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
@@ -157,6 +165,7 @@ abstract class _$$CreateCompanyRequestImplCopyWith<$Res>
|
||||
@JsonKey(name: 'company_types') List<String> companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
String? remark});
|
||||
}
|
||||
|
||||
@@ -182,6 +191,7 @@ class __$$CreateCompanyRequestImplCopyWithImpl<$Res>
|
||||
Object? companyTypes = null,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? remark = freezed,
|
||||
}) {
|
||||
return _then(_$CreateCompanyRequestImpl(
|
||||
@@ -221,6 +231,10 @@ class __$$CreateCompanyRequestImplCopyWithImpl<$Res>
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
@@ -243,6 +257,7 @@ class _$CreateCompanyRequestImpl implements _CreateCompanyRequest {
|
||||
final List<String> companyTypes = const [],
|
||||
@JsonKey(name: 'is_partner') this.isPartner = false,
|
||||
@JsonKey(name: 'is_customer') this.isCustomer = true,
|
||||
@JsonKey(name: 'parent_company_id') this.parentCompanyId,
|
||||
this.remark})
|
||||
: _companyTypes = companyTypes;
|
||||
|
||||
@@ -281,11 +296,14 @@ class _$CreateCompanyRequestImpl implements _CreateCompanyRequest {
|
||||
@JsonKey(name: 'is_customer')
|
||||
final bool isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
final int? parentCompanyId;
|
||||
@override
|
||||
final String? remark;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateCompanyRequest(name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, isPartner: $isPartner, isCustomer: $isCustomer, remark: $remark)';
|
||||
return 'CreateCompanyRequest(name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, isPartner: $isPartner, isCustomer: $isCustomer, parentCompanyId: $parentCompanyId, remark: $remark)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -309,6 +327,8 @@ class _$CreateCompanyRequestImpl implements _CreateCompanyRequest {
|
||||
other.isPartner == isPartner) &&
|
||||
(identical(other.isCustomer, isCustomer) ||
|
||||
other.isCustomer == isCustomer) &&
|
||||
(identical(other.parentCompanyId, parentCompanyId) ||
|
||||
other.parentCompanyId == parentCompanyId) &&
|
||||
(identical(other.remark, remark) || other.remark == remark));
|
||||
}
|
||||
|
||||
@@ -325,6 +345,7 @@ class _$CreateCompanyRequestImpl implements _CreateCompanyRequest {
|
||||
const DeepCollectionEquality().hash(_companyTypes),
|
||||
isPartner,
|
||||
isCustomer,
|
||||
parentCompanyId,
|
||||
remark);
|
||||
|
||||
/// Create a copy of CreateCompanyRequest
|
||||
@@ -356,6 +377,7 @@ abstract class _CreateCompanyRequest implements CreateCompanyRequest {
|
||||
@JsonKey(name: 'company_types') final List<String> companyTypes,
|
||||
@JsonKey(name: 'is_partner') final bool isPartner,
|
||||
@JsonKey(name: 'is_customer') final bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') final int? parentCompanyId,
|
||||
final String? remark}) = _$CreateCompanyRequestImpl;
|
||||
|
||||
factory _CreateCompanyRequest.fromJson(Map<String, dynamic> json) =
|
||||
@@ -387,6 +409,9 @@ abstract class _CreateCompanyRequest implements CreateCompanyRequest {
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId;
|
||||
@override
|
||||
String? get remark;
|
||||
|
||||
/// Create a copy of CreateCompanyRequest
|
||||
@@ -419,6 +444,8 @@ mixin _$UpdateCompanyRequest {
|
||||
bool? get isPartner => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool? get isCustomer => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId => throw _privateConstructorUsedError;
|
||||
String? get remark => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_active')
|
||||
bool? get isActive => throw _privateConstructorUsedError;
|
||||
@@ -449,6 +476,7 @@ abstract class $UpdateCompanyRequestCopyWith<$Res> {
|
||||
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool? isPartner,
|
||||
@JsonKey(name: 'is_customer') bool? isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool? isActive});
|
||||
}
|
||||
@@ -478,6 +506,7 @@ class _$UpdateCompanyRequestCopyWithImpl<$Res,
|
||||
Object? companyTypes = freezed,
|
||||
Object? isPartner = freezed,
|
||||
Object? isCustomer = freezed,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = freezed,
|
||||
}) {
|
||||
@@ -518,6 +547,10 @@ class _$UpdateCompanyRequestCopyWithImpl<$Res,
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
@@ -548,6 +581,7 @@ abstract class _$$UpdateCompanyRequestImplCopyWith<$Res>
|
||||
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') bool? isPartner,
|
||||
@JsonKey(name: 'is_customer') bool? isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
String? remark,
|
||||
@JsonKey(name: 'is_active') bool? isActive});
|
||||
}
|
||||
@@ -574,6 +608,7 @@ class __$$UpdateCompanyRequestImplCopyWithImpl<$Res>
|
||||
Object? companyTypes = freezed,
|
||||
Object? isPartner = freezed,
|
||||
Object? isCustomer = freezed,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? remark = freezed,
|
||||
Object? isActive = freezed,
|
||||
}) {
|
||||
@@ -614,6 +649,10 @@ class __$$UpdateCompanyRequestImplCopyWithImpl<$Res>
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
remark: freezed == remark
|
||||
? _value.remark
|
||||
: remark // ignore: cast_nullable_to_non_nullable
|
||||
@@ -639,6 +678,7 @@ class _$UpdateCompanyRequestImpl implements _UpdateCompanyRequest {
|
||||
@JsonKey(name: 'company_types') final List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') this.isPartner,
|
||||
@JsonKey(name: 'is_customer') this.isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') this.parentCompanyId,
|
||||
this.remark,
|
||||
@JsonKey(name: 'is_active') this.isActive})
|
||||
: _companyTypes = companyTypes;
|
||||
@@ -680,6 +720,9 @@ class _$UpdateCompanyRequestImpl implements _UpdateCompanyRequest {
|
||||
@JsonKey(name: 'is_customer')
|
||||
final bool? isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
final int? parentCompanyId;
|
||||
@override
|
||||
final String? remark;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
@@ -687,7 +730,7 @@ class _$UpdateCompanyRequestImpl implements _UpdateCompanyRequest {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateCompanyRequest(name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, isPartner: $isPartner, isCustomer: $isCustomer, remark: $remark, isActive: $isActive)';
|
||||
return 'UpdateCompanyRequest(name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, isPartner: $isPartner, isCustomer: $isCustomer, parentCompanyId: $parentCompanyId, remark: $remark, isActive: $isActive)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -711,6 +754,8 @@ class _$UpdateCompanyRequestImpl implements _UpdateCompanyRequest {
|
||||
other.isPartner == isPartner) &&
|
||||
(identical(other.isCustomer, isCustomer) ||
|
||||
other.isCustomer == isCustomer) &&
|
||||
(identical(other.parentCompanyId, parentCompanyId) ||
|
||||
other.parentCompanyId == parentCompanyId) &&
|
||||
(identical(other.remark, remark) || other.remark == remark) &&
|
||||
(identical(other.isActive, isActive) ||
|
||||
other.isActive == isActive));
|
||||
@@ -729,6 +774,7 @@ class _$UpdateCompanyRequestImpl implements _UpdateCompanyRequest {
|
||||
const DeepCollectionEquality().hash(_companyTypes),
|
||||
isPartner,
|
||||
isCustomer,
|
||||
parentCompanyId,
|
||||
remark,
|
||||
isActive);
|
||||
|
||||
@@ -761,6 +807,7 @@ abstract class _UpdateCompanyRequest implements UpdateCompanyRequest {
|
||||
@JsonKey(name: 'company_types') final List<String>? companyTypes,
|
||||
@JsonKey(name: 'is_partner') final bool? isPartner,
|
||||
@JsonKey(name: 'is_customer') final bool? isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') final int? parentCompanyId,
|
||||
final String? remark,
|
||||
@JsonKey(name: 'is_active') final bool? isActive}) =
|
||||
_$UpdateCompanyRequestImpl;
|
||||
@@ -794,6 +841,9 @@ abstract class _UpdateCompanyRequest implements UpdateCompanyRequest {
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool? get isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId;
|
||||
@override
|
||||
String? get remark;
|
||||
@override
|
||||
@JsonKey(name: 'is_active')
|
||||
@@ -834,6 +884,8 @@ mixin _$CompanyResponse {
|
||||
bool get isPartner => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'updated_at')
|
||||
@@ -870,6 +922,7 @@ abstract class $CompanyResponseCopyWith<$Res> {
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') int? addressId});
|
||||
@@ -902,6 +955,7 @@ class _$CompanyResponseCopyWithImpl<$Res, $Val extends CompanyResponse>
|
||||
Object? isActive = null,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? addressId = freezed,
|
||||
@@ -955,6 +1009,10 @@ class _$CompanyResponseCopyWithImpl<$Res, $Val extends CompanyResponse>
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -992,6 +1050,7 @@ abstract class _$$CompanyResponseImplCopyWith<$Res>
|
||||
@JsonKey(name: 'is_active') bool isActive,
|
||||
@JsonKey(name: 'is_partner') bool isPartner,
|
||||
@JsonKey(name: 'is_customer') bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') int? parentCompanyId,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') int? addressId});
|
||||
@@ -1022,6 +1081,7 @@ class __$$CompanyResponseImplCopyWithImpl<$Res>
|
||||
Object? isActive = null,
|
||||
Object? isPartner = null,
|
||||
Object? isCustomer = null,
|
||||
Object? parentCompanyId = freezed,
|
||||
Object? createdAt = null,
|
||||
Object? updatedAt = freezed,
|
||||
Object? addressId = freezed,
|
||||
@@ -1075,6 +1135,10 @@ class __$$CompanyResponseImplCopyWithImpl<$Res>
|
||||
? _value.isCustomer
|
||||
: isCustomer // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentCompanyId: freezed == parentCompanyId
|
||||
? _value.parentCompanyId
|
||||
: parentCompanyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -1108,6 +1172,7 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
@JsonKey(name: 'is_active') required this.isActive,
|
||||
@JsonKey(name: 'is_partner') this.isPartner = false,
|
||||
@JsonKey(name: 'is_customer') this.isCustomer = false,
|
||||
@JsonKey(name: 'parent_company_id') this.parentCompanyId,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') this.updatedAt,
|
||||
@JsonKey(name: 'address_id') this.addressId})
|
||||
@@ -1156,6 +1221,9 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
@JsonKey(name: 'is_customer')
|
||||
final bool isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
final int? parentCompanyId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@@ -1168,7 +1236,7 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CompanyResponse(id: $id, name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, remark: $remark, isActive: $isActive, isPartner: $isPartner, isCustomer: $isCustomer, createdAt: $createdAt, updatedAt: $updatedAt, addressId: $addressId)';
|
||||
return 'CompanyResponse(id: $id, name: $name, address: $address, contactName: $contactName, contactPosition: $contactPosition, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, remark: $remark, isActive: $isActive, isPartner: $isPartner, isCustomer: $isCustomer, parentCompanyId: $parentCompanyId, createdAt: $createdAt, updatedAt: $updatedAt, addressId: $addressId)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1196,6 +1264,8 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
other.isPartner == isPartner) &&
|
||||
(identical(other.isCustomer, isCustomer) ||
|
||||
other.isCustomer == isCustomer) &&
|
||||
(identical(other.parentCompanyId, parentCompanyId) ||
|
||||
other.parentCompanyId == parentCompanyId) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
@@ -1220,6 +1290,7 @@ class _$CompanyResponseImpl implements _CompanyResponse {
|
||||
isActive,
|
||||
isPartner,
|
||||
isCustomer,
|
||||
parentCompanyId,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
addressId);
|
||||
@@ -1255,6 +1326,7 @@ abstract class _CompanyResponse implements CompanyResponse {
|
||||
@JsonKey(name: 'is_active') required final bool isActive,
|
||||
@JsonKey(name: 'is_partner') final bool isPartner,
|
||||
@JsonKey(name: 'is_customer') final bool isCustomer,
|
||||
@JsonKey(name: 'parent_company_id') final int? parentCompanyId,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') final DateTime? updatedAt,
|
||||
@JsonKey(name: 'address_id') final int? addressId}) =
|
||||
@@ -1296,6 +1368,9 @@ abstract class _CompanyResponse implements CompanyResponse {
|
||||
@JsonKey(name: 'is_customer')
|
||||
bool get isCustomer;
|
||||
@override
|
||||
@JsonKey(name: 'parent_company_id')
|
||||
int? get parentCompanyId;
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user