Document constructor

Document({
  1. int id = 0,
  2. required String fileName,
  3. required String filePath,
  4. DateTime? createdAt,
  5. DateTime? updatedAt,
  6. int? fileSize,
  7. String? fileHash,
})

Implementation

Document({
  this.id = 0,
  required this.fileName,
  required this.filePath,
  DateTime? createdAt,
  DateTime? updatedAt,
  this.fileSize,
  this.fileHash,
}) {
  this.createdAt = createdAt ?? DateTime.now();
  this.updatedAt = updatedAt ?? DateTime.now();
}