50e4f43738
Implement company AI onboarding/recommendation models, services, repository, and tender UI integration with supporting tests. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
858 B
Dart
25 lines
858 B
Dart
// ignore_for_file: invalid_annotation_target
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'recommendation_item.freezed.dart';
|
|
part 'recommendation_item.g.dart';
|
|
|
|
/// A single AI tender recommendation returned by `POST /api/v1/recommend`.
|
|
///
|
|
/// [tenderId] is the backend tender id used with
|
|
/// `GET /api/v1/tenders/details/:id`. [rank] is a display order string where
|
|
/// `1` is the best match. All fields are nullable to stay resilient to partial
|
|
/// API payloads.
|
|
@freezed
|
|
abstract class RecommendationItem with _$RecommendationItem {
|
|
const factory RecommendationItem({
|
|
required String? rank,
|
|
@JsonKey(name: 'tender_id') required String? tenderId,
|
|
required String? analysis,
|
|
}) = _RecommendationItem;
|
|
|
|
factory RecommendationItem.fromJson(Map<String, dynamic> json) =>
|
|
_$RecommendationItemFromJson(json);
|
|
}
|