first commit
This commit is contained in:
40
lib/features/feed/domain/models/feed_post_model.dart
Normal file
40
lib/features/feed/domain/models/feed_post_model.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
class FeedPostModel {
|
||||
const FeedPostModel({
|
||||
required this.id,
|
||||
required this.userId,
|
||||
required this.caption,
|
||||
required this.imageUrl,
|
||||
required this.createdAt,
|
||||
required this.likesCount,
|
||||
required this.isLiked,
|
||||
required this.username,
|
||||
required this.avatarUrl,
|
||||
});
|
||||
|
||||
final String id;
|
||||
final String userId;
|
||||
final String caption;
|
||||
final String imageUrl;
|
||||
final DateTime createdAt;
|
||||
final int likesCount;
|
||||
final bool isLiked;
|
||||
final String username;
|
||||
final String avatarUrl;
|
||||
|
||||
FeedPostModel copyWith({
|
||||
int? likesCount,
|
||||
bool? isLiked,
|
||||
}) {
|
||||
return FeedPostModel(
|
||||
id: id,
|
||||
userId: userId,
|
||||
caption: caption,
|
||||
imageUrl: imageUrl,
|
||||
createdAt: createdAt,
|
||||
likesCount: likesCount ?? this.likesCount,
|
||||
isLiked: isLiked ?? this.isLiked,
|
||||
username: username,
|
||||
avatarUrl: avatarUrl,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user