Files
unionflow-server-api/unionflow/unionflow-mobile-apps/lib/features/feed/domain/entities/feed_item.dart
dahoud e8ad874015 feat: WebSocket temps réel + Finance Workflow + corrections
- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics)
  * Backend: KafkaEventProducer, KafkaEventConsumer
  * Mobile: WebSocketService (reconnection, heartbeat, typed events)
  * DashboardBloc: Auto-refresh depuis WebSocket events

- Finance Workflow: approbations + budgets (backend + mobile)
  * Backend: entities, services, resources, migrations Flyway V6
  * Mobile: features finance_workflow complète avec BLoC

- Corrections DI: interfaces IRepository partout
  * IProfileRepository, IOrganizationRepository, IMembreRepository
  * GetIt configuré avec @injectable

- Spec-Kit: constitution + templates mis à jour
  * .specify/memory/constitution.md enrichie
  * Templates agent, plan, spec, tasks, checklist

- Nettoyage: fichiers temporaires supprimés

Signed-off-by: lions dev Team
2026-03-15 02:12:17 +00:00

52 lines
1.2 KiB
Dart

import 'package:equatable/equatable.dart';
enum FeedItemType { post, event, contribution, notification }
/// Entité principale représentant un élément de n'importe quel flux (DRY)
class FeedItem extends Equatable {
final String id;
final FeedItemType type;
final String authorName; // Nom de l'utilisateur ou de l'entité
final String? authorAvatarUrl;
final DateTime createdAt;
final String content;
// Interactions sociales
final int likesCount;
final int commentsCount;
final bool isLikedByMe;
// Actions spécifiques (ex: Payer, S'inscrire)
final String? customActionLabel;
final String? actionUrlTarget; // Deep link ou route
const FeedItem({
required this.id,
required this.type,
required this.authorName,
this.authorAvatarUrl,
required this.createdAt,
required this.content,
this.likesCount = 0,
this.commentsCount = 0,
this.isLikedByMe = false,
this.customActionLabel,
this.actionUrlTarget,
});
@override
List<Object?> get props => [
id,
type,
authorName,
authorAvatarUrl,
createdAt,
content,
likesCount,
commentsCount,
isLikedByMe,
customActionLabel,
actionUrlTarget,
];
}