mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
feat: paginate integrity report results
This commit is contained in:
@@ -13,25 +13,59 @@ part of openapi.api;
|
||||
class IntegrityGetReportDto {
|
||||
/// Returns a new [IntegrityGetReportDto] instance.
|
||||
IntegrityGetReportDto({
|
||||
this.page,
|
||||
this.size,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
/// Minimum value: 1
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
num? page;
|
||||
|
||||
/// Minimum value: 1
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
num? size;
|
||||
|
||||
IntegrityReportType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is IntegrityGetReportDto &&
|
||||
other.page == page &&
|
||||
other.size == size &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(page == null ? 0 : page!.hashCode) +
|
||||
(size == null ? 0 : size!.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'IntegrityGetReportDto[type=$type]';
|
||||
String toString() => 'IntegrityGetReportDto[page=$page, size=$size, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.page != null) {
|
||||
json[r'page'] = this.page;
|
||||
} else {
|
||||
// json[r'page'] = null;
|
||||
}
|
||||
if (this.size != null) {
|
||||
json[r'size'] = this.size;
|
||||
} else {
|
||||
// json[r'size'] = null;
|
||||
}
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
@@ -45,6 +79,8 @@ class IntegrityGetReportDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return IntegrityGetReportDto(
|
||||
page: num.parse('${json[r'page']}'),
|
||||
size: num.parse('${json[r'size']}'),
|
||||
type: IntegrityReportType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,25 +13,31 @@ part of openapi.api;
|
||||
class IntegrityReportResponseDto {
|
||||
/// Returns a new [IntegrityReportResponseDto] instance.
|
||||
IntegrityReportResponseDto({
|
||||
required this.hasNextPage,
|
||||
this.items = const [],
|
||||
});
|
||||
|
||||
bool hasNextPage;
|
||||
|
||||
List<IntegrityReportDto> items;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDto &&
|
||||
other.hasNextPage == hasNextPage &&
|
||||
_deepEquality.equals(other.items, items);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(hasNextPage.hashCode) +
|
||||
(items.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'IntegrityReportResponseDto[items=$items]';
|
||||
String toString() => 'IntegrityReportResponseDto[hasNextPage=$hasNextPage, items=$items]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'hasNextPage'] = this.hasNextPage;
|
||||
json[r'items'] = this.items;
|
||||
return json;
|
||||
}
|
||||
@@ -45,6 +51,7 @@ class IntegrityReportResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return IntegrityReportResponseDto(
|
||||
hasNextPage: mapValueOfType<bool>(json, r'hasNextPage')!,
|
||||
items: IntegrityReportDto.listFromJson(json[r'items']),
|
||||
);
|
||||
}
|
||||
@@ -93,6 +100,7 @@ class IntegrityReportResponseDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'hasNextPage',
|
||||
'items',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user