Files
tm_app/lib/data/services/model/recommend_response/recommend_response.dart
T
AmirReza Jamali 50e4f43738 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>
2026-06-16 11:47:52 +03:30

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);
}