- 라이선스 모델 전면 개편 (상세 필드 추가, 계산 필드 구현) - API 응답 처리 개선 (HTTP 상태 코드 기반) - 장비 출고 폼 컨트롤러 추가 - 회사 지점 정보 모델 추가 - 공통 데이터 모델 구조 추가 - 전체 서비스 레이어 API 호출 방식 통일 - UI 컴포넌트 마이너 개선
20 lines
509 B
Dart
20 lines
509 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'api_response.freezed.dart';
|
|
part 'api_response.g.dart';
|
|
|
|
@Freezed(genericArgumentFactories: true)
|
|
class ApiResponse<T> with _$ApiResponse<T> {
|
|
const factory ApiResponse({
|
|
required bool success,
|
|
required String message,
|
|
T? data,
|
|
String? error,
|
|
}) = _ApiResponse<T>;
|
|
|
|
factory ApiResponse.fromJson(
|
|
Map<String, dynamic> json,
|
|
T Function(Object?) fromJsonT,
|
|
) =>
|
|
_$ApiResponseFromJson<T>(json, fromJsonT);
|
|
} |