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,27 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user