mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-03 08:39:46 +08:00
opt pgc index
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_index_condition/filter.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_index_condition/order.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_index_condition/sort.dart';
|
||||
|
||||
class PgcIndexConditionData {
|
||||
List<PgcConditionFilter>? filter;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_index_condition/value.dart';
|
||||
|
||||
class PgcConditionFilter {
|
||||
String? field;
|
||||
String? name;
|
||||
List<PgcConditionValue>? values;
|
||||
|
||||
PgcConditionFilter({this.field, this.name, this.values});
|
||||
|
||||
factory PgcConditionFilter.fromJson(Map<String, dynamic> json) =>
|
||||
PgcConditionFilter(
|
||||
field: json['field'] as String?,
|
||||
name: json['name'] as String?,
|
||||
values: (json['values'] as List<dynamic>?)
|
||||
?.map((e) => PgcConditionValue.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
class PgcConditionOrder {
|
||||
String? field;
|
||||
String? name;
|
||||
String? sort;
|
||||
|
||||
PgcConditionOrder({this.field, this.name, this.sort});
|
||||
|
||||
factory PgcConditionOrder.fromJson(Map<String, dynamic> json) =>
|
||||
PgcConditionOrder(
|
||||
field: json['field'] as String?,
|
||||
name: json['name'] as String?,
|
||||
sort: json['sort'] as String?,
|
||||
);
|
||||
}
|
||||
39
lib/models_new/pgc/pgc_index_condition/sort.dart
Normal file
39
lib/models_new/pgc/pgc_index_condition/sort.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_index_condition/value.dart';
|
||||
|
||||
class PgcCondition {
|
||||
String? field;
|
||||
String? name;
|
||||
|
||||
PgcCondition({
|
||||
this.field,
|
||||
this.name,
|
||||
});
|
||||
}
|
||||
|
||||
class PgcConditionFilter extends PgcCondition {
|
||||
List<PgcConditionValue>? values;
|
||||
|
||||
PgcConditionFilter({super.field, super.name, this.values});
|
||||
|
||||
factory PgcConditionFilter.fromJson(Map<String, dynamic> json) =>
|
||||
PgcConditionFilter(
|
||||
field: json['field'] as String?,
|
||||
name: json['name'] as String?,
|
||||
values: (json['values'] as List<dynamic>?)
|
||||
?.map((e) => PgcConditionValue.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
class PgcConditionOrder extends PgcCondition {
|
||||
String? sort;
|
||||
|
||||
PgcConditionOrder({super.field, super.name, this.sort});
|
||||
|
||||
factory PgcConditionOrder.fromJson(Map<String, dynamic> json) =>
|
||||
PgcConditionOrder(
|
||||
field: json['field'] as String?,
|
||||
name: json['name'] as String?,
|
||||
sort: json['sort'] as String?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user