just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
109 lines
1.7 KiB
Dart
109 lines
1.7 KiB
Dart
//
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
//
|
|
|
|
// ignore_for_file: unused_element
|
|
import 'package:fintracker_api/src/model/target_out.dart';
|
|
import 'package:copy_with_extension/copy_with_extension.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'targets_out.g.dart';
|
|
|
|
|
|
@CopyWith()
|
|
@JsonSerializable(
|
|
checked: true,
|
|
createToJson: true,
|
|
disallowUnrecognizedKeys: false,
|
|
explicitToJson: true,
|
|
)
|
|
class TargetsOut {
|
|
/// Returns a new [TargetsOut] instance.
|
|
TargetsOut({
|
|
|
|
required this.dimension,
|
|
|
|
required this.portfolioId,
|
|
|
|
required this.targets,
|
|
|
|
required this.weightsSum,
|
|
});
|
|
|
|
@JsonKey(
|
|
|
|
name: r'dimension',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String dimension;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'portfolio_id',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final int portfolioId;
|
|
|
|
|
|
|
|
@JsonKey(
|
|
|
|
name: r'targets',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final List<TargetOut> targets;
|
|
|
|
|
|
|
|
/// decimal as string
|
|
@JsonKey(
|
|
|
|
name: r'weights_sum',
|
|
required: true,
|
|
includeIfNull: false,
|
|
)
|
|
|
|
|
|
final String weightsSum;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is TargetsOut &&
|
|
other.dimension == dimension &&
|
|
other.portfolioId == portfolioId &&
|
|
other.targets == targets &&
|
|
other.weightsSum == weightsSum;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
dimension.hashCode +
|
|
portfolioId.hashCode +
|
|
targets.hashCode +
|
|
weightsSum.hashCode;
|
|
|
|
factory TargetsOut.fromJson(Map<String, dynamic> json) => _$TargetsOutFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$TargetsOutToJson(this);
|
|
|
|
@override
|
|
String toString() {
|
|
return toJson().toString();
|
|
}
|
|
|
|
}
|
|
|