- 모든 관리 화면(회사, 장비, 입고지, 유지보수)의 페이지네이션 로직 통일 - Controller에서 전체 데이터 로드, View에서만 페이지네이션 처리 - 각 화면에 상세한 터미널 로그 추가로 데이터 로드 상태 추적 가능 - 회사 DTO에 지점 정보 포함 기능 추가 - 전체 79개 회사 중 14개만 표시되던 문제 해결
21 lines
881 B
Dart
21 lines
881 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'company_branch_flat_dto.freezed.dart';
|
|
part 'company_branch_flat_dto.g.dart';
|
|
|
|
/// /companies/branches API의 평면화된 응답을 위한 DTO
|
|
@freezed
|
|
class CompanyBranchFlatDto with _$CompanyBranchFlatDto {
|
|
const factory CompanyBranchFlatDto({
|
|
@JsonKey(name: 'company_id') required int companyId,
|
|
@JsonKey(name: 'company_name') required String companyName,
|
|
@JsonKey(name: 'branch_id') int? branchId,
|
|
@JsonKey(name: 'branch_name') String? branchName,
|
|
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
|
@JsonKey(name: 'is_partner') @Default(false) bool isPartner,
|
|
@JsonKey(name: 'is_customer') @Default(false) bool isCustomer,
|
|
}) = _CompanyBranchFlatDto;
|
|
|
|
factory CompanyBranchFlatDto.fromJson(Map<String, dynamic> json) =>
|
|
_$CompanyBranchFlatDtoFromJson(json);
|
|
} |