Post constructor
Post({
- required int id,
- required String title,
- required String content,
- String? image,
- bool? isPinned,
- bool? isApproved,
- int likesCount = 0,
- int commentsCount = 0,
- required CommunityUser user,
- required Community community,
- required bool isLikedByUser,
- required DateTime createdAt,
- required DateTime updatedAt,
Implementation
Post({
required this.id,
required this.title,
required this.content,
this.image,
this.isPinned,
this.isApproved,
this.likesCount = 0,
this.commentsCount = 0,
required this.user,
required this.community,
required this.isLikedByUser,
required this.createdAt,
required this.updatedAt,
});