feat: add AI recommendations flow for tenders
Implement company AI onboarding/recommendation models, services, repository, and tender UI integration with supporting tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user