- UserRemoteDataSource: API v0.2.1 스펙 완전 대응 • 응답 형식 통일 (success: true 구조) • 페이지네이션 처리 개선 • 에러 핸들링 강화 • 불필요한 파라미터 제거 (includeInactive 등) - UserDto 모델 현대화: • 서버 응답 구조와 100% 일치 • 도메인 모델 변환 메서드 추가 • Freezed 불변성 패턴 완성 - User 도메인 모델 신규 구현: • Clean Architecture 원칙 준수 • UserRole enum 타입 안전성 강화 • 비즈니스 로직 캡슐화 - 사용자 관련 UseCase 리팩토링: • Repository 패턴 완전 적용 • Either<Failure, Success> 에러 처리 • 의존성 주입 최적화 - UI 컨트롤러 및 화면 개선: • API 응답 변경사항 반영 • 사용자 권한 표시 정확성 향상 • 폼 검증 로직 강화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.4 KiB
Dart
43 lines
1.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'user_model.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$UserImpl _$$UserImplFromJson(Map<String, dynamic> json) => _$UserImpl(
|
|
id: (json['id'] as num?)?.toInt(),
|
|
username: json['username'] as String,
|
|
email: json['email'] as String,
|
|
name: json['name'] as String,
|
|
phone: json['phone'] as String?,
|
|
role: $enumDecode(_$UserRoleEnumMap, json['role']),
|
|
isActive: json['isActive'] as bool? ?? true,
|
|
createdAt: json['createdAt'] == null
|
|
? null
|
|
: DateTime.parse(json['createdAt'] as String),
|
|
updatedAt: json['updatedAt'] == null
|
|
? null
|
|
: DateTime.parse(json['updatedAt'] as String),
|
|
);
|
|
|
|
Map<String, dynamic> _$$UserImplToJson(_$UserImpl instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'username': instance.username,
|
|
'email': instance.email,
|
|
'name': instance.name,
|
|
'phone': instance.phone,
|
|
'role': _$UserRoleEnumMap[instance.role]!,
|
|
'isActive': instance.isActive,
|
|
'createdAt': instance.createdAt?.toIso8601String(),
|
|
'updatedAt': instance.updatedAt?.toIso8601String(),
|
|
};
|
|
|
|
const _$UserRoleEnumMap = {
|
|
UserRole.admin: 'admin',
|
|
UserRole.manager: 'manager',
|
|
UserRole.staff: 'staff',
|
|
};
|