2026-08-05 12:00:49 -07:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
2025-03-12 19:26:56 +05:30
|
|
|
import 'package:immich_mobile/domain/models/user.model.dart';
|
2023-11-06 15:46:26 +00:00
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
part 'activity.model.freezed.dart';
|
2023-11-06 15:46:26 +00:00
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
enum ActivityType { comment, like }
|
2023-11-06 15:46:26 +00:00
|
|
|
|
2026-08-05 12:00:49 -07:00
|
|
|
@freezed
|
|
|
|
|
abstract class Activity with _$Activity {
|
|
|
|
|
const factory Activity({
|
|
|
|
|
required String id,
|
2023-11-06 15:46:26 +00:00
|
|
|
String? assetId,
|
|
|
|
|
String? comment,
|
2026-08-05 12:00:49 -07:00
|
|
|
required DateTime createdAt,
|
|
|
|
|
required ActivityType type,
|
|
|
|
|
required UserDto user,
|
|
|
|
|
}) = _Activity;
|
2023-11-06 15:46:26 +00:00
|
|
|
}
|
2024-09-24 08:24:48 +02:00
|
|
|
|
|
|
|
|
class ActivityStats {
|
|
|
|
|
final int comments;
|
|
|
|
|
|
|
|
|
|
const ActivityStats({required this.comments});
|
|
|
|
|
}
|