import 'package:freezed_annotation/freezed_annotation.dart';

part 'document.freezed.dart';
part 'document.g.dart';

@freezed
abstract class Document with _$Document {
  const factory Document({
    required String id,
    required String filename,
    required String docType,
    required String filePath,
    @Default(0) int pageCount,
    @Default(0) int rotation,
    required DateTime createdAt,
    required DateTime updatedAt,
  }) = _Document;

  factory Document.fromJson(Map<String, dynamic> json) =>
      _$DocumentFromJson(json);
}
