## 주요 변경사항 - Company, Equipment, License, Warehouse Location 모든 화면에 소프트 딜리트 구현 - 관리자 권한으로 삭제된 데이터 조회 가능 (includeInactive 파라미터) - 데이터 무결성 보장을 위한 논리 삭제 시스템 완성 ## 기능 개선 - 각 리스트 컨트롤러에 toggleIncludeInactive() 메서드 추가 - UI에 "비활성 포함" 체크박스 추가 (관리자 전용) - API 데이터소스에 includeInactive 파라미터 지원 ## 문서 정리 - 불필요한 문서 파일 제거 및 재구성 - CLAUDE.md 프로젝트 상태 업데이트 (진행률 80%) - 테스트 결과 문서화 (test20250812v01.md) ## UI 컴포넌트 - Equipment 화면 위젯 모듈화 (custom_dropdown_field, equipment_basic_info_section) - 폼 유효성 검증 강화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
76 lines
2.8 KiB
Dart
76 lines
2.8 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'company_dto.freezed.dart';
|
|
part 'company_dto.g.dart';
|
|
|
|
@freezed
|
|
class CreateCompanyRequest with _$CreateCompanyRequest {
|
|
const factory CreateCompanyRequest({
|
|
required String name,
|
|
required String address,
|
|
@JsonKey(name: 'contact_name') required String contactName,
|
|
@JsonKey(name: 'contact_position') required String contactPosition,
|
|
@JsonKey(name: 'contact_phone') required String contactPhone,
|
|
@JsonKey(name: 'contact_email') required String contactEmail,
|
|
@JsonKey(name: 'company_types') @Default([]) List<String> companyTypes,
|
|
@JsonKey(name: 'is_partner') @Default(false) bool isPartner,
|
|
@JsonKey(name: 'is_customer') @Default(true) bool isCustomer,
|
|
String? remark,
|
|
}) = _CreateCompanyRequest;
|
|
|
|
factory CreateCompanyRequest.fromJson(Map<String, dynamic> json) =>
|
|
_$CreateCompanyRequestFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
class UpdateCompanyRequest with _$UpdateCompanyRequest {
|
|
const factory UpdateCompanyRequest({
|
|
String? name,
|
|
String? address,
|
|
@JsonKey(name: 'contact_name') String? contactName,
|
|
@JsonKey(name: 'contact_position') String? contactPosition,
|
|
@JsonKey(name: 'contact_phone') String? contactPhone,
|
|
@JsonKey(name: 'contact_email') String? contactEmail,
|
|
@JsonKey(name: 'company_types') List<String>? companyTypes,
|
|
String? remark,
|
|
@JsonKey(name: 'is_active') bool? isActive,
|
|
}) = _UpdateCompanyRequest;
|
|
|
|
factory UpdateCompanyRequest.fromJson(Map<String, dynamic> json) =>
|
|
_$UpdateCompanyRequestFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
class CompanyResponse with _$CompanyResponse {
|
|
const factory CompanyResponse({
|
|
required int id,
|
|
required String name,
|
|
required String address,
|
|
@JsonKey(name: 'contact_name') required String contactName,
|
|
@JsonKey(name: 'contact_position') String? contactPosition, // nullable로 변경
|
|
@JsonKey(name: 'contact_phone') required String contactPhone,
|
|
@JsonKey(name: 'contact_email') required String contactEmail,
|
|
@JsonKey(name: 'company_types') @Default([]) List<String> companyTypes,
|
|
String? remark,
|
|
@JsonKey(name: 'is_active') required bool isActive,
|
|
@JsonKey(name: 'is_partner') @Default(false) bool isPartner,
|
|
@JsonKey(name: 'is_customer') @Default(false) bool isCustomer,
|
|
@JsonKey(name: 'created_at') required DateTime createdAt,
|
|
@JsonKey(name: 'updated_at') DateTime? updatedAt, // nullable로 변경
|
|
@JsonKey(name: 'address_id') int? addressId,
|
|
}) = _CompanyResponse;
|
|
|
|
factory CompanyResponse.fromJson(Map<String, dynamic> json) =>
|
|
_$CompanyResponseFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
class CompanyNameDto with _$CompanyNameDto {
|
|
const factory CompanyNameDto({
|
|
required int id,
|
|
required String name,
|
|
}) = _CompanyNameDto;
|
|
|
|
factory CompanyNameDto.fromJson(Map<String, dynamic> json) =>
|
|
_$CompanyNameDtoFromJson(json);
|
|
} |