Announcement constructor

Announcement({
  1. required String title,
  2. required int? id,
  3. int? nextId,
  4. int? lastId,
  5. required int weight,
  6. required String imgUrl,
  7. String? url,
  8. required String description,
  9. String? publishedTime,
  10. String? expireTime,
  11. String? applicant,
  12. String? applicationId,
  13. bool? reviewStatus,
  14. String? reviewDescription,
  15. List<String>? tags,
  16. int? randomWeight,
})

Implementation

Announcement({
  required this.title,
  required this.id,
  this.nextId,
  this.lastId,
  required this.weight,
  required this.imgUrl,
  this.url,
  required this.description,
  this.publishedTime,
  this.expireTime,
  this.applicant,
  this.applicationId,
  this.reviewStatus,
  this.reviewDescription,
  this.tags,
  int? randomWeight,
}) {
  this.randomWeight = randomWeight ?? random.nextInt(1000);
}