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