Files
fin-tracker/app/packages/api_client/lib/src/model/transaction_page.dart
T
Dmitry 90ba198c2a chore(app): сгенерированный Dart-клиент из OpenAPI
openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф
openapi/openapi.json, а приложение собирается без запуска генератора.
Пересобирается через just gen-client после любого изменения роутов.
2026-09-18 13:44:09 +03:00

108 lines
1.7 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// ignore_for_file: unused_element
import 'package:fintracker_api/src/model/transaction_out.dart';
import 'package:copy_with_extension/copy_with_extension.dart';
import 'package:json_annotation/json_annotation.dart';
part 'transaction_page.g.dart';
@CopyWith()
@JsonSerializable(
checked: true,
createToJson: true,
disallowUnrecognizedKeys: false,
explicitToJson: true,
)
class TransactionPage {
/// Returns a new [TransactionPage] instance.
TransactionPage({
required this.items,
required this.page,
required this.pageSize,
required this.total,
});
@JsonKey(
name: r'items',
required: true,
includeIfNull: false,
)
final List<TransactionOut> items;
@JsonKey(
name: r'page',
required: true,
includeIfNull: false,
)
final int page;
@JsonKey(
name: r'page_size',
required: true,
includeIfNull: false,
)
final int pageSize;
@JsonKey(
name: r'total',
required: true,
includeIfNull: false,
)
final int total;
@override
bool operator ==(Object other) => identical(this, other) || other is TransactionPage &&
other.items == items &&
other.page == page &&
other.pageSize == pageSize &&
other.total == total;
@override
int get hashCode =>
items.hashCode +
page.hashCode +
pageSize.hashCode +
total.hashCode;
factory TransactionPage.fromJson(Map<String, dynamic> json) => _$TransactionPageFromJson(json);
Map<String, dynamic> toJson() => _$TransactionPageToJson(this);
@override
String toString() {
return toJson().toString();
}
}