50e4f43738
Implement company AI onboarding/recommendation models, services, repository, and tender UI integration with supporting tests. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
933 B
Dart
28 lines
933 B
Dart
// ignore_for_file: invalid_annotation_target
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import '../error/error_model.dart';
|
|
import '../recommendation_item/recommendation_item.dart';
|
|
|
|
part 'recommend_response.freezed.dart';
|
|
part 'recommend_response.g.dart';
|
|
|
|
/// Standard API envelope for `POST /api/v1/recommend`.
|
|
///
|
|
/// [data] holds the ranked recommendations and may be empty (or null) until
|
|
/// the AI service finishes indexing the company.
|
|
@freezed
|
|
abstract class RecommendResponse with _$RecommendResponse {
|
|
@JsonSerializable(explicitToJson: true)
|
|
const factory RecommendResponse({
|
|
@JsonKey(name: 'data') required List<RecommendationItem>? data,
|
|
@JsonKey(name: 'error') required ErrorModel? error,
|
|
required String? message,
|
|
required bool? success,
|
|
}) = _RecommendResponse;
|
|
|
|
factory RecommendResponse.fromJson(Map<String, dynamic> json) =>
|
|
_$RecommendResponseFromJson(json);
|
|
}
|