feat: 회사 관리 기능 개선 및 지점 평면화 DTO 추가
- CompanyBranchFlatDto 모델 추가로 지점 데이터 처리 개선 - 회사 서비스에 브랜치 평면화 기능 추가 - 회사 폼 컨트롤러 기능 확장 - 회사 리스트 화면 UI 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
18
lib/data/models/company/company_branch_flat_dto.dart
Normal file
18
lib/data/models/company/company_branch_flat_dto.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
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,
|
||||
}) = _CompanyBranchFlatDto;
|
||||
|
||||
factory CompanyBranchFlatDto.fromJson(Map<String, dynamic> json) =>
|
||||
_$CompanyBranchFlatDtoFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user