mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
* chore(mobile): example freezed implementation on some models * Don't commit Freezed generated code * Freezed easy pass * Formatting fix * Generate Flutter debugging info
25 lines
593 B
Dart
25 lines
593 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
import 'package:immich_mobile/domain/models/user.model.dart';
|
|
|
|
part 'activity.model.freezed.dart';
|
|
|
|
enum ActivityType { comment, like }
|
|
|
|
@freezed
|
|
abstract class Activity with _$Activity {
|
|
const factory Activity({
|
|
required String id,
|
|
String? assetId,
|
|
String? comment,
|
|
required DateTime createdAt,
|
|
required ActivityType type,
|
|
required UserDto user,
|
|
}) = _Activity;
|
|
}
|
|
|
|
class ActivityStats {
|
|
final int comments;
|
|
|
|
const ActivityStats({required this.comments});
|
|
}
|